コード例 #1
0
ファイル: StockService.cs プロジェクト: chinayinhui/LYLQ
 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;
 }
コード例 #2
0
ファイル: StockModel.cs プロジェクト: chinayinhui/LYLQ
 public BizLayer.Stock GetBizModel(StockModel stockModel)
 {
     BizLayer.Stock bizStock = null;
     if (stockModel != null)
     {
         bizStock = new BizLayer.Stock();
         bizStock.Code = stockModel.Code;
         bizStock.Id = stockModel.Id;
         bizStock.InstoreId = stockModel.InstoreId;
         bizStock.Number = stockModel.Number;
         bizStock.UnitPrice = stockModel.UnitPrice;
         bizStock.TotalPrice = stockModel.TotalPrice;
         bizStock.Department = stockModel.Department;
         bizStock.Type = stockModel.Type;
         bizStock.CreatedBy = stockModel.CreatedBy;
         bizStock.CreatedDate = stockModel.CreatedDate;
         bizStock.UpdatedBy = stockModel.UpdatedBy;
         bizStock.UpdatedDate = stockModel.UpdatedDate;
     }
     return bizStock;
 }