コード例 #1
0
        //Edits Selected Tour
        private void btnEdit_Click(object sender, EventArgs e)
        {
            ClsTour lcTour = (ClsTour)lstTours.SelectedItem;

            editTour(lcTour);
            ClsCompany.Save();
        }
コード例 #2
0
        //-------------------------------------END OF DECLARING OBJECTS AND VARIABLES-------------------------------
        //
        //
        //
        //
        //-------------------------------------LOADING METHODS----------------------------------------------------


        public FrmTourLists()
        {
            InitializeComponent();
            try { ClsCompany.Retrive(); }
            catch { }
            cbxSortBy.DataSource    = _Sort;
            cbxSortBy.SelectedIndex = 0;
            updateDisplay();
        }
コード例 #3
0
        //-------------------------------------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();
            }
        }
コード例 #4
0
 //Deletes Selected Tour
 private void btnDelete_Click(object sender, EventArgs e)
 {
     deleteTour();
     ClsCompany.Save();
 }