Example #1
0
 public void Add(InvenSalesDetailDTO DTO)
 {
     using (var container = new InventoryContainer())
     {
         InvenSalesDetail ino = new InvenSalesDetail();
         container.InvenSalesDetails.AddObject((InvenSalesDetail)DTOMapper.DTOObjectConverter(DTO, ino));
         container.SaveChanges();
     }
 }
Example #2
0
        public void EditStock(InvenSalesDetailDTO DTO)
        {
            using (var container = new InventoryContainer())
            {
                var Sale = new InvenSalesDetail();
                Sale           = container.InvenSalesDetails.FirstOrDefault(o => o.DtlId.Equals(DTO.DtlId));
                Sale.DtlId     = DTO.DtlId;
                Sale.ProductId = DTO.ProductId;

                Sale.TodayStock = DTO.TodayStock;

                Sale = (InvenSalesDetail)DTOMapper.DTOObjectConverter(DTO, Sale);
                container.SaveChanges();
            }
        }
Example #3
0
        public void EditTotalQuan(InvenSalesDetailDTO DTO)
        {
            using (var container = new InventoryContainer())
            {
                var Sale = new InvenSalesDetail();
                Sale                   = container.InvenSalesDetails.FirstOrDefault(o => o.DtlId.Equals(DTO.DtlId));
                Sale.DtlId             = DTO.DtlId;
                Sale.ProductId         = DTO.ProductId;
                Sale.TotalQuantity     = DTO.TotalQuantity;
                Sale.UsedQuantity      = DTO.UsedQuantity;
                Sale.RemainingQuantity = DTO.RemainingQuantity;

                Sale = (InvenSalesDetail)DTOMapper.DTOObjectConverter(DTO, Sale);
                container.SaveChanges();
            }
        }