Ejemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            AddGoodsForm addgood = new AddGoodsForm();

            addgood.ShowDialog();
            if (addgood.radioButtonDrink.Checked == true)
            {
                ShowStore();
            }
            else if (addgood.radioButtonGoods.Checked == true)
            {
                ShowBar();
            }
            Show();
        }
Ejemplo n.º 2
0
 private void buttonUpdate_Click(object sender, EventArgs e)
 {
     store = StoreModel.SelectAllDrinks();
     if (store.Count != 0)
     {
         var          index   = dataGridViewStore.CurrentRow.Index;
         AddGoodsForm addgood = new AddGoodsForm();
         addgood.store = store[index];
         addgood.ShowDialog();
         ShowStore();
         Show();
     }
     else
     {
         MessageBox.Show("Склад пустой");
     }
 }
Ejemplo n.º 3
0
 private void buttonAddProduct_Click(object sender, EventArgs e)
 {
     store = StoreModel.SelectAllProducts();
     if (store.Count != 0)
     {
         var          index   = dataGridViewBar.CurrentRow.Index;
         AddGoodsForm addgood = new AddGoodsForm();
         addgood.radioButtonGoods.Checked = true;
         addgood.store = store[index];
         addgood.ShowDialog();
         ShowBar();
         Show();
     }
     else
     {
         MessageBox.Show("Склад пустой");
     }
 }