Exemplo n.º 1
0
        public PartialViewResult SideBarUserArea()
        {
            string email         = User.Identity.Name;// ((ClaimsIdentity)User.Identity).FindFirst(ClaimTypes.Email).Value;
            string financialyear = string.Empty;
            string calendar      = string.Empty;


            SideBarUserAreaViewModel userVM = new SideBarUserAreaViewModel
            {
                // Photo = User.Identity.GetUserProfilePhoto(),
                UserNames    = User.Identity.Name,
                EmailAddress = User.Identity.Name,
            };

            if (Session["speriod"] == null)
            {
                Session["speriod"] = DateTime.Now.Year.ToString() + "01";
                Session["eperiod"] = DateTime.Now.Year.ToString() + "12";
                Session["syear"]   = DateTime.Now.Year.ToString();
            }
            if (Session["WSCredentials"] == null)
            {
                Session["WSCredentials"] = GetUserCredentials();
            }
            return(PartialView("~/Views/Shared/DisplayTemplates/_SideBarUserArea.cshtml", userVM));
        }
        public IViewComponentResult Invoke()
        {
            var model = new SideBarUserAreaViewModel
            {
                Email = HttpContext.User.Identity.Name
            };

            return(View(model));
        }
Exemplo n.º 3
0
        public int GetUserId()
        {
            var model = new SideBarUserAreaViewModel
            {
                LoginInformations = AsyncHelper.RunSync(() => _sessionAppService.GetCurrentLoginInformations())
            };

            return((int)model.LoginInformations.User.Id);
        }
Exemplo n.º 4
0
        public PartialViewResult SideNavbar()
        {
            var model = new SideBarUserAreaViewModel()
            {
                LoginInformations = AsyncHelper.RunSync(() => _sessionAppService.GetCurrentLoginInformations()),
            };

            return(PartialView("_SideNavbar", model));
        }
Exemplo n.º 5
0
        public PartialViewResult SideBarUserArea()
        {
            var model = new SideBarUserAreaViewModel
            {
                LoginInformations     = AsyncHelper.RunSync(() => _sessionAppService.GetCurrentLoginInformations()),
                IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled,
            };

            return(PartialView("_SideBarUserArea", model));
        }
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = new SideBarUserAreaViewModel
            {
                LoginInformations     = await _sessionAppService.GetCurrentLoginInformations(),
                IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled,
            };

            return(View(model));
        }