private void DisplaySaveAccountInfo() { bool saveAccountInfo = false; saveAccountInfo = _consoleView.DisplaySaveAccountInfo(_salesperson); if (saveAccountInfo) { XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); xmlServices.WriteSalespersonToDataFile(_salesperson); _consoleView.DisplayConfirmSaveAccountInfo(); } }
/// <summary> /// display save account information /// </summary> private void DisplaySaveAccountInfo() { bool maxAttemptsExceeded = false; bool saveAccountInfo = false; saveAccountInfo = _consoleView.DisplaySaveAccountInfo(_salesperson, out maxAttemptsExceeded); if (saveAccountInfo && !maxAttemptsExceeded) { //CsvServices csvServices = new CsvServices(DataSettings.dataFilePathCsv); XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); //csvServices.WriteSalespersonToDataFile(_salesperson); xmlServices.WriteSalespersonToDataFile(_salesperson); _consoleView.DisplayConfirmSaveAccountInfo(); } }
public void SeedDataFile() { XmlServices xmlService = new XmlServices(DataSettings.dataFilePathXml); xmlService.WriteSalespersonToDataFile(InitializeSalesperson()); }