public static string GetBadge(this PaymentMethod paymentMethod) { var icon = ""; switch (paymentMethod) { case PaymentMethod.Cheque: icon = "fa-money-bill-alt"; break; case PaymentMethod.Cash: icon = "fa-money-bill-alt"; break; case PaymentMethod.GoCardless: icon = "fa-university"; break; case PaymentMethod.Stripe: icon = "fa-credit-card"; break; case PaymentMethod.BankTransfer: icon = "fa-university"; break; } if (String.IsNullOrWhiteSpace(icon)) { return(string.Empty); } else { return(String.Format(@"<i title='{0}' class='fa {1}'></i>", paymentMethod.GetDescription(), icon)); } }
public void SaveDataOf(PaymentMethod paymentMethod) { description = paymentMethod.GetDescription(); }