private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { string chalan_no = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); frm_generate_sale fgs = new frm_generate_sale(chalan_no); fgs.Show(); }
private void generateSalesToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(frm_generate_sale)) { form.Activate(); return; } } frm_generate_sale sales = new frm_generate_sale(); sales.MdiParent = this; sales.Activate(); sales.BringToFront(); sales.Show(); }