コード例 #1
0
        public IActionResult Index(string id)
        {
            string _UserIDX = _userManager.GetUserId(User);

            //initialize model
            var model = new HomeViewModel
            {
                selOrg          = id,
                WarnNoClientInd = false,
                Announcement    = _DbPortal.GetT_PRT_APP_SETTINGS_CUSTOM().ANNOUNCEMENTS
            };

            if (_UserIDX != null)
            {
                //retrieve listing of clients user has access to
                model._clients = _DbPortal.GetT_PRT_ORG_USERS_CLIENT_DistinctClientByUserID(_UserIDX);

                //retrieve listing of organizations that have wordpress sites defined
                model._WordPressOrgs = _DbPortal.GetT_PRT_ORGANIZATIONS_HaveWordPress();

                //if agency user doesn't have access to any clients yet, display warning
                List <UserOrgDisplayType> _userOrgs = _DbPortal.GetT_PRT_ORG_USERS_ByUserID(_UserIDX);
                if (_userOrgs != null && _userOrgs.Count == 1 && _userOrgs[0].ACCESS_LEVEL == "U")
                {
                    List <OrgUserClientDisplayType> _orgUserClients = _DbPortal.GetT_PRT_ORG_USERS_CLIENT_ByOrgUserID(_userOrgs[0].ORG_USER_IDX ?? 0);
                    if (_orgUserClients == null || _orgUserClients.Count == 0)
                    {
                        model.WarnNoClientInd = true;
                    }
                }
            }

            return(View(model));
        }
コード例 #2
0
        public IActionResult PortalRegister(string returnUrl = null)
        {
            ViewData["ReturnUrl"] = returnUrl;
            T_PRT_APP_SETTINGS_CUSTOM cust = _DbPortal.GetT_PRT_APP_SETTINGS_CUSTOM();
            var model = new RegisterViewModel
            {
                termsConditions = cust.TERMS_AND_CONDITIONS
            };

            return(View(model));
        }
コード例 #3
0
        public ActionResult Settings()
        {
            T_PRT_APP_SETTINGS_CUSTOM custSettings = _DbPortal.GetT_PRT_APP_SETTINGS_CUSTOM();
            var model = new SettingsViewModel
            {
                app_settings       = _DbPortal.GetT_PRT_APP_SETTING_List(),
                TermsAndConditions = custSettings.TERMS_AND_CONDITIONS,
                Announcements      = custSettings.ANNOUNCEMENTS
            };

            return(View(model));
        }