private static void AddToResultList(ICurrency denom, TillResult tillResult, List <TillMoney> resultList) { var denominationPulled = new TillMoney { Name = denom.Name, Val = tillResult.Result, PluralName = denom.PluralName }; resultList.Add(denominationPulled); }
public static int GetNumberOfCurrencyImages(TillMoney money) { var imgNum = 0; var val = money.Val; if ((int)val < 0) { return(imgNum); } imgNum = (int)val; return(imgNum); }
public static string GetPathameOfCurrencyImage(TillMoney money) { var pathname = ""; if (money == null) { return(pathname); } var name = money.Name; var pluralName = money.PluralName; var sb = new StringBuilder("~/images/", 21); sb.Append(money.Val <= 4 ? name.ToString() : pluralName.ToString()).Append(".png"); pathname = sb.ToString(); return(pathname); }