Пример #1
0
        public ActionResult ListadoAtencionesAdmCG()
        {
            if (isOutSession)
            {
                return(RedirectToAction("OutSession", "Login"));
            }
            else if (p.ListaFatAdmision != 2)
            {
                return(View("SinAcceso"));
            }
            FATAdminViewModel atvm = new FATAdminViewModel();

            string[] filtros = new string[5];
            int      id;

            filtros = System.Web.HttpContext.Current.Session["filtrosFATGS"] as string[];
            id      = System.Web.HttpContext.Current.Session["filtrosFATGSEstado"] as int? ?? 12;

            if (filtros != null)
            {
                ViewBag.fecinicio = filtros[0];
                ViewBag.fecfin    = filtros[1];
                ViewBag.busqueda  = filtros[2];
                ViewBag.medico    = filtros[3];
                ViewBag.espec     = filtros[4];
                ViewBag.estado    = id;
                atvm.getListaFATAdmGS(filtros[0], filtros[1], filtros[2], filtros[3], id, filtros[4]);
            }
            else
            {
                ViewBag.fecinicio = DateTime.Now.ToString("dd/MM/yyyy");
                ViewBag.fecfin    = "";
                ViewBag.busqueda  = "";
                ViewBag.medico    = "";
                ViewBag.espec     = "";
                ViewBag.estado    = id;
                atvm.getListaFATAdmGS(DateTime.Now.ToString("dd/MM/yyyy"), "", "", "", id, "");
            }
            SelectViewModel select = new SelectViewModel();

            atvm.especialidades = select.listaEspecialidadesMedicas();
            return(View(atvm));
        }
Пример #2
0
        public ActionResult BuscarAtencionGS(string fecinicio, string fecfin, string busqueda, string medico, string espec, int estado)
        {
            if (isOutSession)
            {
                return(RedirectToAction("OutSession", "Login"));
            }
            else if (p.ListaFatAdmision != 2)
            {
                return(View("SinAcceso"));
            }
            string[] filtros = new string[5] {
                fecinicio, fecfin, busqueda, medico, espec
            };
            System.Web.HttpContext.Current.Session["filtrosFATGS"]       = filtros;
            System.Web.HttpContext.Current.Session["filtrosFATGSEstado"] = estado;

            FATAdminViewModel atvm = new FATAdminViewModel();

            atvm.getListaFATAdmGS(fecinicio, fecfin, busqueda, espec, estado, medico);
            return(Json(new { list = atvm.listaAtencion }, JsonRequestBehavior.AllowGet));
        }