Exemple #1
0
        /// <summary>
        /// This method returns a WeekDay (Custom class) Generic List of week days which can be used for DropDownLists and such
        /// </summary>
        /// <returns></returns>
        public static List <WeekDay> WeekDaysAsGenericCollection()
        {
            List <WeekDay> result = new List <WeekDay>();

            WeekDay tempDay = new WeekDay();

            tempDay.DayValue = "1";
            tempDay.DayName  = "Monday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "2";
            tempDay.DayName  = "Tuesday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "3";
            tempDay.DayName  = "Wednesday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "4";
            tempDay.DayName  = "Thursday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "5";
            tempDay.DayName  = "Friday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "6";
            tempDay.DayName  = "Saturday";
            result.Add(tempDay);

            tempDay          = new WeekDay();
            tempDay.DayValue = "7";
            tempDay.DayName  = "Sunday";
            result.Add(tempDay);

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// This method returns a WeekDay (Custom class) Generic List of week days which can be used for DropDownLists and such
        /// </summary>
        /// <returns></returns>
        public static List<WeekDay> WeekDaysAsGenericCollection()
        {
            List<WeekDay> result = new List<WeekDay>();

            WeekDay tempDay = new WeekDay();
            tempDay.DayValue = "1";
            tempDay.DayName = "Monday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "2";
            tempDay.DayName = "Tuesday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "3";
            tempDay.DayName = "Wednesday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "4";
            tempDay.DayName = "Thursday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "5";
            tempDay.DayName = "Friday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "6";
            tempDay.DayName = "Saturday";
            result.Add(tempDay);

            tempDay = new WeekDay();
            tempDay.DayValue = "7";
            tempDay.DayName = "Sunday";
            result.Add(tempDay);

            return result;
        }