void DeleteFormat(string id) { if (FormatTauDAO.DeleteFormatthienboat(id)) { MessageBox.Show("Xóa định dạng thành công"); } else { MessageBox.Show("Xóa định dạng thất bại"); } }
void UpdateFormat(string id, string idthienboat, string idScreen) { if (FormatTauDAO.UpdateFormatthienboat(id, idthienboat, idScreen)) { MessageBox.Show("Sửa định dạng thành công"); } else { MessageBox.Show("Sửa định dạng thất bại"); } }
void InsertFormat(string id, string idthienboat, string idScreen) { if (FormatTauDAO.InsertFormatthienboat(id, idthienboat, idScreen)) { MessageBox.Show("Thêm định dạng thành công"); } else { MessageBox.Show("Thêm định dạng thất bại"); } }
private void cboFilmName_SelectedIndexChanged(object sender, EventArgs e) { if (cboFilmName.SelectedIndex != -1) { cboFormatFilm.DataSource = null; lvLichDi.Items.Clear(); Taudidto thienboat = cboFilmName.SelectedItem as Taudidto; cboFormatFilm.DataSource = FormatTauDAO.GetListFormatthienboatBythienboat(thienboat.ID); cboFormatFilm.DisplayMember = "ScreenTypeName"; } }
private void txtShowtimeID_TextChanged(object sender, EventArgs e) { #region Change selected index of ComboBox Formatthienboat string thienboatName = (string)dtgvShowtime.SelectedCells[0].OwningRow.Cells["Tên Tau"].Value; string screenTypeName = (string)dtgvShowtime.SelectedCells[0].OwningRow.Cells["Màn hình"].Value; FormatTaudto formatthienboatSelecting = FormatTauDAO.GetFormatthienboatByName(thienboatName, screenTypeName); if (formatthienboatSelecting == null) { return; } int indexFormatthienboat = -1; for (int i = 0; i < cboFormatID_Showtime.Items.Count; i++) { FormatTaudto item = cboFormatID_Showtime.Items[i] as FormatTaudto; if (item.ID == formatthienboatSelecting.ID) { indexFormatthienboat = i; break; } } cboFormatID_Showtime.SelectedIndex = indexFormatthienboat; #endregion #region Change selected index of ComboBox Cinema string cinemaID = (string)dtgvShowtime.SelectedCells[0].OwningRow.Cells["Mã phòng"].Value; Taudto cinemaSelecting = TauDAO.GetCinemaByID(cinemaID); //This is the Cinema that we're currently selecting in dtgv if (cinemaSelecting == null) { return; } int indexCinema = -1; int iCinema = 0; foreach (Taudto item in cboCinemaID_Showtime.Items) { if (item.ID == cinemaSelecting.ID) { indexCinema = iCinema; break; } iCinema++; } cboCinemaID_Showtime.SelectedIndex = indexCinema; #endregion toolTipCinema.SetToolTip(cboCinemaID_Showtime, "Danh sách phòng hỗ trợ loại phòng trên"); }
void LoadFormatthienboatList() { formatList.DataSource = FormatTauDAO.GetListFormatthienboat(); }
void LoadFormatthienboatIntoComboBox() { cboFormatID_Showtime.DataSource = FormatTauDAO.GetFormatthienboat(); cboFormatID_Showtime.DisplayMember = "ID"; }