// ============btnClose form==========================// private void btnClose_Click(object sender, EventArgs e) { ClsTourCompany.Save(); MessageBox.Show("Are you sure you want to close?"); Close(); }
//==========Serialize=====Save=======Retrieve===========//Usecase Save,Retrive private void frmMain_Load(object sender, EventArgs e) { try { ClsTourCompany.Retrieve(); updateDisplay(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }