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); } }
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(); }
/// 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(); }
/// 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); } }