public bool GEdit(DBA.Model.Category model) { if (model.ID == 0) { Add(model); return(true); } else { return(Update(model)); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DBA.Model.Category model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DBA.Model.Category model) { return(dal.Add(model)); }