/// <summary>
        /// 更新一个持久化对象
        /// </summary>
        /// <param name="roleAuthor"></param>
        /// <returns></returns>
        public ExecResult UpdateRoleAuthor(RoleAuthorEntity roleAuthor)
        {
            ExecResult result = new ExecResult();

            try
            {
                IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>();
                bool flag = roleAuthorService.UpdateRoleAuthor(roleAuthor);
                if (flag)
                {
                    result.result = EnumJsonResult.success.ToString();
                    result.msg    = "成功";
                }
                else
                {
                    result.result = EnumJsonResult.failure.ToString();
                    result.msg    = "操作失败";
                }
            }
            catch (Exception ex)
            {
                result.result = EnumJsonResult.error.ToString();
                result.msg    = "更新角色作者信息时出现异常:" + ex.Message;
            }
            return(result);
        }
 public IActionResult Edit(RoleAuthorModel model)
 {
     try
     {
         RoleAuthor obj = new RoleAuthor();
         obj.ID          = model.ID;
         obj.RoleName    = model.RoleName;
         obj.AccessPages = model.AccessPages;
         var result = _roleAuthorService.UpdateRoleAuthor(obj);
         TempData["SuccessMsg"] = "Data saved successfully";
     }
     catch (Exception ex)
     {
         TempData["ErrorMsg"] = ex.Message;
     }
     return(RedirectToAction("Index"));
 }