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