예제 #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);
        }
예제 #2
0
파일: DateTimeHelper.cs 프로젝트: dtafe/vnr
        /// <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;
        }