public async Task<ActionResult> PortalList(PortalViewModel viewmodel)
 {
     int clientId = 0;
     AdminUser user = null;
     try
     {
         var cid = Session["ClientId"];
         clientId = Convert.ToInt32(cid.ToString());
         user = (PortalAPI.Models.AdminUser)Session["AdminUserSession"];
         string name = Request.Form["listbox"];
         int portalId = Convert.ToInt32(name);
         var addportal = _adminManager.AddNewPortal(portalId, clientId);                
         var lang = CreateLangDictionary();               
         var createfolders = _adminManager.CreateConfigurationFolders(portalId, clientId, "");
         viewmodel.PortalPS4ViewModel = _adminManager.GetPS4Portals(clientId);
         viewmodel.PortalPS5ViewModel = _adminManager.GetConvertedPortals(clientId);
         ViewBag.UserName = _adminManager.GetUserName(user.UserId, clientId);
         return View(viewmodel);
     }
     catch (Exception ex)
     {
         KBCustomException kbCustExp = KBCustomException.ProcessException(ex, KBOp.AdminAddPortal, KBErrorHandler.GetMethodName(), GeneralResources.AdminGetPortals,
             new KBExceptionData("clientId", clientId), new KBExceptionData("user.UserId", (user != null) ? user.UserId : -1));
         throw kbCustExp;
     }
 }
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////    
        public ActionResult PortalList()
        {
            int clientId = 0;
            AdminUser user = null;
            try
            {
                user = (PortalAPI.Models.AdminUser)Session["AdminUserSession"];
                if (user != null)
                {
                    var cid = Session["ClientId"];
                    clientId = Convert.ToInt32(cid.ToString());
                    ViewBag.UserName = _adminManager.GetUserName(user.UserId, clientId);
                    if (ModelState.IsValid)
                    {
                        PortalViewModel viewmodel = new PortalViewModel();

                        viewmodel.PortalPS4ViewModel = _adminManager.GetPS4Portals(clientId);
                        viewmodel.PortalPS5ViewModel = _adminManager.GetConvertedPortals(clientId);

                        return View(viewmodel);
                    }
                }
                return RedirectToAction("Index", "Admin");
            }
            catch (Exception ex)
            {
                KBCustomException kbCustExp = KBCustomException.ProcessException(ex, KBOp.AdminCreds, KBErrorHandler.GetMethodName(), GeneralResources.AdminGetUserName,
                    new KBExceptionData("clientId", clientId), new KBExceptionData("user.UserId", (user != null) ? user.UserId : -1));
                throw kbCustExp;
            }
        }