using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace ReportWeb.Source { public class LuckyCardUtils { public class Period { public const int DAILY = 1; public const int WEEKLY = 2; public const int MONTHLY = 3; } public class CodeType { public const int LUCKY_CARD = 0; public const int LUCKY_CALL = 1; } public class Status { public const int NOT_REDEEM = 0; public const int REDEEM = 1; public const int PROCESSED = 2; } public class Channel { public const int OTHERS = 0; public const int MOCHA = 1; public const int SMS = 2; public const int USSD = 3; public const int WEB = 4; } public static String ParseChannel(int channel) { switch (channel) { case Channel.MOCHA: return "MOCHA+"; case Channel.SMS: return "SMS"; case Channel.USSD: return "USSD"; case Channel.WEB: return "WEB"; case Channel.OTHERS: return "OTHERS"; default: return "UNKNOWN"; } } public static String ParsePeriod(int period) { switch (period) { case Period.DAILY: return "DAILY"; case Period.WEEKLY: return "WEEKLY"; case Period.MONTHLY: return "MONTHLY"; default: return "PROMOTION"; } } public static String ParseStatus(int status) { switch (status) { case Status.NOT_REDEEM: return "NOT_REDEEM+"; case Status.REDEEM: return "REDEEM"; case Status.PROCESSED: return "PROCESSED"; default: return "UNKNOWN"; } } } }