private void btn_View_Details_Click(object sender, EventArgs e) { try { int currentIID = Convert.ToInt32(dgv_Sup_Find.CurrentRow.Cells[0].Value); frm_Supplier f1 = new frm_Supplier(currentIID, "view"); f1.ShowDialog(); } catch (Exception) { MessageBox.Show(" you must select supplier first"); } }
private void addToolStripMenuItem2_Click(object sender, EventArgs e) { frm_Supplier f1 = new frm_Supplier("add"); f1.ShowDialog(); }