示例#1
0
        //makes a new booking
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            //points to the fact that we're making a new booking, and not editing one
            instance.CurrentBooking = 0;
            //opens the booking window, then closes this one
            WindowBooking booking = new WindowBooking();

            booking.Show();
            this.Close();
        }
示例#2
0
 //opens the booking window for editing a booking, when a booking is double clicked
 private void dgridBookings_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dgridBookings.SelectedIndex != -1)
     {
         //gets the booking to be edited
         var currBooking = dgridBookings.SelectedItem as Booking;
         //stores it's refference number for easy finding in the booking window
         instance.CurrentBooking = currBooking.BookingRefference;
         WindowBooking booking = new WindowBooking();
         booking.Show();
         this.Close();
     }
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.bookingWindow = ((NapierHoliday.WindowBooking)(target));
                return;

            case 2:
                this.gboxGuest = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 3:
                this.lblDisplay = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.dateArrival = ((System.Windows.Controls.DatePicker)(target));

            #line 17 "..\..\WindowBooking.xaml"
                this.dateArrival.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.dateArrival_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.dateDeparture = ((System.Windows.Controls.DatePicker)(target));

            #line 20 "..\..\WindowBooking.xaml"
                this.dateDeparture.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.dateDeparture_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.comboChaletNo = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 7:
                this.btnCheck = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\WindowBooking.xaml"
                this.btnCheck.Click += new System.Windows.RoutedEventHandler(this.btnCheck_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.comboGuests = ((System.Windows.Controls.ComboBox)(target));

            #line 36 "..\..\WindowBooking.xaml"
                this.comboGuests.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboGuests_SelectionChanged);

            #line default
            #line hidden
                return;

            case 9:
                this.chkBreakfast = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 10:
                this.chkCar = ((System.Windows.Controls.CheckBox)(target));

            #line 46 "..\..\WindowBooking.xaml"
                this.chkCar.Checked += new System.Windows.RoutedEventHandler(this.chkCar_Checked);

            #line default
            #line hidden

            #line 46 "..\..\WindowBooking.xaml"
                this.chkCar.Unchecked += new System.Windows.RoutedEventHandler(this.chkCar_Unchecked);

            #line default
            #line hidden
                return;

            case 11:
                this.chkEvening = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 12:
                this.lblGName = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.lblGPassport = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.lblGAge = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.txtGName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 16:
                this.txtGPassport = ((System.Windows.Controls.TextBox)(target));
                return;

            case 17:
                this.txtGAge = ((System.Windows.Controls.TextBox)(target));
                return;

            case 18:
                this.btnAddGuest = ((System.Windows.Controls.Button)(target));

            #line 54 "..\..\WindowBooking.xaml"
                this.btnAddGuest.Click += new System.Windows.RoutedEventHandler(this.btnAddGuest_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.btnChangeGuest = ((System.Windows.Controls.Button)(target));

            #line 55 "..\..\WindowBooking.xaml"
                this.btnChangeGuest.Click += new System.Windows.RoutedEventHandler(this.btnChangeGuest_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.btnRemGuest = ((System.Windows.Controls.Button)(target));

            #line 56 "..\..\WindowBooking.xaml"
                this.btnRemGuest.Click += new System.Windows.RoutedEventHandler(this.btnRemGuest_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.btnSave = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\WindowBooking.xaml"
                this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.gridGuests = ((System.Windows.Controls.DataGrid)(target));

            #line 58 "..\..\WindowBooking.xaml"
                this.gridGuests.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.gridGuests_SelectionChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.btnTotal = ((System.Windows.Controls.Button)(target));

            #line 64 "..\..\WindowBooking.xaml"
                this.btnTotal.Click += new System.Windows.RoutedEventHandler(this.btnTotal_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.txtPrice = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.btnCancel = ((System.Windows.Controls.Button)(target));

            #line 66 "..\..\WindowBooking.xaml"
                this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.carHireGroup = ((System.Windows.Controls.Grid)(target));
                return;

            case 27:
                this.grpHire = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 28:
                this.txtDriver = ((System.Windows.Controls.TextBox)(target));
                return;

            case 29:
                this.dateStart = ((System.Windows.Controls.DatePicker)(target));

            #line 71 "..\..\WindowBooking.xaml"
                this.dateStart.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.dateStart_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 30:
                this.dateEnd = ((System.Windows.Controls.DatePicker)(target));

            #line 72 "..\..\WindowBooking.xaml"
                this.dateEnd.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.dateEnd_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 31:
                this.lblStart = ((System.Windows.Controls.Label)(target));
                return;

            case 32:
                this.lblEnd = ((System.Windows.Controls.Label)(target));
                return;

            case 33:
                this.lblDriver = ((System.Windows.Controls.Label)(target));
                return;

            case 34:
                this.btnConfirm = ((System.Windows.Controls.Button)(target));

            #line 76 "..\..\WindowBooking.xaml"
                this.btnConfirm.Click += new System.Windows.RoutedEventHandler(this.btnConfirm_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }