private void DisplaySaveAccountInfo() { bool maxAtemptsExceeded = false; bool saveAccountInfo = false; saveAccountInfo = _consoleView.DisplaySaveAccountInfo(_salesperson, out maxAtemptsExceeded); if (saveAccountInfo && !maxAtemptsExceeded) { XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); xmlServices.WriteSalespersonToDataFile(_salesperson); _consoleView.DisplayConfirmSaveAccountInfo(); } }
private void DisplayLoadAccountInfo() { bool maxAtemptsExceeded = false; bool loadAccountInfo = false; if (_salesperson.AccountID != "") { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(_salesperson, out maxAtemptsExceeded); } else { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(out maxAtemptsExceeded); } if (true) { XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); _salesperson = xmlServices.ReadSalespersonFromDataFile(); _consoleView.DisplayConfirmLoadAccountInfo(_salesperson); } }
public static void SeedDataFile() { XmlServices xmlService = new XmlServices(DataSettings.dataFilePathXml); xmlService.WriteSalespersonToDataFile(InitializeSalesperson()); }