Exemple #1
0
        public ActionResult Aprobar(GestionesAprobadas gestionesAprobadas)
        {
            ManagerUser mang = new ManagerUser();

            gestionesAprobadas.IdGestionesAprobadas = 0;
            gestionesAprobadas.ACCION     = "INSERTAR";
            gestionesAprobadas.Cod_Agente = Convert.ToString(Session["agente"]);
            return(Json(mang.MantenimientioGestionesAprobadas(gestionesAprobadas), JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public ActionResult VerGestionesAprobadas(GestionesAprobadas gestionesAprobadas)
        {
            ManagerUser        mang         = new ManagerUser();
            GestionesAprobadas _solicitudes = new GestionesAprobadas();

            _solicitudes.ListGestionesAprobadas     = new List <GestionesAprobadas>();
            gestionesAprobadas.IdGestionesAprobadas = 0;
            gestionesAprobadas.IdGestionGeneral     = 0;
            gestionesAprobadas.ACCION     = "CONSULTAR";
            gestionesAprobadas.Cod_Agente = Convert.ToString(Session["agente"]);
            var ret = mang.MantenimientioGestionesAprobadas(gestionesAprobadas);

            if (ret.Any())
            {
                _solicitudes.ListGestionesAprobadas = ret;
            }
            return(Json(_solicitudes.ListGestionesAprobadas, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public JsonResult EliminarGestionAprobada(int?id = null)
        {
            GestionesAprobadas gestionesAprobadas = new GestionesAprobadas();

            gestionesAprobadas.IdGestionesAprobadas = 0;
            gestionesAprobadas.IdSolicitud          = 0;
            gestionesAprobadas.IdGestionGeneral     = id;
            gestionesAprobadas.ACCION = "ELIMINAR";

            ManagerUser mang = new ManagerUser();

            try
            {
                mang.MantenimientioGestionesAprobadas(gestionesAprobadas);
                gestionesAprobadas.Mensaje = string.Concat("Agente N#: ", id, " Eliminado");
            }
            catch
            {
                gestionesAprobadas.Mensaje = string.Concat("Ocurrio un error al Eliminar el agente N#: ", id);
            }

            return(Json(gestionesAprobadas));
        }