コード例 #1
0
        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));
            }
        }
コード例 #2
0
 public void SaveDataOf(PaymentMethod paymentMethod)
 {
     description = paymentMethod.GetDescription();
 }
コード例 #3
0
 public void SaveDataOf(PaymentMethod paymentMethod)
 {
     description = paymentMethod.GetDescription();
 }