//Edits Selected Tour private void btnEdit_Click(object sender, EventArgs e) { ClsTour lcTour = (ClsTour)lstTours.SelectedItem; editTour(lcTour); ClsCompany.Save(); }
//-------------------------------------END OF DECLARING OBJECTS AND VARIABLES------------------------------- // // // // //-------------------------------------LOADING METHODS---------------------------------------------------- public FrmTourLists() { InitializeComponent(); try { ClsCompany.Retrive(); } catch { } cbxSortBy.DataSource = _Sort; cbxSortBy.SelectedIndex = 0; updateDisplay(); }
//-------------------------------------END OF LOADING METHODS---------------------------------------------- // // // // //-------------------------------------BUTTON METHODS---------------------------------------------------- //Adds New Tour private void btnAdd_Click(object sender, EventArgs e) { _Tour = new ClsTour(); if (_Tour != null && _Tour.VeiwEdit()) { ClsCompany.TourList.Add(Convert.ToString(_Tour.TravelID), _Tour); updateDisplay(); ClsCompany.Save(); } }
//Deletes Selected Tour private void btnDelete_Click(object sender, EventArgs e) { deleteTour(); ClsCompany.Save(); }