/// <summary> /// 增加一条数据 /// </summary> public int Add(SCZM.Model.Repair.Repair_Assignment model, out string message) { message = "保存成功!"; int rowId = dal.Add(model); if (rowId < 1) { message = "保存失败!"; } return(rowId); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(SCZM.Model.Repair.Repair_Assignment model, string procedureList_prev, out string message) { message = "保存成功!"; int rows = 0; if (procedureList_prev != "") { rows = dal.Update(model, procedureList_prev); } else { rows = dal.Update(model); } if (rows == 0) { message = "对不起,该条数据已被其他人删除!"; return(false); } else { return(true); } }