Пример #1
0
 private void stock_Click(object sender, EventArgs e)
 {
     list          = new SELECT_LIST(2, emp);
     list.Location = this.Location;
     list.Size     = this.Size;
     list.Show();
     this.Hide();
 }
Пример #2
0
        private void close_Click(object sender, EventArgs e)
        {
            SELECT_LIST selList = new SELECT_LIST(2, emp);

            selList.Location = this.Location;
            selList.Size     = this.Size;
            selList.Show();
            this.Hide();
        }
        private void back_Click_1(object sender, EventArgs e)
        {
            SELECT_LIST selList = new SELECT_LIST(0, emplUser);

            selList.Size     = this.Size;
            selList.Location = this.Location;
            selList.Show();
            this.Hide();
        }
Пример #4
0
        private void save_Click(object sender, EventArgs e)
        {
            try
            {
                switch (stock.SaveStock(stock.id_stock, maskedStart.Text, maskedEnd.Text, int.Parse(maskedDiscount.Text)))
                {
                case 0: labelEr.Visible = true; break;

                case 1: labelEr1.Visible = true; break;

                case 2: labelEr.Visible = true; labelEr1.Visible = true; break;

                case 3: label6.Visible = true; break;

                default:
                    SELECT_LIST selList = new SELECT_LIST(2, emp);
                    selList.Location = this.Location;
                    selList.Show();
                    this.Hide();
                    break;
                }
            }
            catch { labelEr.Visible = true; labelEr1.Visible = true; }
        }
 private void save_Click(object sender, EventArgs e)
 {
     try
     {
         if (comboSelection.SelectedItem != null)
         {
             dish.id_selection = menu.SelectSel(comboSelection.SelectedItem.ToString());
         }
         if (!dish.SaveDish(dish.id_dish, name_dish.Text, dish.id_selection, checkBoxAv.Checked, maskedTextBoxPriceP.Text, maskedTextBoxPriceK.Text))
         {
             MessageForm mes = new MessageForm("Н Е   В С Е   О Б Я З А Т Е Л Ь Н Ы Е    П О Л Я\r\nБ Ы Л И    З А П О Л Н Е Н Ы ");
             mes.ShowDialog();
         }
         else
         {
             SELECT_LIST selList = new SELECT_LIST(1, emp);
             selList.Size     = this.Size;
             selList.Location = this.Location;
             selList.Show();
             this.Hide();
         }
     }
     catch { MessageForm f = new MessageForm(); f.ShowDialog(); }
 }
 private void save_Click(object sender, EventArgs e)
 {
     try
     {
         if (comboPosition.SelectedItem != null)
         {
             empl.id_position = positions.SelectPos(comboPosition.SelectedItem.ToString());
         }
         if (!empl.SaveEmp(empl.id_employee, surname.Text, name.Text, lastname.Text, login.Text, password.Text, empl.id_position))
         {
             MessageForm mes = new MessageForm("Н Е   В С Е   О Б Я З А Т Е Л Ь Н Ы Е    П О Л Я\r\nБ Ы Л И    З А П О Л Н Е Н Ы ");
             mes.ShowDialog();
         }
         else
         {
             SELECT_LIST selList = new SELECT_LIST(0, emplUser);
             selList.Size     = this.Size;
             selList.Location = this.Location;
             selList.Show();
             this.Hide();
         }
     }
     catch { error.Visible = true; }
 }