private void BtnAdd_Click(object sender, EventArgs e) { this.Visible = false; BuyProduct product = new BuyProduct(); product.Show(); EntityProductOnStorage entityProduct = new EntityProductOnStorage(); entityProduct.ReadProduct(tableForProducts); }
private void BtnDelete_Click(object sender, EventArgs e) { this.Visible = false; SellProductForm sellProductForm = new SellProductForm(); sellProductForm.Show(); EntityProductOnStorage entityProduct = new EntityProductOnStorage(); entityProduct.ReadProduct(tableForProducts); }
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("Вы не выбрали контрагента!"); } }
private void TxtFind_TextChanged(object sender, EventArgs e) { EntityProductOnStorage storage = new EntityProductOnStorage(); storage.FindProduct(tableForProducts, TxtFind.Text); }
private void ProductOnStorage_Load(object sender, EventArgs e) { EntityProductOnStorage product = new EntityProductOnStorage(); product.ReadProduct(tableForProducts); }