private void btnAddNew_Click(object sender, EventArgs e) { wdProductUpdate frmProduct = new wdProductUpdate(true); frmProduct.StartPosition = FormStartPosition.CenterScreen; frmProduct.ShowDialog(); getProductList(); }
private void btnUpdate_Click(object sender, EventArgs e) { wdProductUpdate frmProduct = new wdProductUpdate(false); frmProduct.StartPosition = FormStartPosition.CenterScreen; frmProduct.txtProID.Text = dgProduct.CurrentRow.Cells["productid"].Value.ToString(); frmProduct.txtProName.Text = dgProduct.CurrentRow.Cells["productname"].Value.ToString(); frmProduct.txtDesc.Text = dgProduct.CurrentRow.Cells["description"].Value.ToString(); frmProduct.cboUM.Text = dgProduct.CurrentRow.Cells["measurename"].Value.ToString(); frmProduct.ShowDialog(); getProductList(); }