Esempio n. 1
0
 /// <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));
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 public bool Exists(Eyousoft_yhq.Model.Product model)
 {
     return(dal.Exists(model));
 }