Esempio n. 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)));
            }
        }
Esempio n. 2
0
        public ActionResult Guardar(Datos.Ventanilla ventanilla, string activo)
        {
            var rm = new Comun.ResponseModel();

            try
            {
                if (ventanilla.Id == 0)
                {
                    VentanillaBL.Crear(ventanilla);
                }
                else
                {
                    VentanillaBL.ActualizarParcial(ventanilla, x => x.Denominacion, x => x.UsuarioId, x => x.ServicioId);
                }
                rm.SetResponse(true);
                rm.href = Url.Action("Index", "Ventanilla");
            }
            catch (Exception ex)
            {
                rm.SetResponse(false, ex.Message);
            }
            return(Json(rm, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
        public ActionResult Index()
        {
            var uid = Comun.SessionHelper.GetUser();

            return(View(VentanillaBL.Obtener(x => x.UsuarioId == uid, includeProperties: "Servicio")));
        }
Esempio n. 5
0
 // GET: Ventanilla
 public ActionResult Index()
 {
     return(View(VentanillaBL.Listar(includeProperties: "Bloque,Usuario,Servicio")));
 }