Ejemplo n.º 1
0
        public JsonResult getTakenTimes(int officeID = 1, int month = 6, int year = 2016)
        {
            string jsonTimes;
            var    jsonSerialiser = new JavaScriptSerializer();

            try
            {
                List <string> times = UtilityOrder.getTakenTimesByMonthYear(officeID, month, year);
                jsonSerialiser = new JavaScriptSerializer();
                jsonTimes      = jsonSerialiser.Serialize(times);
            }
            catch (ArgumentException e)
            {
                jsonTimes = jsonSerialiser.Serialize(e);// "[{\"erorr\":\"" + e.ToString() + "\"}]";
            }

            return(Json(jsonTimes, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns all times that are in specified month and year for specific provider
 /// </summary>
 /// <param name="month">specify month that times will be taken from</param>
 /// <param name="year">specify year that times will be taken from</param>
 /// <returns>Set of strings where strings are in format DD_HH:MM</returns>
 public List <string> getTakenTimesList(int month = 6, int year = 2016)
 {
     return(UtilityOrder.getTakenTimesByMonthYear(OfficeID, month, year));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns all times that are in specified day, month and year for specific provider
 /// </summary>
 /// <param name="month">specify month that times will be taken from</param>
 /// <param name="year">specify year that times will be taken from</param>
 /// <param name="day">specify day that times will be taken from</param>
 /// <returns>Set of strings where strings are in format DD_HH:MM</returns>
 public List <string> getTakenTimesListDay(int day = 1, int month = 6, int year = 2016)
 {
     return(UtilityOrder.getTakenTimesByMonthYearDay(currentOffice.ID, month, year, day));
 }