private void btnAdd_Click_1(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToDecimal(tbxUnitPrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text) }); MessageBox.Show("Product Added"); LoadPRoducts(); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxAddName.Text, UnitPrice = Convert.ToDecimal(tbxAddUnitPrice.Text), StockAmount = Convert.ToInt32(tbxAddStockAmount.Text) }); ProductLoad(); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product() { Name = tbxAddName.Text, UnitPrice = Convert.ToDecimal(tbxAddUnitPrice.Text), UnitsInStock = Convert.ToInt32(tbxAddUnitPrice.Text) }); LoadProducts(); MessageBox.Show("Product Added!!"); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToDecimal(tbxUnitPrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text) }); ShowAllItems(); MessageBox.Show("Product Successfully Added :)"); }
private void btnAdd_Click(object sender, EventArgs e) { _productdal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToInt32(tbxUnitPrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text) }); MessageBox.Show("product added"); TabloGetir(); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToDecimal(tbxUnitPrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text) }); dgwProducts.DataSource = _productDal.GetAll(); MessageBox.Show("Product Added!"); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToDecimal(tbxUnitePrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text) }); LoadProducts(); /// anlık olarak eklemeş olduk MessageBox.Show(" Product Added !"); }
private void btnAdd_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = decimal.Parse(tbxUnitPrice.Text), StockAmount = int.Parse(tbxStockAmount.Text) }); MessageBox.Show("Product added!"); LoadProducts(); }
private void button1_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = tbxName.Text, UnitPrice = Convert.ToDecimal(tbxuUnitPrice.Text), StockAmount = Convert.ToInt32(tbxStockAmount.Text), }); LoadProducts(); MessageBox.Show("Product added!"); }
//(95)//////////////////////// ÜRÜN EKLEME İŞLEMİNİN YAZILMASI ////////////////////////////// private void btnAdd_Click(object sender, EventArgs e) //(95)Ekleme butonu eventi { _productDal.Add(new Product //(95) Ekleme metodu parametre göndereceğinden Product sınıfına propertyleri kullanmak üzere instance edildi. { Name = tbxName.Text, //(95)Textboxlardan veriler çekildi ,convert edilerek property nesnelerine atandı UnitPrice = Convert.ToDecimal(tbxUnitPrice.Text), //(95) StockAmount = Convert.ToInt32(tbxStockAmount.Text) //(95) }); LoadProducts(); MessageBox.Show("Product Added!"); }
private void btnInsert_Click(object sender, EventArgs e) { _productDal.Add(new Product { ProducName = textProductName.Text, UnitePrice = Convert.ToDecimal(textUnitePrice.Text), StockAmount = Convert.ToInt32(textStockAmount.Text) } ); TextClear(); LoadProducts(); MessageBox.Show("Product Added!"); }
private void btnInsert_Click(object sender, EventArgs e) { _productDal.Add(new Product { Name = txtInsertName.Text, CategoryId = cmbInsertCategory.SelectedIndex, UnitPrice = Convert.ToDecimal(txtInsertPrice.Text), StockAmount = Convert.ToInt32(txtInsertStock.Text), Status = chbInsertStatus.Checked, RegisterDate = DateTime.Now }); LoadProducts(); MessageBox.Show("Product Added!"); }
private void btnAdd_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtName.Text) && !string.IsNullOrEmpty(txtUnitPrice.Text) && !string.IsNullOrEmpty(txtStockAmount.Text)) { _productDal.Add(new Product { Name = txtName.Text, StockAmount = Convert.ToInt32(txtStockAmount.Text), UnitPrice = Convert.ToDecimal(txtUnitPrice.Text) }); LoadProducts(); AddProductFormTemizle(); MessageBox.Show("Product Added!"); } else { MessageBox.Show("Fill the Form!"); } }