/// <summary> /// 增加一条数据 /// </summary> public string Add(Topicsys.Model.t_teacher model) { /// 判断工号是否已存在 if (dal.GetModel(model.teacher_gh) != null) { return("工号已存在!"); } if (dal.Add(model)) { return("添加成功!"); } else { return("发生错误!"); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Topicsys.Model.t_teacher model) { return(dal.Update(model)); }