Example #1
0
        private void EditTour()
        {
            ClsTour lcTour = (ClsTour)LbTours.SelectedItem;

            if (lcTour != null && lcTour.ViewEdit())
            {
                UpdateDisplay();
                ClsCompany.SaveTours();
            }
        }
Example #2
0
        private void BtnAddTour_Click(object sender, EventArgs e)
        {
            ClsTour lcTour = new ClsTour();

            if (lcTour != null && lcTour.ViewEdit())
            {
                ClsCompany.TourList.Add(lcTour.TourCode, lcTour);
                UpdateDisplay();
                ClsCompany.SaveTours();
            }
        }
Example #3
0
 private void FrmTourTable_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         ClsCompany.SaveTours();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.GetBaseException().Message);
         e.Cancel = true;
     }
 }
Example #4
0
 public FrmTourTable()
 {
     InitializeComponent();
     CbSortBy.DataSource    = ClsCompany.SortByType;
     CbSortBy.SelectedIndex = 0;
     try
     {
         ClsCompany.RetrieveTours();
     }
     catch (Exception)
     {
         MessageBox.Show("If this is your first time opening this program, ignore this message.", "No Save File Loaded");
     }
     UpdateDisplay();
     TmrAutoSave.Start();
 }
Example #5
0
 private void BtnQuit_Click(object sender, EventArgs e)
 {
     ClsCompany.SaveTours();
     Application.Exit();
 }
Example #6
0
 private void TmrAutoSave_Tick(object sender, EventArgs e)
 {
     ClsCompany.SaveTours();
 }