Exemple #1
0
        public async Task FindHunter()
        {
            if (SelectedCompany != null && SelectedCompany.Website != null)
            {
                List <Contact> FoundContacts = (await HunterIntegrationService.FindDomainContacts(SelectedCompany.Website)).ToList();
                MessageForModal     = "Найдены " + FoundContacts.Count + " новых контактов";
                MessageModalDisplay = "block";
                await TempService.UpdateCompanies();

                await InvokeAsync(StateHasChanged);
            }
        }
Exemple #2
0
        public async void SetNotQualify()
        {
            if (SelectedId != 0)
            {
                await CompanyService.SetNotQualified(SelectedId);

                var company = await CompanyService.GetCompany(SelectedId);

                QualifyCompanyModel notQualified = new QualifyCompanyModel {
                    IsQualify = false, CompanyTradingName = company.TradingName
                };
                await AddLog(qualifyCompany : notQualified);
            }
            await TempService.UpdateCompanies();

            TempService.SetId(0);
            Pause();
        }
Exemple #3
0
        /// controls END
        #endregion
        #region BASE_METHODS
        protected override async Task OnInitializedAsync()
        {
            NewCompany          = new CompanyRegistrationDTO();
            AddLemlistStatistic = new AddLemlistStatistic();
            checkedContacts     = new List <int>();
            await TempService.UpdateCompanies();

            await RenderUpdate();

            authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();

            user = authState.User;
            if (user.Identity.IsAuthenticated)
            {
                TempService.CurrentUser = await UserRegistrationService.GetCurrent(user.Identity.Name);
            }
            await StartCountdown();
        }
Exemple #4
0
        /// controls div END
        public async Task AddCompany()
        {
            if (NewCompany != null)
            {
                try
                {
                    Validator.ValidateObject(NewCompany, new ValidationContext(NewCompany));
                    await CompanyService.CreateCompany(NewCompany);
                    await AddLog(ActionMesage : ActionMessage + ": " + NewCompany.TradingName);

                    await TempService.UpdateCompanies();
                    await Close();
                }
                catch (Exception ex)
                {
                    ExceptionLabel        = ex.Message;
                    ExceptionLabelDisplay = "block";
                }
                await InvokeAsync(StateHasChanged);
            }
        }