예제 #1
0
        public string BookingStartStopTime()
        {
            int    s            = FSManager.GetDateFromSeconds(StartTime).Hour;
            int    e            = FSManager.GetDateFromSeconds(EndTime).Hour;
            string startHourStr = s + " AM";
            string endHourStr   = e + " AM";

            if (s > 11)
            {
                startHourStr = s + " PM";
                if (s > 12)
                {
                    startHourStr = (s - 12) + " PM";
                }
            }
            if (e > 11)
            {
                endHourStr = e + " PM";
                if (e > 12)
                {
                    endHourStr = (e - 12) + " PM";
                }
            }
            return(startHourStr + " - " + endHourStr);;
        }
예제 #2
0
        public string BookingDay()
        {
            string output = "";
            long   tdy    = FSManager.GetSeconds(DateTime.Now);

            if (FSManager.CheckDateWithinWeek(tdy, StartTime))
            {
                int today = FSManager.GetDayOfWeek(DateTime.Now);
                int b     = FSManager.GetDayOfWeek(FSManager.GetDateFromSeconds(StartTime));
                if (today == b)
                {
                    output = "TODAY";
                }
                else if (b == (today + 1))
                {
                    output = "TOMORROW";
                }
                else
                {
                    output = FSManager.GetDateFromSeconds(StartTime).DayOfWeek.ToString();
                }
            }
            else
            {
                // Just post date
                DateTime dt = FSManager.GetDateFromSeconds(StartTime);
                output = dt.Month + "-" + dt.Day;
            }
            return(output);
        }
예제 #3
0
        public string BookingDescription()
        {
            DateTime dtStart = FSManager.GetDateFromSeconds(StartTime);
            DateTime dtEnd   = FSManager.GetDateFromSeconds(EndTime);

            string startHour = dtStart.ToString("hh:mm tt");
            string endHour   = dtEnd.ToString("hh:mm tt");

            string s = "Name: " + Name + Environment.NewLine +
                       "Sim: " + SimName + Environment.NewLine +
                       "Run Time: " + startHour + " - " + endHour;

            Console.WriteLine("Desc: " + s + Environment.NewLine + "Start: " + dtStart.TimeOfDay + " End: " + dtEnd.TimeOfDay);
            return(s);
        }
예제 #4
0
 public int[] GetTodaysHours(DateTime dt)
 {
     return(Hours[FSManager.GetDayOfWeek(dt)]);
 }
예제 #5
0
 public DateTime GetBookingDate()
 {
     return(FSManager.GetDateFromSeconds(StartTime));
 }
예제 #6
0
 public int GetEndHour(DateTime dt)
 {
     return(FSManager.GetHour(EndTime, dt));
 }
예제 #7
0
 public int GetStartHour(DateTime dt)
 {
     return(FSManager.GetHour(StartTime, dt));
 }
예제 #8
0
        public string GetCompiledStartTime()
        {
            DateTime dt = FSManager.GetDateFromSeconds(StartTime);

            return(dt.Hour + ":" + dt.Minute + ":00");
        }