public static void ClearTravelReport(TravelReportInfo travelReportInfo) { travelReportInfo.Clear(); if (MessageBox.Show("Clear all saved reports also?", "Clead Data", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { //Check if file exits if (isf.FileExists("TravelReportInfo.dat")) isf.DeleteFile("TravelReportInfo.dat"); } } }
public static void ClearTravelReport(TravelReportInfo travelReportInfo) { if (MessageBox.Show("Clear all saved reports also?", "Clead Data", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { travelReportInfo.Clear(); using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { //Check if file exits if (isf.FileExists("TravelReportInfo.dat")) { isf.DeleteFile("TravelReportInfo.dat"); } } } }