private void dataGridViewBanks_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int b_id = (int)dataGridViewBanks.CurrentRow.Cells["biddataGridViewTextBoxColumn"].Value; this.Hide(); FormOffersOfBank formOffersOfBank = new FormOffersOfBank(b_id, logedInUser); formOffersOfBank.ShowDialog(); formOffersOfBank.Dispose(); this.Show(); }
private void dataGridViewBanks_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { int id = (int)dataGridViewBanks.CurrentRow.Cells["bIDDataGridViewTextBoxColumn"].Value; FormOffersOfBank offersOfBankForm = new FormOffersOfBank(id); this.Hide(); offersOfBankForm.ShowDialog(this); offersOfBankForm.Dispose(); this.Show(); } catch { MessageBox.Show("Failed to get bank`s offers", "Error"); this.Show(); } }