public void Add(InvenReorderDto DTO) { using (var container = new InventoryContainer()) { InvenReorder inreo = new InvenReorder(); container.InvenReorders.AddObject((InvenReorder)DTOMapper.DTOObjectConverter(DTO, inreo)); container.SaveChanges(); } }
public void Edit_PurrequisitonStatus(InvenReorderDto DTO) { using (var container = new InventoryContainer()) { var Comp = new InvenReorder(); Comp = container.InvenReorders.FirstOrDefault(o => o.ReorderId.Equals(DTO.ReorderId)); Comp.PurRequisitonStatus = DTO.PurRequisitonStatus; Comp = (InvenReorder)DTOMapper.DTOObjectConverter(DTO, Comp); container.SaveChanges(); } }
public void Edit(InvenReorderDto DTO) { using (var container = new InventoryContainer()) { var Comp = new InvenReorder(); Comp = container.InvenReorders.FirstOrDefault(o => o.ReorderId.Equals(DTO.ReorderId)); Comp.ReorderId = DTO.ReorderId; Comp.ReorderValue = DTO.ReorderValue; Comp.RateOfInterest = DTO.RateOfInterest; Comp.ProductId = DTO.ProductId; Comp.BrProId = DTO.BrProId; Comp.UpdateBy = DTO.UpdateBy; Comp.SalePrice = DTO.SalePrice; Comp.PurRequisitonStatus = DTO.PurRequisitonStatus; Comp.UpdateDate = DTO.UpdateDate; Comp = (InvenReorder)DTOMapper.DTOObjectConverter(DTO, Comp); container.SaveChanges(); } }