private void button1_Click(object sender, EventArgs e) { frm_patient frm = new frm_patient(); frm.LoadData("0", "Patient"); frm.ShowDialog(this); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (gstr == "Patient") { if (dataGridView1.CurrentCell.OwningColumn.Name == "print1") { if (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["Registration_No"].Value.ToString() == "0") { return; } else { frm_patient frm = new frm_patient(); frm.LoadData(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["Ac_id"].Value.ToString(), "Print Patient"); filter(); frm.ShowDialog(); LoadData(gstr, "Patient"); } } } }