示例#1
0
文件: Product.cs 项目: ichoukou/yhq
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Eyousoft_yhq.Model.Product model)
 {
     model.ProductID = Guid.NewGuid().ToString();
     if (model.AttachList != null && model.AttachList.Count > 0)
     {
         for (int i = 0; i < model.AttachList.Count; i++)
         {
             model.AttachList[i].ItemId = model.ProductID;
         }
     }
     return(dal.Add(model));
 }
示例#2
0
文件: Product.cs 项目: ichoukou/yhq
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Eyousoft_yhq.Model.Product model)
 {
     if (model == null || string.IsNullOrEmpty(model.ProductID))
     {
         return(false);
     }
     if (model.AttachList != null && model.AttachList.Count > 0)
     {
         for (int i = 0; i < model.AttachList.Count; i++)
         {
             model.AttachList[i].ItemId = model.ProductID;
         }
     }
     return(dal.Update(model));
 }
示例#3
0
文件: Product.cs 项目: ichoukou/yhq
 public bool Exists(Eyousoft_yhq.Model.Product model)
 {
     return(dal.Exists(model));
 }