private void FormProductsRecord_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); frmProductMgmt frm = new frmProductMgmt(); frm.Show(); }
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { DataGridViewRow row = dataGridView1.SelectedRows[0]; this.Hide(); frmProductMgmt frm = new frmProductMgmt(); frm.Show(); frm.txtProductName.Text = row.Cells[0].Value.ToString(); frm.textBox1.Text = row.Cells[0].Value.ToString(); frm.cboxCompany.Text = row.Cells[1].Value.ToString(); frm.cboxProductCategory.Text = row.Cells[2].Value.ToString(); frm.btnRegister.Enabled = false; frm.btnDelete.Enabled = true; frm.btnUpdate.Enabled = true; frm.txtProductName.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnProductManagement_Click(object sender, EventArgs e) { frmProductMgmt frm = new frmProductMgmt(); frm.ShowDialog(); }