예제 #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));
 }