Пример #1
0
        public IActionResult Index()
        {
            RegistrarDocumentsIndex registrarDocumentsIndex = new RegistrarDocumentsIndex()
            {
                RegionsWebServiceListName = Secret1C.GetRegions(_Secret1Cs, Request.Cookies[Startup.WebService1CRegion] ?? _Secret1Cs.Servers.Keys.First())
            };

            SetOrganizationsList();

            return(View(registrarDocumentsIndex));
        }
Пример #2
0
        public async Task <IActionResult> Index(string account1CCode, string regionWebServiceListName, string[] orgs)
        {
            (Client[] Clients, string[] Errors)creditDocument = await RegistrarDocuments.GetClientsFrom1CAccountAsync(_Service1C, _Secret1Cs, regionWebServiceListName, account1CCode);

            RegistrarDocumentsIndex model = new RegistrarDocumentsIndex()
            {
                Clients                   = creditDocument.Clients,
                Errors                    = creditDocument.Errors,
                Account1CCode             = account1CCode,
                RegionsWebServiceListName = Secret1C.GetRegions(_Secret1Cs, Request.Cookies[Startup.WebService1CRegion] ?? _Secret1Cs.Servers.Keys.First())
            };

            ViewData["orgs"] = Organization.OrganizationsByLogin(User.Identity.Name, orgs);
            Response.Cookies.Append(Startup.WebService1CRegion, regionWebServiceListName);

            return(View(model));
        }