Exemple #1
0
        public static IList<CommonModels> genYearList()
        {
            IList<CommonModels> result = new List<CommonModels>();

            for (int i = 1900; i <= DateTime.Now.Year; i++)
            {
                CommonModels obj = new CommonModels();
                obj.key = i.ToString(); ;
                obj.value = i.ToString(); ;
                result.Add(obj);
            }

            return result;
        }
Exemple #2
0
        public static IList<CommonModels> genMonthList()
        {
            IList<CommonModels> result = new List<CommonModels>();

            for (int i = 1; i <= 12; i++)
            {
                string temp = "";
                if (i < 10)
                {
                    temp = "0" + i.ToString();
                }
                else
                {
                    temp = i.ToString();
                }
                CommonModels obj = new CommonModels();
                obj.key = temp;
                obj.value = temp;
                result.Add(obj);
            }

            return result;
        }