Ejemplo n.º 1
0
 public ticket(Movie movie, Theatre theatre, Customer cust, double price, Seat seat, TicketType type, int quantity)
 {
     this.movie    = movie;
     this.theatre  = theatre;
     this.cust     = cust;
     this.price    = price;
     this.seat     = seat;
     this.type     = type;
     this.quantity = quantity;
 }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'bookingsystemDBDataSet.Employee' table. You can move, or remove it, as needed.
            this.employeeTableAdapter.Fill(this.bookingsystemDBDataSet.Employee); //loading data to fill table

            showTimeA = new DateTime(2014, 6, 7, 8, 45, 0, 0);                    //declaring date and time of the movie
            showTimeB = new DateTime(2014, 6, 7, 7, 45, 0, 0);

            theatreA = new Theatre(theatreNoA, seatsA, showTimeA); //declaring theatres
            theatreB = new Theatre(theatreNoB, seatsB, showTimeB);

            cbxGender.Items.AddRange(Enum.GetNames(typeof(Gender))); //filling the combo boxes with data(enums)
            cbxTown.Items.AddRange(Enum.GetNames(typeof(Town)));

            cbxTheatre.Items.Add(theatreA.GetInfo()); //filling the combo boxes with theatre details
            cbxTheatre.Items.Add(theatreB.GetInfo());


            this.seatTableAdapter.Fill(this.bookingsystemDBDataSet.Seat);         //loading the data to fill

            this.customerTableAdapter.Fill(this.bookingsystemDBDataSet.Customer); //loading the data to fill
            this.movieTableAdapter1.Fill(this.bookingsystemDBDataSet.Movie);
        }