Example #1
0
        public List <DataModel.DMEnum> GetYears()
        {
            List <DataModel.DMEnum> DE = new List <DataModel.DMEnum>();

            for (int i = 0; i <= (DateTime.Today.Year - 2018); i++)
            {
                DataModel.DMEnum DNum = new DataModel.DMEnum();
                DNum.ID  = Convert.ToInt32(DateTime.Today.AddYears(i).ToString("yyyy"));
                DNum.TXT = DateTime.Today.AddYears(i).ToString("yyyy");
                DE.Add(DNum);
            }
            return(DE);
        }
Example #2
0
        public List <DataModel.DMEnum> GetMonths()
        {
            List <DataModel.DMEnum> DE = new List <DataModel.DMEnum>();

            for (int i = 1; i <= 12; i++)
            {
                DataModel.DMEnum DNum = new DataModel.DMEnum();
                DNum.ID  = i;
                DNum.TXT = CultureInfo.CurrentCulture.DateTimeFormat.MonthNames[i - 1];
                DE.Add(DNum);
            }
            return(DE);
        }