コード例 #1
0
        public ActionResult Edit(T_Sys_Role role)
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            result.Add("success", true);
            if (string.IsNullOrEmpty(role.F_RoleName))
            {
                result["success"] = false;
                result.Add("msg", "角色名称不能为空!");
            }
            else
            {
                int b = _roleService.Update(role);
                if (b == 0)
                {
                    result["success"] = false;
                    result.Add("msg", "修改失败!");
                }
            }
            return(Json(result));
        }
コード例 #2
0
 public bool Delete(T_Sys_Role p)
 {
     return(_repository.Delete(p));
 }
コード例 #3
0
 /// <summary>
 /// 修改指定的字段
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="fileds"></param>
 /// <returns></returns>
 public bool UpdateSubFields(T_Sys_Role entity, List <string> fileds)
 {
     return(_repository.UpdateSubFields(entity, fileds));
 }
コード例 #4
0
 public bool Update(T_Sys_Role p)
 {
     return(_repository.Update(p));
 }
コード例 #5
0
 public bool Insert(T_Sys_Role p)
 {
     return(_repository.Insert(p));
 }
コード例 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="isSave"></param>
 /// <returns></returns>
 public int Update(T_Sys_Role entity, bool isSave = true)
 {
     return(_repository.Update(entity, isSave));
 }
コード例 #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="isSave"></param>
 /// <returns></returns>
 public int Insert(T_Sys_Role entity, bool isSave = true)
 {
     return(_repository.Insert(entity, isSave));
 }