Пример #1
0
        public ActionResult EditUser(string userName)
        {
            ViewBag.DeparUrl = WebCommon.Url_DepartmentInfo_DepartmentManager;
            //获取用户信息
            PriviDepartmentUser      pdu           = null;
            IList <SYSRoleUser>      roleUserList  = new List <SYSRoleUser>();
            List <UserCenter_Apps>   appList       = new List <UserCenter_Apps>();
            UserCenter_LoginUserInfo loginUserInfo = WebUserHelp.GetNowLoginUser(out appList);
            int    cityId                = WebUserHelp.GetNowCityId();
            int    companyId             = loginUserInfo.FxtCompanyId;
            string loginusername         = loginUserInfo.UserName;
            string loginsignname         = loginUserInfo.SignName;
            UserCenter_UserInfo userInfo = UserInfoManager.GetUserInfoByUserName(cityId, companyId, userName, loginsignname, loginsignname, appList, out pdu, out roleUserList);

            if (userInfo != null)
            {
                //输出给页面变量
                ViewBag.CompanyName = userInfo.CompanyName;
                ViewBag.UserName    = userInfo.UserName;
                ViewBag.TrueName    = userInfo.TrueName;
                ViewBag.Mebile      = userInfo.Mobile;
                if (pdu != null)
                {
                    ViewBag.DepartmentId = pdu.DepartmentID;
                }
                ViewBag.RoleUserList = roleUserList;
            }
            //获取小组+角色基础信息
            IList <SYSRole>         roleList = SYSRoleManager.GetSYSRoleByCompanyId(cityId, companyId);
            IList <PriviDepartment> pdList   = PriviDepartmentManager.GetDepartmentByCompanyId(cityId, companyId);

            ViewBag.DepartmentList = pdList;
            ViewBag.RoleList       = roleList;
            return(View());
        }
Пример #2
0
        public ActionResult UserManager()
        {
            UserCenter_LoginUserInfo loginUserInfo = WebUserHelp.GetNowLoginUser();
            int cityId    = WebUserHelp.GetNowCityId();
            int companyId = loginUserInfo.FxtCompanyId;
            IList <PriviDepartment> departmentList = PriviDepartmentManager.GetDepartmentByCompanyId(cityId, companyId);
            IList <SYSRole>         roleList       = SYSRoleManager.GetSYSRoleByCompanyId(0, 0);

            ViewBag.DepartmentList = departmentList;
            ViewBag.RoleList       = roleList;
            //获取是否有修改用户权限
            ViewBag.UpdateRight = 0;
            bool updateRight = WebUserHelp.CheckNowPageFunctionCode(loginUserInfo.UserName, loginUserInfo.FxtCompanyId, WebCommon.Url_UserInfo_UserManager, SYSCodeManager.FunOperCode_7);

            if (updateRight)
            {
                ViewBag.UpdateRight = 1;
            }
            return(View());
        }