private void btnAdd_Click(object sender, EventArgs e) { AddProductForm apf = new AddProductForm(); apf.FormClosed += new FormClosedEventHandler(child_FormClosed); apf.Show(); }
private void btnAdd_Click(object sender, EventArgs e) { int serialNum = dgvProducts.RowCount; AddProductForm apf = new AddProductForm(); apf.assignProductNo(serialNum); apf.FormClosed += new FormClosedEventHandler(child_FormClosed); apf.Show(); }
private void btnAdd_Click(object sender, EventArgs e) { string name = txtName.Text; string description = rtbDescription.Text; string yearModel = txtYearModel.Text; string price = txtPrice.Text; Product p = new Product(); p.InsertBLProduct(name, description, yearModel, price); AddProductForm apf = new AddProductForm(); apf.Close(); }