Beispiel #1
0
        /// <summary>
        /// 获取查询订单时间间隔下拉选项
        /// </summary>
        /// <param name="languageType">语言类型</param>
        /// <param name="excludeTimeSpanTypes">需要排除的时间间隔</param>
        /// <param name="defaulType">默认类型</param>
        /// <returns>时间间隔集合</returns>
        public static List <SelectListItem> GetLocalTimeSpanTypesInto(LanguageType languageType = LanguageType.zh_CN, int[] excludeTimeSpanTypes = null, OrderEnums.TimeSpanType defaulType = OrderEnums.TimeSpanType.HalfOfMonth)
        {
            Dictionary <int, string> timeSpanTypes = ML_TimeSpanTypes.GetLocalTimeSpanTypes(languageType);

            if (excludeTimeSpanTypes != null)
            {
                foreach (var status in excludeTimeSpanTypes)
                {
                    if (timeSpanTypes.ContainsKey(status))
                    {
                        timeSpanTypes.Remove(status);
                    }
                }
            }
            return(timeSpanTypes.Select(x => new SelectListItem()
            {
                Text = x.Value, Value = x.Key.ToString(), Selected = x.Key == (int)defaulType
            }).ToList());
        }
Beispiel #2
0
        /// <summary>
        /// 获取查询订单时间间隔下拉选项
        /// </summary>
        /// <param name="languageId">语言Id</param>
        /// <param name="excludeStatus">需要排除的时间间隔</param>
        /// <param name="defaulType">默认类型</param>
        /// <returns>时间间隔集合</returns>
        public static List <SelectListItem> GetLocalTimeSpanTypesInto(int languageId = (int)LanguageType.zh_CN, int[] excludeStatus = null, OrderEnums.TimeSpanType defaulType = OrderEnums.TimeSpanType.HalfOfMonth)
        {
            LanguageType languageType = (LanguageType)languageId;

            return(ML_TimeSpanTypes.GetLocalTimeSpanTypesInto(languageType, excludeStatus, defaulType));
        }
Beispiel #3
0
        /// <summary>
        /// 获取本地语言时间间隔集合
        /// </summary>
        /// <param name="languageId">语言Id</param>
        /// <returns>时间间隔集合</returns>
        public static Dictionary <int, string> GetLocalTimeSpanTypes(int languageId = (int)LanguageType.zh_CN)
        {
            LanguageType languageType = (LanguageType)languageId;

            return(ML_TimeSpanTypes.GetLocalTimeSpanTypes(languageType));
        }