public void SaveBranchReturn(InvenBranchReturnDTO DTO) { using (var container = new InventoryContainer()) { InvenBranchReturn gur = new InvenBranchReturn(); container.InvenBranchReturns.AddObject((InvenBranchReturn)DTOMapper.DTOObjectConverter(DTO, gur)); container.SaveChanges(); } }
// edit brnch central to party public void Edit_Central_To_Party(InvenBranchReturnDTO DTO) { using (var container = new InventoryContainer()) { var Comp = new InvenBranchReturn(); Comp = container.InvenBranchReturns.First(o => o.BranchReturnId.Equals(DTO.BranchReturnId)); Comp.CentralToPartyStatus = DTO.CentralToPartyStatus; Comp = (InvenBranchReturn)DTOMapper.DTOObjectConverter(DTO, Comp); container.SaveChanges(); } }
public void Edit(InvenBranchReturnDTO DTO) { using (var container = new InventoryContainer()) { var Comp = new InvenBranchReturn(); Comp = container.InvenBranchReturns.First(o => o.BranchReturnId.Equals(DTO.BranchReturnId)); Comp.ReciveBy = DTO.ReciveBy; Comp.ReciveDate = DTO.ReciveDate; Comp.ReturnReciveStatus = DTO.ReturnReciveStatus; Comp = (InvenBranchReturn)DTOMapper.DTOObjectConverter(DTO, Comp); container.SaveChanges(); } }