Esempio n. 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);;
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 4
0
 public int[] GetTodaysHours(DateTime dt)
 {
     return(Hours[FSManager.GetDayOfWeek(dt)]);
 }
Esempio n. 5
0
 public DateTime GetBookingDate()
 {
     return(FSManager.GetDateFromSeconds(StartTime));
 }
Esempio n. 6
0
 public int GetEndHour(DateTime dt)
 {
     return(FSManager.GetHour(EndTime, dt));
 }
Esempio n. 7
0
 public int GetStartHour(DateTime dt)
 {
     return(FSManager.GetHour(StartTime, dt));
 }
Esempio n. 8
0
        public string GetCompiledStartTime()
        {
            DateTime dt = FSManager.GetDateFromSeconds(StartTime);

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