Exemple #1
0
 //Exit and save
 private void btnExit_Click(object sender, EventArgs e)
 {
     try
     {
         ClsCompany.Save();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.GetBaseException().Message);
     }
     Close();
 }
Exemple #2
0
 //sends data to new Tour object and saves the tour
 private void btnOK_Click(object sender, EventArgs e)
 {
     //check if tour code exists
     if (txtTourCode.Enabled && ClsCompany.TourList.ContainsKey(txtTourCode.Text))
     {
         MessageBox.Show("A Tour with that Code already exists", "Duplicate Code");
     }
     else
     {
         pushData();
         DialogResult = DialogResult.OK;//returns result of 1 or true
         //save
         try
         {
             ClsCompany.Save();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.GetBaseException().Message);
         }
     }
 }
Exemple #3
0
 //submit and save cost
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     ClsCompany.Save();
     Close();
 }