コード例 #1
0
        /// <summary>
        /// 获取开启功能
        /// </summary>
        /// <param name="LoginName"></param>
        /// <returns></returns>


        public string GetIsOpen(string LoginName)
        {
            GetRoleModel model = new GetRoleModel();

            try
            {
                WebPages.RoleService.RoleServiceClient brc = new WebPages.RoleService.RoleServiceClient();
                RoleService.RoleEntity ds = brc.GetIsOpen(LoginName);
                if (ds.Role_Type != null)
                {
                    model.Role_Name = ds.Role_Name;
                }
                model.IsOpen = ds.Role_ID;
                string json = JsonConvert.SerializeObject(model);
                return(json);
            }
            catch
            {
                string json = JsonConvert.SerializeObject(model);
                return(json);
            }
        }
コード例 #2
0
        /// <summary>
        /// 判断是否开启功能
        /// </summary>
        /// <param name="RoleIDs"></param>
        /// <param name="IsOpen"></param>
        /// <returns></returns>
        public bool UpdateRIsOpen(int RoleIDs, int IsOpen)
        {
            WebPages.RoleService.RoleServiceClient brc = new WebPages.RoleService.RoleServiceClient();

            return(brc.UpdateRIsOpen(RoleIDs, IsOpen));
        }