示例#1
0
        public ActionResult Mantener(int id = 0)
        {
            ViewBag.cboUsuario  = new SelectList(UsuarioBL.Listar(null, x => x.OrderByDescending(y => y.Id)), "Id", "Denominacion");
            ViewBag.cboServicio = new SelectList(ServicioBL.Listar(null, x => x.OrderByDescending(y => y.Id)), "Id", "Denominacion");

            ViewBag.cboBloque   = new SelectList(BloqueBL.Listar(), "Id", "Denominacion");
            ViewBag.cboUsuario  = new SelectList(UsuarioBL.Listar(), "Id", "NombreCompleto");
            ViewBag.cboServicio = new SelectList(ServicioBL.Listar(), "Id", "Denominacion");

            if (id == 0)
            {
                return(View(new Datos.Ventanilla()
                {
                }));
            }

            else
            {
                return(View(VentanillaBL.Obtener(id)));
            }
        }
示例#2
0
        public ActionResult Atender(int colaId, int ventanillaId, int servicioId, int bloqueId, bool atendido)
        {
            ColaVentanillaBL.Crear(new ColaVentanilla {
                Fecha        = DateTime.Now,
                ColaId       = colaId,
                VentanillaId = ventanillaId,
                IndAtendido  = atendido
            });

            var v = VentanillaBL.Obtener(ventanillaId);
            var c = ColaBL.Obtener(colaId);

            TvBL.Crear(new Tv {
                BloqueId     = bloqueId,
                Denominacion = c.Codigo + " -- " + v.Denominacion,
                Fecha        = DateTime.Now
            });

            ColaBL.ActualizarParcial(new Cola {
                Id = colaId, IndAtendido = true
            }, x => x.IndAtendido);
            //return Json(true, JsonRequestBehavior.AllowGet);
            return(ObtenerNroCola(servicioId, ventanillaId));
        }
示例#3
0
        public ActionResult Index()
        {
            var uid = Comun.SessionHelper.GetUser();

            return(View(VentanillaBL.Obtener(x => x.UsuarioId == uid, includeProperties: "Servicio")));
        }