Exemplo n.º 1
0
        /// <summary>
        /// 通过号源有效期枚举获取号源有效期名称
        /// </summary>
        /// <param name="em"></param>
        /// <returns></returns>
        public static string EnumQueueSourceValidTime_GetSourceValidTimeNameByEnum(EnumQueueSourceValidTime em)
        {
            var sourceValidTimeName = "";

            switch (em)
            {
            case EnumQueueSourceValidTime.DefaultSetting:
                sourceValidTimeName = "默认系统配置";
                break;

            case EnumQueueSourceValidTime.SevenDays:
                sourceValidTimeName = "7天";
                break;

            case EnumQueueSourceValidTime.FourteenDays:
                sourceValidTimeName = "14天";
                break;

            case EnumQueueSourceValidTime.OneMonth:
                sourceValidTimeName = "1个月";
                break;

            case EnumQueueSourceValidTime.TwoMonths:
                sourceValidTimeName = "2个月";
                break;
            }
            return(sourceValidTimeName);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通过号源有效期枚举获取号源有效期代码
        /// </summary>
        /// <param name="em"></param>
        /// <returns></returns>
        public static int EnumQueueSourceValidTime_GetSourceValidTimeCodeByEnum(EnumQueueSourceValidTime em)
        {
            var sourceValidTimeCode = 0;

            switch (em)
            {
            case EnumQueueSourceValidTime.DefaultSetting:
                sourceValidTimeCode = 0;
                break;

            case EnumQueueSourceValidTime.SevenDays:
                sourceValidTimeCode = 1;
                break;

            case EnumQueueSourceValidTime.FourteenDays:
                sourceValidTimeCode = 2;
                break;

            case EnumQueueSourceValidTime.OneMonth:
                sourceValidTimeCode = 3;
                break;

            case EnumQueueSourceValidTime.TwoMonths:
                sourceValidTimeCode = 4;
                break;
            }
            return(sourceValidTimeCode);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 通过号源有效期名称获取号源有效期枚举
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static EnumQueueSourceValidTime EnumQueueSourceValidTime_GetSourceValidTimeEnumByName(string name)
        {
            var sourceValidTimeEnum = new EnumQueueSourceValidTime();

            switch (name)
            {
            case "默认系统配置":
                sourceValidTimeEnum = EnumQueueSourceValidTime.DefaultSetting;
                break;

            case "7天":
                sourceValidTimeEnum = EnumQueueSourceValidTime.SevenDays;
                break;

            case "14天":
                sourceValidTimeEnum = EnumQueueSourceValidTime.FourteenDays;
                break;

            case "1个月":
                sourceValidTimeEnum = EnumQueueSourceValidTime.OneMonth;
                break;

            case "2个月":
                sourceValidTimeEnum = EnumQueueSourceValidTime.TwoMonths;
                break;
            }
            return(sourceValidTimeEnum);
        }