public ShowDTO map(ShowModel showmodel) { ShowDTO dto = new ShowDTO(); dto.setID(showmodel.getID()); dto.setGenre(showmodel.getGenre()); dto.setDistribution(showmodel.getDistribution()); dto.setDate(showmodel.getDate()); dto.setNumberOfTickets(showmodel.getNumberOfTickets()); dto.setTitle(showmodel.getTitle()); return(dto); }
private void dgvTickets_SelectionChanged(object sender, EventArgs e) { if (firstRunTickets != 0) { int row = dgvTickets.CurrentCell.RowIndex; ticketID.Text = dgvTickets.Rows[row].Cells[0].Value.ToString(); showRowText.Text = dgvTickets.Rows[row].Cells[2].Value.ToString(); showSeatText.Text = dgvTickets.Rows[row].Cells[3].Value.ToString(); int showID = Convert.ToInt32(dgvTickets.Rows[row].Cells[1].Value.ToString()); ShowModel show = showServices.getShowByShowID(showID); showTitleText.Text = show.getTitle(); showDateText.Text = show.getDate().ToString(); } else { firstRunTickets++; } }