Exemple #1
0
        private string GetCashierName()
        {
            string selectedCashierName;

            if (selectedCashierId > 0)
            {
                entities.Cashier cashier = cashiers.FindOne(selectedCashierId);
                selectedCashierName = cashier.GetName();
            }
            else
            {
                selectedCashierName = "Основной";
            }

            return(selectedCashierName);
        }
Exemple #2
0
        private bool AddCashier()
        {
            if (addCashierNameBox.Text == "")
            {
                MessageBox.Show("Имя обязательно");

                return(false);
            }

            entities.Cashier cashier = new entities.Cashier(0, addCashierNameBox.Text);

            cashiers.SaveWithSql(cashier);

            cashiersProvider.Add(cashier);

            cashiersGridView.Update();

            addCashierNameBox.Text = "";

            MessageBox.Show("Сохранено");

            return(true);
        }
Exemple #3
0
 private void SelectFormCashier(entities.Cashier cashier)
 {
     selectedCashier     = cashier;
     cashierBox.Visible  = true;
     cashierNameBox.Text = cashier.GetName();
 }