Beispiel #1
0
        private void btnEditTicket_Click(object sender, EventArgs e)
        {
            string         id     = idTicket.Text;
            string         cdt    = cdtTicket.Text;
            string         price  = priceTicket.Text;
            TicketType_DTO ticket = new TicketType_DTO(id, cdt, price);

            TicketType_BUS.EditTicketType(ticket);
        }
Beispiel #2
0
        private void btnAddType_Click(object sender, EventArgs e)
        {
            string id        = idAddTicketType.Text;
            string condition = conditionAddTicketType.Text;
            string price     = priceAddTicketType.Text;

            TicketType_DTO ticket = new TicketType_DTO(id, condition, price);

            TicketType_BUS.AddTicketType(ticket);
            MessageBox.Show("Complete!", "Add TicketType", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            this.Close();
        }
Beispiel #3
0
 private void btnEditTOT_Click(object sender, EventArgs e)
 {
     if (gridTOT.RowCount > 0)
     {
         DataRow row = gridTOT.GetDataRow(gridTOT.GetSelectedRows()[0]);
         EditTicketType.oldInfo = row;
         EditTicketType edit = new EditTicketType();
         edit.ShowDialog();
         dgvListTOT.DataSource = TicketType_BUS.ListTicketType();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Beispiel #4
0
 private void SeatScreen_Load(object sender, EventArgs e)
 {
     foreach (Control a in this.Controls)
     {
         foreach (string b in seatWasTaken)
         {
             if ((a is Button) && (b.Substring(0, 2) == a.Text))
             {
                 a.Enabled   = false;
                 a.BackColor = Color.Gray;
             }
         }
     }
     name.Text             = show["Name"].ToString();
     time.Text             = show["Time1"].ToString();
     day.Text              = show["Day1"].ToString().Substring(0, 10);
     ticketType.DataSource = TicketType_BUS.ListTicketType();
 }
Beispiel #5
0
 private void btnDeleteTOT_Click(object sender, EventArgs e)
 {
     if (gridTOT.RowCount > 0)
     {
         DataRow      row          = gridTOT.GetDataRow(gridTOT.GetSelectedRows()[0]);
         DialogResult dialogResult = MessageBox.Show("Are you sure?", "Delete ticket", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             TicketType_BUS.DeleteTicketType(row["IDTicket"].ToString());
             MessageBox.Show("Ticket was deleted", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         }
         dgvListTOT.DataSource = TicketType_BUS.ListTicketType();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Beispiel #6
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     dgvListTOT.DataSource = TicketType_BUS.ListTicketType();
 }
Beispiel #7
0
 private void Types_of_ticket_Load(object sender, EventArgs e)
 {
     dgvListTOT.DataSource = TicketType_BUS.ListTicketType();
 }
Beispiel #8
0
 private void btnSearchTOT_Click(object sender, EventArgs e)
 {
     dgvListTOT.DataSource = TicketType_BUS.FindTicketType(searchTOT.Text.ToString());
 }