Exemple #1
0
        public ActionResult Index()
        {
            AIA.Life.Repository.AIAEntity.AVOAIALifeEntities entities = new Life.Repository.AIAEntity.AVOAIALifeEntities();
            string roleName = entities.usp_GetCurrentUserRole(HttpContext.User.Identity.Name).FirstOrDefault();

            if (roleName == "UW User" || roleName == "SUPADMIN")
            {
                return(RedirectToAction("UnderwriterHome", "Home"));
            }
            else if (roleName == "FPC-Banca")
            {
                return(RedirectToAction("BancaHome", "Home"));
            }
            else if (roleName == "WP" || roleName == "FM" || roleName == "TECHNO" || roleName == "RM" || roleName == "ZM" || roleName == "DSF")
            {
                return(RedirectToAction("AgentHome", "Home"));
            }
            else
            {
                return(View("UnAuthorized"));
            }
        }
Exemple #2
0
        public ActionResult GetLandingDashboards(string UserName, string CloseWindow = "false")
        {
            if (!string.IsNullOrEmpty(UserName))
            {
                ViewBag.UserName = UserName;
                Username         = CrossCutting.CrossCutting_EncryptDecrypt.Decrypt(UserName);
            }
            AIA.Life.Repository.AIAEntity.AVOAIALifeEntities entities = new Life.Repository.AIAEntity.AVOAIALifeEntities();
            string roleName = entities.usp_GetCurrentUserRole(Username).FirstOrDefault();

            if (roleName == "FPC-Banca")
            {
                return(View("BancaHome"));
            }
            else if (roleName == "WP" || roleName == "FM" || roleName == "TECHNO" || roleName == "RM" || roleName == "ZM" || roleName == "DSF")
            {
                return(View("AgentHome"));
            }
            else
            {
                return(View("UnAuthorized"));
            }
        }