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