コード例 #1
0
        public ExecuteResult DeleteUserGroup()
        {
            var inputValue        = _ntsPage.Request.Form["Inputs"];
            var query             = Newtonsoft.Json.JsonConvert.DeserializeObject <int>(inputValue);
            var operaterUserGroup = new NTS.EMS.Config.BLL.OperateUserGroupBll();
            var userGroup         = operaterUserGroup.GetUserGroupInfo(query);

            if (userGroup.ResultInfo.Success)
            {
                if (userGroup.UserGroupInfo.Name.Equals("系统组"))
                {
                    ExecuteResult systemResult = new ExecuteResult();
                    systemResult.Success      = false;
                    systemResult.ExceptionMsg = "系统组不允许删除!";
                    return(systemResult);
                }
            }
            else
            {
                return(userGroup.ResultInfo);
            }
            var result = operaterUserGroup.DeleteUserGroup(query);

            result.ExtendContent = new List <string> {
                "删除", userGroup.UserGroupInfo.Name
            };
            return(result);
        }
コード例 #2
0
 public int ContainUser()
 {
     //不能返沪bool 类型??? 0表示不包含,1表示包含
     var inputValue = _ntsPage.Request.Form["Inputs"];
     var query = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(inputValue);
     var result = new NTS.EMS.Config.BLL.OperateUserGroupBll().IsContainUser(query);
     return result ? 1 : 0;
 }
コード例 #3
0
        public ResultUserGroups GetUserGroupList()
        {
            var inputValue = _ntsPage.Request.Form["Inputs"];
            var query      = Newtonsoft.Json.JsonConvert.DeserializeObject <QueryUserGroupContact>(inputValue);
            var result     = new NTS.EMS.Config.BLL.OperateUserGroupBll().GetUserGroupList(query);

            return(result);
        }
コード例 #4
0
        public int ContainUser()
        {
            //不能返沪bool 类型??? 0表示不包含,1表示包含
            var inputValue = _ntsPage.Request.Form["Inputs"];
            var query      = Newtonsoft.Json.JsonConvert.DeserializeObject <int>(inputValue);
            var result     = new NTS.EMS.Config.BLL.OperateUserGroupBll().IsContainUser(query);

            return(result ? 1 : 0);
        }
コード例 #5
0
        public ExecuteResult SaveUserGroup()
        {
            var inputValue         = _ntsPage.Request.Form["Inputs"];
            var query              = Newtonsoft.Json.JsonConvert.DeserializeObject <UserGroupDataContact>(inputValue);
            var operatorUserGroup  = new NTS.EMS.Config.BLL.OperateUserGroupBll();
            var existExecuteResult = operatorUserGroup.HasExistUserGroup(query.UGData.Name, query.UGData.ID);

            if (!existExecuteResult.Success)
            {
                return(existExecuteResult);
            }
            var result = operatorUserGroup.SaveUserGroup(query);

            if (result.Success)
            {
                result.ExtendContent = new List <string>()
                {
                    query.UGData.ID == 0 ? "新增" : "修改", query.UGData.Name
                };
            }
            return(result);
        }
コード例 #6
0
 public ExecuteResult DeleteUserGroup()
 {
     var inputValue = _ntsPage.Request.Form["Inputs"];
     var query = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(inputValue);
     var operaterUserGroup = new NTS.EMS.Config.BLL.OperateUserGroupBll();
     var userGroup = operaterUserGroup.GetUserGroupInfo(query);
     if (userGroup.ResultInfo.Success)
     {
         if (userGroup.UserGroupInfo.Name.Equals("系统组"))
         {
             ExecuteResult systemResult = new ExecuteResult();
             systemResult.Success = false;
             systemResult.ExceptionMsg = "系统组不允许删除!";
             return systemResult;
         }
     }
     else
     {
         return userGroup.ResultInfo;
     }
     var result = operaterUserGroup.DeleteUserGroup(query);
     result.ExtendContent = new List<string> { "删除", userGroup.UserGroupInfo.Name };
     return result;
 }
コード例 #7
0
 public ResultUserGroups GetUserGroupList()
 {
     var inputValue = _ntsPage.Request.Form["Inputs"];
     var query = Newtonsoft.Json.JsonConvert.DeserializeObject<QueryUserGroupContact>(inputValue);
     var result = new NTS.EMS.Config.BLL.OperateUserGroupBll().GetUserGroupList(query);
     return result;
 }
コード例 #8
0
 public ExecuteResult SaveUserGroup()
 {
     var inputValue = _ntsPage.Request.Form["Inputs"];
     var query = Newtonsoft.Json.JsonConvert.DeserializeObject<UserGroupDataContact>(inputValue);
     var operatorUserGroup = new NTS.EMS.Config.BLL.OperateUserGroupBll();
     var existExecuteResult = operatorUserGroup.HasExistUserGroup(query.UGData.Name, query.UGData.ID);
     if (!existExecuteResult.Success)
     {
         return existExecuteResult;
     }
     var result = operatorUserGroup.SaveUserGroup(query);
     if (result.Success)
     {
         result.ExtendContent = new List<string>() { query.UGData.ID == 0 ? "新增" : "修改", query.UGData.Name };
     }
     return result;
 }