コード例 #1
0
        /// <summary>
        /// 用户信息删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public ActionResult DeleteUser(UserOperate dto)
        {
            ResultData <object> result = new ResultData <object>();
            UserLoginDTO        user   = (UserLoginDTO)Session["UserLoginInfo"];

            try
            {
                dto.ModifyUser = user.FullName;
                if (dto.UserID == 1)
                {
                    throw new Exception("系统初始化用户不予删除");
                }
                result = UserAuthorityProvider.DeleteUser(dto);
            }
            catch (Exception ex)
            {
                result.SubmitResult = false;
                result.Message      = ex.Message;
            }

            return(Json(result, JsonRequestBehavior.AllowGet));
        }