/// <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 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); }