Exemplo 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);;
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo n.º 4
0
 public DateTime GetBookingDate()
 {
     return(FSManager.GetDateFromSeconds(StartTime));
 }
Exemplo n.º 5
0
        public string GetCompiledStartTime()
        {
            DateTime dt = FSManager.GetDateFromSeconds(StartTime);

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