Exemple #1
0
        public JsonResult GetById(int id)
        {
            try
            {
                var response = ResponseAgenda.Build(_agendaRepository.GetById(id));

                return(Json(new { response }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Response.StatusCode = 500;
                return(Json(new { }, JsonRequestBehavior.AllowGet));
            }
        }
Exemple #2
0
        public JsonResult GetListSchedule(int id)
        {
            try
            {
                var list = ResponseAgenda.BuildList(_agendaRepository.GetListByDayWeek(id));

                return(Json(new { list }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Response.StatusCode = 500;
                return(Json(new { }, JsonRequestBehavior.AllowGet));
            }
        }