Esempio n. 1
0
 public void Add(LiabilitiesRptDTO DTO)
 {
     using (var container = new InventoryContainer())
     {
         AccLiabilitiesRpt gur = new AccLiabilitiesRpt();
         container.AccLiabilitiesRpts.AddObject((AccLiabilitiesRpt)DTOMapper.DTOObjectConverter(DTO, gur));
         container.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Edit(LiabilitiesRptDTO DTO)
 {
     using (var container = new InventoryContainer())
     {
         var Comp = new AccLiabilitiesRpt();
         Comp              = container.AccLiabilitiesRpts.FirstOrDefault(o => o.LiabRptId.Equals(DTO.LiabRptId));
         Comp.LiabRptId    = DTO.LiabRptId;
         Comp.MainHeadId   = DTO.MainHeadId;
         Comp.SubCode1Id   = DTO.SubCode1Id;
         Comp.UpdateDate   = DTO.UpdateDate;
         Comp.Priority     = DTO.Priority;
         Comp.ActiveStatus = DTO.ActiveStatus;
         Comp.UpdateBy     = DTO.UpdateBy;
         Comp              = (AccLiabilitiesRpt)DTOMapper.DTOObjectConverter(DTO, Comp);
         container.SaveChanges();
     }
 }