|
|
|
@ -2015,19 +2015,22 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingSampleBill/Save")]
|
|
|
|
|
public async Task SampleBillSave(UpdateBookingSampleBillInput input)
|
|
|
|
|
public async Task<long> SampleBillSave(UpdateBookingSampleBillInput input)
|
|
|
|
|
{
|
|
|
|
|
BookingSampleBill entity = null;
|
|
|
|
|
if (input.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var entity = input.Adapt<BookingSampleBill>();
|
|
|
|
|
entity = input.Adapt<BookingSampleBill>();
|
|
|
|
|
await _repSampleBill.InsertAsync(entity);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var entity = _repSampleBill.FirstOrDefault(x => x.BookingId == input.Id);
|
|
|
|
|
entity = _repSampleBill.FirstOrDefault(x => x.BookingId == input.Id);
|
|
|
|
|
entity = input.Adapt(entity);
|
|
|
|
|
await _repSampleBill.UpdateAsync(entity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return entity.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|