public void LoadCB_Theather() { if (txt_cinema.Text != null && txt_moviename.Text != "") { CinemaApprovalService cinemaApprovalService = new CinemaApprovalService(); datasettheather = cinemaApprovalService.gettheatherdata(datasettheather, txt_cinema.Text, txt_class.Text, txt_moviename.Text); cb_theather.DataSource = datasettheather.Tables[0]; cb_theather.DisplayMember = "Theather"; } }
private void btn_reject_Click(object sender, EventArgs e) { bool DialogDel = MessageBox.Show("Are you sure to Reject this Data", "DELETE", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes; if (DialogDel) { CinemaApprovalService cinemaApprovalService = new CinemaApprovalService(); string bookingid = dgv_CinemaApproval.SelectedRows[0].Cells["cinema_bookid"].Value.ToString(); cinemaApprovalService.rejectdata(bookingid); DisplaysTable(); clearall(); LoadCB_Theather(); } }
public void DisplaysTable() { try { CinemaApprovalService cinemaApprovalService = new CinemaApprovalService(); dt = cinemaApprovalService.getrequestdata(); dgv_CinemaApproval.DataSource = null; dgv_CinemaApproval.Columns.Clear(); dgv_CinemaApproval.DataSource = dt; dgv_CinemaApproval.AllowUserToAddRows = false; dgv_CinemaApproval.ReadOnly = true; } catch (Exception ex) { MessageBox.Show("ERROR!!! : " + ex.Message.ToString()); } }