/// <summary> /// Get the withdrawal information from the user. /// </summary> /// <returns></returns> private decimal GetWithdrawal() { _srw.WriteString(string.Format(Prompt.EnterWithdrawal, Validation.WithdrawalMax)); var withdrawal = _srw.ReadString(); var success = decimal.TryParse(withdrawal, out var d) && d <Validation.WithdrawalMax && d> Validation.WithdrawalMin; var message = success ? string.Format(Validation.WithdrawalSuccess, d.ToString(FormatString.CurrencyFormat)) : string.Format(ErrorString.WithdrawalEntry, Validation.WithdrawalMax.ToString(FormatString.CurrencyFormat), Validation.WithdrawalMin.ToString(FormatString.CurrencyFormat)); _srw.DisplayMessageWithDelay(message); return(d); }
protected string GetResponse() { return(_srw.ReadString()); }
/// <summary> /// Get the name from the user. /// </summary> /// <returns></returns> private string GetNameFromUser() { _srw.WriteString(Prompt.EnterUserName); return(_srw.ReadString()); }