Esempio n. 1
0
        private void EditTour()
        {
            ClsTour lcTour = (ClsTour)LbTours.SelectedItem;

            if (lcTour != null && lcTour.ViewEdit())
            {
                UpdateDisplay();
                ClsCompany.SaveTours();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 3
0
 private void FrmTourTable_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         ClsCompany.SaveTours();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.GetBaseException().Message);
         e.Cancel = true;
     }
 }
Esempio n. 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();
 }
Esempio n. 5
0
 private void BtnQuit_Click(object sender, EventArgs e)
 {
     ClsCompany.SaveTours();
     Application.Exit();
 }
Esempio n. 6
0
 private void TmrAutoSave_Tick(object sender, EventArgs e)
 {
     ClsCompany.SaveTours();
 }