Esempio n. 1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            BuyProduct product = new BuyProduct();

            product.Show();
            EntityProductOnStorage entityProduct = new EntityProductOnStorage();

            entityProduct.ReadProduct(tableForProducts);
        }
Esempio n. 2
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            SellProductForm sellProductForm = new SellProductForm();

            sellProductForm.Show();
            EntityProductOnStorage entityProduct = new EntityProductOnStorage();

            entityProduct.ReadProduct(tableForProducts);
        }
Esempio n. 3
0
 private void BtnAdd_Click(object sender, EventArgs e)
 {
     if (IDCounteragent != null)
     {
         if (tableForProducts.Rows.Count > 0)
         {
             EntityProductOnStorage storage = new EntityProductOnStorage();
             storage.BuyProduct(IDCounteragent, tableForProducts);
             this.Close();
             GC.Collect();
             ProductOnStorage product = new ProductOnStorage();
             product.Visible = true;
         }
         else
         {
             MessageBox.Show("Вы не выбрали товар!");
         }
     }
     else
     {
         MessageBox.Show("Вы не выбрали контрагента!");
     }
 }
Esempio n. 4
0
        private void TxtFind_TextChanged(object sender, EventArgs e)
        {
            EntityProductOnStorage storage = new EntityProductOnStorage();

            storage.FindProduct(tableForProducts, TxtFind.Text);
        }
Esempio n. 5
0
        private void ProductOnStorage_Load(object sender, EventArgs e)
        {
            EntityProductOnStorage product = new EntityProductOnStorage();

            product.ReadProduct(tableForProducts);
        }