private void btnPurchaseEntry_Click(object sender, EventArgs e) { frmPurchaseMasterMain purch = new frmPurchaseMasterMain(0); purch.ShowDialog(); dataGridBind(); }
private void dgPurchaseDetails_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgPurchaseDetails.CurrentRow.Index != -1 && dgPurchaseDetails.CurrentRow.Cells[1].Value != null) { var lID = Convert.ToInt32(dgPurchaseDetails.CurrentRow.Cells[0].Value); frmPurchaseMasterMain acc = new frmPurchaseMasterMain(lID); acc.ShowDialog(); dataGridBind(); } } catch (Exception x) { MessageBox.Show("Something went wrong. Contact your system administrator"); } }