Exemple #1
0
        private void Cashier_Load(object sender, EventArgs e)
        {
            BarCodeFocus();

            clients   = new repositories.Client(db);
            cashiers  = new repositories.Cashier(db);
            orders    = new repositories.Order(db);
            cart      = new repositories.Cart();
            discounts = new repositories.Discount(db);

            dataExchanger = new services.DataExchanger(db);

            SetProductsList();
            dataMapper.FillDiscounts(discounts);
            dataMapper.FillClients(clients);
            dataMapper.FillCashiers(cashiers);

            if (Properties.Settings.Default.autoOpenTablet)
            {
                TabletForm tabletWindow = new TabletForm(this);
                tabletWindow.Show();
            }

            if (Properties.Settings.Default.fiscal)
            {
                fiscal = new services.Fiscal(new drivers.FiscalAbstractFabric(), cart);

                if (fiscal.Ready())
                {
                    ActivateFiscal();
                }
                else
                {
                    MessageBox.Show("Не удалось подключиться к ККТ. Попробуйте перезапустить программу.");
                    DeactivateFiscal();
                }

                if (Properties.Settings.Default.fiscalDriverType == 1)
                {
                    discountBox.Enabled = true;
                }

                RenderSession();
            }
            else
            {
                discountBox.Enabled = true;
                DeactivateFiscal();
            }

            cashierForm = new CashierChooseForm(this);
            cashierForm.Show();
        }
Exemple #2
0
 private void cashierName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     cashierForm = new CashierChooseForm(this);
     cashierForm.Show();
 }