Esempio n. 1
0
 public static Product_CE ToCE(ProductEntity item)
 {
     Product_CE target = new Product_CE();
     target.ID = item.ID;
     target.SnNum = item.SnNum;
     target.BarCode = item.BarCode;
     target.ProductName = item.ProductName;
     target.Num = item.Num;
     target.MinNum = item.MinNum;
     target.MaxNum = item.MaxNum;
     target.UnitNum = item.UnitNum;
     target.UnitName = item.UnitName;
     target.CateNum = item.CateNum;
     target.CateName = item.CateName;
     target.Size = item.Size;
     target.Color = item.Color;
     target.InPrice = item.InPrice;
     target.OutPrice = item.OutPrice;
     target.AvgPrice = item.AvgPrice;
     target.NetWeight = item.NetWeight;
     target.GrossWeight = item.GrossWeight;
     target.Description = item.Description;
     target.PicUrl = item.PicUrl;
     target.IsDelete = item.IsDelete;
     target.CreateTime = item.CreateTime;
     target.CreateUser = item.CreateUser;
     target.StorageNum = item.StorageNum;
     target.DefaultLocal = item.DefaultLocal;
     target.CusNum = item.CusNum;
     target.CusName = item.CusName;
     target.Display = item.Display;
     target.Remark = item.Remark;
     return target;
 }
Esempio n. 2
0
 /// <summary>
 /// 新增产品信息
 /// </summary>
 /// <param name="ce"></param>
 /// <returns></returns>
 public int Add(Product_CE ce)
 {
     if (ce != null)
     {
         ProductEntity entity = Product_To.To(ce);
         ProductProvider provider = new ProductProvider();
         int line = provider.Add(entity);
         return line;
     }
     return 0;
 }