/// <summary> /// insansiates all classes and adds objects to the both comboboxes /// </summary> public MainWindow() { try { InitializeComponent(); Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; SQL = new SQLQueries(); gDbI = new GetDBInfo(); //gVars = new GlobalVariables(); DataSet ds = new DataSet(); changeSeatMode = false; //Adding an Actual object to the combobox to make it easier to access various properties List <Flight> flightList = gDbI.flightInfoList(); foreach (Flight flt in flightList) { cbChooseFlight.Items.Add(flt); } } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
/// <summary> /// constructor for the add passenger window, instansiating objects /// </summary> public wndAddPassenger() { try { InitializeComponent(); cDA = new clsDataAccess(); sql = new SQLQueries(); gDbI = new GetDBInfo(); //clear textboxes each time the window is open txtLastName.Clear(); txtFirstName.Clear(); } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }