示例#1
0
        public static DateTime GetScheduleEndDate(WebDayView dayView)
        {
            string    srtEndDate = null;
            SmartDate endDate    = null;

            if (dayView.VisibleDays == 1)
            {
                endDate = dayView.WebScheduleInfo.ActiveDayUtc;
            }
            else if (dayView.VisibleDays == 5)
            {
                endDate = dayView.WebScheduleInfo.ActiveDayUtc.AddDays(4);
            }

            srtEndDate = string.Format("{0} 11:59:59 PM", endDate.ToShortDateString());

            return(Convert.ToDateTime(srtEndDate));
        }
示例#2
0
        public static DateTime GetScheduleEndDate(WebScheduleInfo scheduleInfo, string view)
        {
            string    endDate    = null;
            SmartDate activeDate = null;

            if (view == "day")
            {
                //endDate = string.Format("{0} 11:59:59 PM", scheduleInfo.ActiveDayUtc.ToShortDateString());
                activeDate = scheduleInfo.ActiveDayUtc;
            }
            else if (view == "days")
            {
                activeDate = scheduleInfo.ActiveDayUtc.AddDays(5);
            }
            //endDate = string.Format("{0} 11:59:59 PM", scheduleInfo.ActiveDayUtc.AddDays(5).ToShortDateString());


            endDate = string.Format("{0} 11:59:59 PM", activeDate.ToShortDateString());

            return(Convert.ToDateTime(endDate));
        }