public void SaveSalesPaymentInfo(InvenSalesPaymentDto DTO) { using (var container = new InventoryContainer()) { InvenSalePayment gur = new InvenSalePayment(); container.InvenSalePayments.AddObject((InvenSalePayment)DTOMapper.DTOObjectConverter(DTO, gur)); container.SaveChanges(); } }
public void Edit_Adjustpayment(InvenSalesPaymentDto DTO) { using (var container = new InventoryContainer()) { var Comp = new InvenSalePayment(); Comp = container.InvenSalePayments.FirstOrDefault(o => o.SalePaymentId.Equals(DTO.SalePaymentId)); Comp.SalePaymentId = DTO.SalePaymentId; Comp.TotalPrice = DTO.TotalPrice; // Comp.TransectionType = DTO.TransectionType; Comp = (InvenSalePayment)DTOMapper.DTOObjectConverter(DTO, Comp); container.SaveChanges(); } }