コード例 #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);
        }
コード例 #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);
        }
コード例 #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("Вы не выбрали контрагента!");
     }
 }
コード例 #4
0
        private void TxtFind_TextChanged(object sender, EventArgs e)
        {
            EntityProductOnStorage storage = new EntityProductOnStorage();

            storage.FindProduct(tableForProducts, TxtFind.Text);
        }
コード例 #5
0
        private void ProductOnStorage_Load(object sender, EventArgs e)
        {
            EntityProductOnStorage product = new EntityProductOnStorage();

            product.ReadProduct(tableForProducts);
        }