예제 #1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public string Update(Model.department model, string content, string username, string realname)
 {
     if (string.IsNullOrEmpty(model.de_name))
     {
         return("请填写机构全称");
     }
     if (Exists(model.de_name, model.de_parentid.Value, model.de_id.Value))
     {
         return("同一个上级机构下不能存在相同的机构");
     }
     if (dal.Update(model))
     {
         Model.business_log logmodel = new Model.business_log();
         logmodel.ol_relateID    = model.de_id.Value;
         logmodel.ol_title       = "编辑部门岗位";
         logmodel.ol_content     = content;
         logmodel.ol_operateDate = DateTime.Now;
         new business_log().Add(DTEnums.ActionEnum.Edit.ToString(), logmodel, username, realname);
         return("");
     }
     return("编辑失败");
 }
예제 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Model.department model)
 {
     return(dal.Update(model));
 }
예제 #3
0
 /// <summary>
 /// 修改导航名称和标题
 /// </summary>
 /// <param name="old_name">旧名称</param>
 /// <param name="new_name">新名称</param>
 /// <param name="title">标题</param>
 /// <returns></returns>
 public bool Update(string old_name, string new_name, int sort_id)
 {
     return(dal.Update(old_name, new_name, sort_id));
 }