Exemplo n.º 1
0
 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");
     }
 }
Exemplo n.º 2
0
 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");
     }
 }
Exemplo n.º 3
0
 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");
     }
 }
Exemplo n.º 4
0
 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";
     }
 }
Exemplo n.º 5
0
        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");
        }
Exemplo n.º 6
0
 void LoadFormatthienboatList()
 {
     formatList.DataSource = FormatTauDAO.GetListFormatthienboat();
 }
Exemplo n.º 7
0
 void LoadFormatthienboatIntoComboBox()
 {
     cboFormatID_Showtime.DataSource    = FormatTauDAO.GetFormatthienboat();
     cboFormatID_Showtime.DisplayMember = "ID";
 }