private void CreateTicketWithUserBttn_Click(object sender, EventArgs e) { int selectedIndex = ResultGrid.CurrentCell.RowIndex; int ticketId = Convert.ToInt32(ResultGrid.Rows[selectedIndex].Cells["TicketIdCol"].Value); try { TicketRepository ticketRepo = new TicketRepository(); TicketResource ticketRes = ticketRepo.GetCustomerInfoBasedOnTicketId(ticketId); AlterationForm alterationForm = new AlterationForm(ticketRes); alterationForm.Show(); } catch (Exception ex) { MessageBox.Show("There was an error. Please contact Jay with this message: " + ex.Message); } //TODO ask neil which behavior he prefers //EnableButtonsBasedOnGrid(); this.Close(); }