コード例 #1
0
        public static ListItem GetListItem(ECashType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
コード例 #2
0
 public static bool Equals(ECashType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
コード例 #3
0
 public static string GetText(ECashType type)
 {
     if (type == ECashType.Consume)
     {
         return("消费");
     }
     else if (type == ECashType.Recharge)
     {
         return("充值");
     }
     else if (type == ECashType.Exchange)
     {
         return("兑换");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #4
0
 public static string GetValue(ECashType type)
 {
     if (type == ECashType.Consume)
     {
         return("Consume");
     }
     else if (type == ECashType.Recharge)
     {
         return("Recharge");
     }
     else if (type == ECashType.Exchange)
     {
         return("Exchange");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #5
0
ファイル: CardCashLogDAO.cs プロジェクト: yankaics/cms-1
        public string GetSelectString(int publishmentSystemID, ECashType cashType, int cardID, string cardSN, string userName, string mobile)
        {
            string whereString =
                $"WHERE {CardCashLogAttribute.PublishmentSystemID} = {publishmentSystemID} AND {CardCashLogAttribute.CashType}='{cashType}'";

            if (cardID > 0)
            {
                whereString += $" AND {CardCashLogAttribute.CardID}={cardID}";
            }
            if (!string.IsNullOrEmpty(cardSN))
            {
                whereString += $" AND {CardCashLogAttribute.CardSNID} IN (SELECT ID FROM wx_CardSN WHERE SN='{cardSN}')";
            }
            if (!string.IsNullOrEmpty(userName))
            {
                whereString += $" AND {CardCashLogAttribute.UserName}='{PageUtils.FilterSql(userName)}'";
            }
            if (!string.IsNullOrEmpty(mobile))
            {
                whereString +=
                    $" AND {CardCashLogAttribute.UserName} IN (SELECT UserName FROM bairong_Users WHERE Mobile='{PageUtils.FilterSql(mobile)}')";
            }
            return(BaiRongDataProvider.TableStructureDao.GetSelectSqlString(TABLE_NAME, SqlUtils.Asterisk, whereString));
        }
コード例 #6
0
 public static bool Equals(string typeStr, ECashType type)
 {
     return(Equals(type, typeStr));
 }