protected UserPageBase() { DDeliveryLink = new Link(By.LinkText("DDelivery")); UseProfile = new Link(By.LinkText("Ваш профиль")); UserWarehouses = new Link(By.LinkText("Склады")); UserShops = new Link(By.LinkText("Магазины")); UserEditing = new Link(By.LinkText("Редактирование")); UserChangePassword = new Link(By.LinkText("Сменить пароль")); UserLogOut = new Link(By.LinkText("Выход")); Orders = new Link(By.LinkText("Заказы")); OrderNew = new Link(By.LinkText("Новый")); OrderCreateSelf = new Link(By.LinkText("Самовывоз")); OrderCreateCourirs = new Link(By.LinkText("Курьерская доставка")); Documents = new Link(By.LinkText("Документы")); DocumentsCreate = new Link(By.LinkText("Подготовить")); DocumentsList = new Link(By.LinkText("Подготовленные")); Calculator = new Link(By.LinkText("Калькулятор")); Support = new Link(By.LinkText("Поддержка")); SupportCreate = new Link(By.LinkText("Создать запрос")); SupportList = new Link(By.LinkText("Мои запросы")); Loader = new LoaderControl(); }
private void InitDatabaseList() { var backgroundWorker = new BackgroundWorker(); var databases = new List <SqlDatabaseSettings>(); var loaderControl = new LoaderControl(); backgroundWorker.DoWork += (sender, args) => { var databaseService = ServicesProvider.GetInstance().GetDatabaseServices(); databases = databaseService.GetOpenCbsDatabases(); }; backgroundWorker.RunWorkerCompleted += (sender, args) => { loaderControl.Stop(); if (args.Error != null) { MessageBox.Show(args.Error.Message); return; } Enable(); var index = -1; var i = 0; foreach (var database in databases) { databaseCombobox.Items.Add(database.Name); if (database.Name == TechnicalSettings.DatabaseName) { index = i; } i++; } databaseCombobox.SelectedIndex = index; usernameTextbox.Focus(); databaseCombobox.SelectedIndexChanged += (sender2, args2) => ChangeDefaultDatabaseAndRestart(); }; Controls.Add(loaderControl); loaderControl.AttachTo(databaseCombobox); loaderControl.Start(); Disable(); backgroundWorker.RunWorkerAsync(); }
protected AdminPageBase() { DDeliveryLink = new Link(By.LinkText("DDelivery")); DirectoryList = new Link(By.LinkText("Справочники")); Geography = new Link(By.LinkText("География")); GeographyRegions = new Link(By.LinkText("Регионы")); GeographyCities = new Link(By.LinkText("Города")); GeographyDestinations = new Link(By.LinkText("Направления")); Intervals = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(2)")); IntervalsWeight = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(2)> ul > li:nth-child(1)")); IntervalsSize = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(2)> ul > li:nth-child(2)")); IntervalsCodes = new Link(By.LinkText("Штрих-коды")); LegalEntities = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(3)")); DirectoryСalendars = new Link(By.LinkText("Календарь")); DirectoryStatus = new Link(By.LinkText("Статусы")); AdminCompanies = new Link(By.LinkText("Компании")); Companies = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li")); Calendars = new Link(By.LinkText("Календари")); PickupTimetable = new Link(By.LinkText("График забора")); CompanyWarehouses = new Link(By.LinkText("Склады")); DeliveryPoints = new Link(By.LinkText("Пункты выдачи")); Managers = new Link(By.LinkText("Менеджеры")); PaymentPrice = new Link(By.LinkText("Наложенный платеж")); SmsTemplates = new Link(By.LinkText("SMS-информирование")); OrderEditTemplates = new Link(By.LinkText("Редактирование заявок")); Prices = new Link(By.LinkText("Цены")); PricesPickup = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(11) > ul > li:nth-child(1)")); PricesSelf = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(11) ul > li:nth-child(2)")); PricesCourier = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(11) ul > li:nth-child(3)")); PricesPacking = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(11) ul > li:nth-child(4)")); Times = new Link(By.LinkText("Сроки")); TimesPickup = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(10) > ul > li:nth-child(1)")); TimesSelf = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(10) ul > li:nth-child(2)")); TimesCourier = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(10) ul > li:nth-child(3)")); Fees = new Link(By.LinkText("Комиссии")); FeesValue = new Link(By.LinkText("Системы")); FeesDeclaredPrice = new Link(By.LinkText("Оценочной стоимости")); FeesPaymentPrice = new Link(By.LinkText("Наложенного платежа")); Margins = new Link(By.LinkText("Наценки")); MarginsValue = new Link(By.LinkText("Значения")); MargindisCounts = new Link(By.LinkText("Скидки")); OrderedIttemplates = new Link(By.LinkText("Редактирование заявок")); AdminUsers = new Link(By.LinkText("Пользователи")); Users = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li")); UsersGroups = new Link(By.LinkText("Группы")); UsersWarehouses = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(5)")); UsersShops = new Link(By.CssSelector("li.dropdown.open > ul.dropdown-menu > li:nth-child(4)")); UsersSupport = new Link(By.LinkText("Поддержка")); UsersSupportQuestion = new Link(By.LinkText("Вопросы")); UsersSupportTypes = new Link(By.LinkText("Настройка")); UsersSupportFreshDesk = new Link(By.LinkText("FreshDesk")); Orders = new Link(By.LinkText("Заказы")); OrderPickup = new Link(By.LinkText("Забор")); OrderInput = new Link(By.LinkText("Входящие")); OrderOutput = new Link(By.LinkText("Исходящие")); Documents = new Link(By.LinkText("Документы")); Сalculator = new Link(By.LinkText("Калькулятор")); Reports = new Link(By.LinkText("Отчеты")); ReportsRequest = new Link(By.LinkText("Заявки")); ReportsOrder = new Link(By.LinkText("Отчет по заявкам")); ReportsOrdePickupr = new Link(By.LinkText("Отчет по сортировке")); ReportsOrderUnchanging = new Link(By.LinkText("Неизменяемые заявки")); ReportsOrderPickupWarehouse = new Link(By.LinkText("Заявки на складе заборщика")); ReportsCalculatorLog = new Link(By.LinkText("Журнал калькулятора")); ReportsDLog = new Link(By.LinkText("Общий журнал")); ReportsData = new Link(By.LinkText("Целосность данных")); ReportsExportCsv = new Link(By.LinkText("Экспорт CSV")); ReportsPimpayLog = new Link(By.LinkText("История подключений PimPay")); System = new Link(By.LinkText("Система")); SystemMaintenance = new Link(By.LinkText("Ручное управление")); SystemCronjobs = new Link(By.LinkText("Планировщик задач")); SystemTools = new Link(By.LinkText("Инструменты")); SystemToolsValidatePrice = new Link(By.LinkText("Проверка прайсов")); SystemToolsPrintStickers = new Link(By.LinkText("Печать наклеек")); UserLogOut = new Link(By.LinkText("Выход")); Loader = new LoaderControl(); }