Ejemplo n.º 1
0
        private void btnSearchTWS_Click(object sender, EventArgs e)
        {
            switch (typeSearchTWS)
            {
            case 1:
            {
                dgvListSold.DataSource = TicketWasSold_BUS.FindTWSByIdMovie(keySearchTWS.Text.ToString());
                break;
            }

            case 2:
            {
                dgvListSold.DataSource = TicketWasSold_BUS.FindTWSByNameMovie(keySearchTWS.Text.ToString());
                break;
            }

            case 3:
            {
                dgvListSold.DataSource = TicketWasSold_BUS.FindTWSByIdRoom(keySearchTWS.Text.ToString());
                break;
            }

            case 4:
            {
                dgvListSold.DataSource = TicketWasSold_BUS.FindTWSByIdShowtime(keySearchTWS.Text.ToString());
                break;
            }

            default:
            {
                MessageBox.Show("Error!", "Search ticket was sold", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                break;
            }
            }
        }
Ejemplo n.º 2
0
 private void btnSold_Click(object sender, EventArgs e)
 {
     foreach (string a in SeatScreen.seat)
     {
         string            idm  = SeatScreen.show["IDMovie"].ToString();
         string            name = SeatScreen.show["Name"].ToString();
         string            idr  = SeatScreen.show["IDRoom"].ToString();
         string            ids  = SeatScreen.show["IDShowtime"].ToString();
         string            tt   = ticket;
         string            pos  = a;
         string            time = SeatScreen.show["Time1"].ToString();
         string            day  = SeatScreen.show["Day1"].ToString();
         TicketWasSold_DTO sold = new TicketWasSold_DTO(idm, name, idr, ids, tt, pos, time, day);
         TicketWasSold_BUS.SellTicket(sold);
         this.Close();
     }
 }
Ejemplo n.º 3
0
 private void btnSellTicket_Click(object sender, EventArgs e)
 {
     if (gridShow.RowCount > 0)
     {
         DataRow row = gridShow.GetDataRow(gridShow.GetSelectedRows()[0]);
         SeatScreen.show = row;
         SeatScreen seat = new SeatScreen();
         dgvTicketSell.DataSource = TicketWasSold_BUS.seatWasTaken(row["IDShowtime"].ToString());
         List <string> list = new List <string>();
         for (int i = 0; i < grid.RowCount; i++)
         {
             list.Add(grid.GetDataRow(i)[0].ToString());
         }
         SeatScreen.seatWasTaken = list;
         seat.ShowDialog();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Ejemplo n.º 4
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     dgvListSold.DataSource = TicketWasSold_BUS.ListTWS();
 }
Ejemplo n.º 5
0
 private void ListSold_Load(object sender, EventArgs e)
 {
     dgvListSold.DataSource = TicketWasSold_BUS.ListTWS();
 }