Ejemplo n.º 1
0
 /// <summary>
 /// constructor for the add passenger window
 /// </summary>
 public wndAddPassenger(clsUILogic uILogic)
 {
     try
     {
         InitializeComponent();
         this.uILogic = uILogic;
     }
     catch (Exception ex)
     {
         throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message);
     }
 }
Ejemplo n.º 2
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();
                Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;

                UILogic = new clsUILogic();

                List <clsFlightsObject> flights = UILogic.listOfFlightMethod();

                cbChooseFlight.ItemsSource = flights;
                colorSeats();
            }
            catch (Exception ex)
            {
                HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                            MethodInfo.GetCurrentMethod().Name, ex.Message);
            }
        }
Ejemplo n.º 3
0
 private void cmdAddPassenger_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         wndAddPass = new wndAddPassenger(UILogic);
         wndAddPass.ShowDialog();
         UILogic = wndAddPass.uILogic;
         if (UILogic.bNewPassangerAdded)
         {
             cbChooseFlight.IsEnabled     = false;
             cbChoosePassenger.IsEnabled  = false;
             cmdAddPassenger.IsEnabled    = false;
             cmdChangeSeat.IsEnabled      = false;
             cmdDeletePassenger.IsEnabled = false;
         }
     }
     catch (Exception ex)
     {
         HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                     MethodInfo.GetCurrentMethod().Name, ex.Message);
     }
 }