/// <summary> /// display load account information /// </summary> private void DisplayLoadAccountInfo() { bool maxAttemptsExceeded = false; bool loadAccountInfo = false; // // note: rather than pass null value, method is overloaded // if (_salesperson.AccountID != "") { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(_salesperson, out maxAttemptsExceeded); } else { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(out maxAttemptsExceeded); } if (loadAccountInfo && !maxAttemptsExceeded) { //CsvServices csvServices = new CsvServices(DataSettings.dataFilePathCsv); XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); //_salesperson = csvServices.ReadSalespersonFromDataFile(); _salesperson = xmlServices.ReadSalespersonFromDataFile(); _consoleView.DisplayConfirmLoadAccountInfo(_salesperson); } }
private void ReadAccountInfo() { bool active; active = _consoleView.DisplayLoadAccountInfo(out bool attempted, _jsonService.ReadJsonFile()); if (active) { _salesperson = _jsonService.ReadJsonFile(); _consoleView.DisplayConfirmLoadAccountInfo(_salesperson); _salesperson.Logs.Push(DateTime.Now + " ... Account Information Loaded!"); } }
private void DisplayLoadAccountInfo() { bool loadAccountInfo = false; if (_salesperson.AccountID != "") { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(); } else { loadAccountInfo = _consoleView.DisplayLoadAccountInfo(); } if (loadAccountInfo) { XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); _salesperson = xmlServices.ReadSalespersonFromDataFile(); _consoleView.DisplayConfirmLoadAccountInfo(_salesperson); } }
private void DisplayLoadAccountInfo() { bool maxAttemptsExceeded = false; bool loadAccountInfo = false; /*if (_salesperson.AccountID != "") * { * loadAccountInfo = _consoleView.DisplayLoadAccountInfo(_salesperson, out maxAttemptsExceeded); * } * else * { * loadAccountInfo = _consoleView.DisplayLoadAccountInfo(out maxAttemptsExceeded); * } * if (loadAccountInfo && maxAttemptsExceeded) */ XmlServices xmlServices = new XmlServices(DataSettings.dataFilePathXml); xmlServices.ReadSalespersonFromDataFile(); _consoleView.DisplayConfirmLoadAccountInfo(_salesperson); }