Пример #1
0
        public async Task <List <(string type, bool isActive)> > GetActiveLicenses()
        {
            var list = new List <(string, bool)>
            {
                _trlLicenseService.GetLicenseGuid() == null ? ("TRL", false) : ("TRL", true),
                _prlLicenseService.GetLicenseGuid() == null ? ("PRL", false) : ("PRL", true),
                _imlLicenseService.GetLicenseGuid() == null ? ("IML", false) : ("IML", true)
            };

            return(list);
        }
Пример #2
0
        public async Task <IActionResult> AppTypes(Guid?orgId)
        {
            if (orgId == null || orgId == Guid.Empty)
            {
                return(await Task.Run(() => View($"{nameof(AppTypes)}Error")));
            }

            TrlOrganizationExtShortDTO org;

            try
            {
                org = DataService.GetDto <TrlOrganizationExtShortDTO>(dto => dto.Id == orgId).Single();
            }
            catch (Exception e)
            {
                throw new Exception("Невірно вказан id організації", e);
            }

            ViewBag.OrgId   = orgId;
            ViewBag.OrgName = org.Name;
            ViewBag.Number  = org.edrpouOrInn;

            ViewBag.TrlLicense = _trlLicenseService.GetLicenseGuid(orgId);

            return(await Task.Run(() => View()));
        }