Пример #1
0
        public void Instock(InStore inStock)
        {
            _instore.Create(inStock);

            var stock = GetStockFromInstock(inStock);
            _stock.Create(stock);
        }
Пример #2
0
 private Stock GetStockFromInstock(InStore instock)
 {
     var stock = new Stock()
     {
         Id = Guid.NewGuid().ToString(),
         Code = instock.Code,
         CreatedBy = instock.CreatedBy,
         CreatedDate = DateTime.Now,
         Department = instock.Department,
         InstoreId = instock.Id,
         Number = instock.RemainNumber,
         TotalPrice = instock.RemainTotalPrice,
         Type = instock.Type,
         UnitPrice = instock.UnitPrice,
         UpdatedBy = instock.UpdatedBy,
         UpdatedDate = DateTime.Now
     };
     return stock;
 }
Пример #3
0
 public BizLayer.InStore GetBizModel(InStoreModel dpt)
 {
     BizLayer.InStore dbInst = null;
     if (dpt != null)
     {
         dbInst = new BizLayer.InStore();
         dbInst.Code = dpt.Code;
         dbInst.Id = dpt.Id;
         dbInst.Number = dpt.Number;
         dbInst.RemainNumber = dpt.RemainNumber;
         dbInst.RemainTotalPrice = dpt.RemainTotalPrice;
         dbInst.UnitPrice = dpt.UnitPrice;
         dbInst.TotalPrice = dpt.TotalPrice;
         dbInst.Department = dpt.Department;
         dbInst.Type = dpt.Type;
         dbInst.CreatedBy = dpt.CreatedBy;
         dbInst.CreatedDate = dpt.CreatedDate;
         dbInst.UpdatedBy = dpt.UpdatedBy;
         dbInst.UpdatedDate = dpt.UpdatedDate;
     }
     return dbInst;
 }