public JsonResult GetEvents(DateTime start, DateTime end, string correotest = "")
        {
            string  correo  = string.IsNullOrEmpty(correotest)?(string)Session["correo"]: correotest;
            NEvento nEvento = new NEvento();
            var     events  = new List <EventModel>();

            events = nEvento.listaEventos(new EventModel()
            {
                email = correo
            });
            start = DateTime.Today.AddDays(-14);
            end   = DateTime.Today.AddDays(-11);
            return(Json(events.ToArray(), JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult GetEvents(DateTime start, DateTime end, string correotest = "")
        {
            string  correo  = string.IsNullOrEmpty(correotest) ? (string)HttpContext.Session.GetString("correo") : correotest;
            NEvento nEvento = new NEvento();
            var     events  = new List <EventModel>();

            events = nEvento.listaEventos(new EventModel()
            {
                email = correo
            });
            start = DateTime.Today.AddDays(-14);
            end   = DateTime.Today.AddDays(-11);
            HttpContext.Session.SetString("correo", correo);
            return(Json(events.ToArray()));
        }