Beispiel #1
0
        public async Task <IActionResult> Index()
        {
            //var userInfo = _userInfoService.GetCurrentUserInfo();
            //var orgName = userInfo?.LoginData.FirstOrDefault(x => x.Key == "OrganizationName").Value ?? "Ви не авторизовані";
            ViewBag.OrganizationName = "Test"; /*orgName;*/
            var model = await _licenseService.GetActiveLicenses();

            return(View(model));
        }
Beispiel #2
0
        public async Task <IActionResult> Index()
        {
            var orgId = (await _userInfoService.GetCurrentUserInfoAsync())?.OrganizationId();

            if (orgId == null)
            {
                return(await Task.Run(() => NotFound()));
            }
            var orgInfos = _dataService
                           .GetEntity <OrganizationInfo>(x => x.OrganizationId == new Guid(orgId) && x.IsActualInfo);

            var dick     = orgInfos.ToDictionary(x => x.Type, x => x.IsPendingLicenseUpdate);
            var licenses = await _licenseService.GetActiveLicenses();

            licenses.ForEach(p => dick.Add("LIC_" + p.type, p.isActive));
            ViewBag.isFop = false;//string.IsNullOrEmpty((await _userInfoService.GetCurrentUserInfoAsync()).EDRPOU());
            return(View(dick));
        }