//************************************ ORGANIZATION USER CLIENT (non-Global Admin) *************************************** public IActionResult ManageUsers(int?id) { //********* id = OrgUserClientID string _UserIDX = _userManager.GetUserId(User); var model = new ManageUsersViewModel { ddl_AdminOfOrgClients = _DbPortal.GetT_PRT_ORG_USERS_CLIENT_AdminByUserID(_UserIDX).Select(x => new SelectListItem { Value = x.ORG_USER_CLIENT_IDX.ToString(), Text = x.ORG_CLIENT_ALIAS + " - " + x.CLIENT_ID }) }; //get users currently listed for the org/client //get users for the organization if (id != null) { model.selOrgUserClient = id; T_PRT_ORG_USER_CLIENT _ouc = _DbPortal.GetT_PRT_ORG_USERS_CLIENT_ByID((int)id); if (_ouc != null) { T_PRT_ORG_USERS _ou = _DbPortal.GetT_PRT_ORG_USERS_ByOrgUserID(_ouc.ORG_USER_IDX); if (_ou != null) { model.client_id = _ouc.CLIENT_ID; model.selOrg = _ou.ORG_ID; model.OrgUserClients = _DbPortal.GetT_PRT_ORG_USERS_CLIENT_ByOrgIDandClientID(_ou.ORG_ID, _ouc.CLIENT_ID, false); model.ddl_Users = _DbPortal.GetT_PRT_ORG_USERS_ByOrgID(_ou.ORG_ID).Select(x => new SelectListItem { Value = x.ORG_USER_IDX.ToString(), Text = x.USER_NAME }); } } } ; return(View(model)); }