protected void rgModificacionesPendientes_NeedDataSource1(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            List <SPE_OBTIENE_MODIFICACIONES_PENDIENTES_Result> ListaModificacionesPendientes = new List <SPE_OBTIENE_MODIFICACIONES_PENDIENTES_Result>();
            MenuNegocio negocio = new MenuNegocio();

            ListaModificacionesPendientes          = negocio.ObtenerModificacionePendientes(vIdEmpleado, null, "Pendiente", null);
            grdModificacionesPendientes.DataSource = ListaModificacionesPendientes;

            vCantidadPendientes = ListaModificacionesPendientes.Count();
            if (ListaModificacionesPendientes.Count() > 0)
            {
                divModificacionesPendientes.Visible = true;
                if (vCantidadPendientes <= 9)
                {
                    lblPendientesM.Text = "0" + vCantidadPendientes.ToString();
                }
                else
                {
                    lblPendientesM.Text = vCantidadPendientes.ToString();
                }
            }
            else
            {
                divModificacionesPendientes.Visible = false;
            }
        }
        protected void grdNotificacionesdPendientes_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            List <SPE_OBTIENE_NOTIFICACIONES_PENDIENTES_Result> ListaNotificacionesPendientes = new List <SPE_OBTIENE_NOTIFICACIONES_PENDIENTES_Result>();
            MenuNegocio negocio = new MenuNegocio();

            ListaNotificacionesPendientes           = negocio.ObtenerNotificacionesPendientes(ContextoUsuario.oUsuario.CL_USUARIO, null, "Pendiente");
            grdNotificacionesdPendientes.DataSource = ListaNotificacionesPendientes;
            vCantidadPendientes = ListaNotificacionesPendientes.Count();
            if (ListaNotificacionesPendientes.Count() > 0)
            {
                divNotificacionesPendientes.Visible = true;
                if (vCantidadPendientes <= 9)
                {
                    lblPendientesN.Text = "0" + vCantidadPendientes.ToString();
                }
                else
                {
                    lblPendientesN.Text = vCantidadPendientes.ToString();
                }
            }
            else
            {
                divNotificacionesPendientes.Visible = false;
            }
        }
Beispiel #3
0
        public ActionResult Lista()
        {
            menuN = new MenuNegocio();
            List <menu> menuE = new List <menu>();

            menuE = menuN.listarMenu();
            return(View(menuE));
        }
        protected void grdNotificaciones_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            List <SPE_OBTIENE_NOTIFICACIONES_A_RRHH_Result> ListaNotificacionesRRHH = new List <SPE_OBTIENE_NOTIFICACIONES_A_RRHH_Result>();
            MenuNegocio negocio = new MenuNegocio();

            ListaNotificacionesRRHH          = negocio.ObtenerNotificacionesRRHH(ContextoUsuario.oUsuario.CL_USUARIO, null);
            grdNotificacionesRRHH.DataSource = ListaNotificacionesRRHH;
        }
        protected void rgdComunicadosLeidos_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            List <SPE_OBTIENE_K_COMUNICADO_EMPLEADO_Result> ListaComunicadosLeidos = new List <SPE_OBTIENE_K_COMUNICADO_EMPLEADO_Result>();
            MenuNegocio negocio = new MenuNegocio();

            ListaComunicadosLeidos          = negocio.ObtenerComunicadoEmpleado(ContextoUsuario.oUsuario.CL_USUARIO.ToString(), true);
            rgdComunicadosLeidos.DataSource = ListaComunicadosLeidos;
        }
Beispiel #6
0
        public PartialViewResult recargarMenuLeft()
        {
            CatalogoIndexModelView modelo  = new CatalogoIndexModelView();
            MenuNegocio            objMenu = new MenuNegocio();

            modelo.ClasificacionPrincipalMenu = objMenu.ListarClasificaionesPrincipales();

            return(PartialView("ClasificacionPrincipalMenu", modelo.ClasificacionPrincipalMenu));
        }
        protected void grdModificacionesInformacion_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            List <SPE_OBTIENE_MODIFICACIONES_INFORMACION_EMPLEADO_Result> ListaModificacionesInformacion = new List <SPE_OBTIENE_MODIFICACIONES_INFORMACION_EMPLEADO_Result>();
            MenuNegocio negocio = new MenuNegocio();

            ListaModificacionesInformacion = negocio.ObtenerComunicadoModificacionesEmpleado(ContextoUsuario.oUsuario.CL_USUARIO);

            grdmodificacionesinformacion.DataSource = ListaModificacionesInformacion;
        }
Beispiel #8
0
        public ActionResult Index()
        {
            CatalogoIndexModelView modelo  = new CatalogoIndexModelView();
            MenuNegocio            objMenu = new MenuNegocio();

            modelo.ClasificacionPrincipalMenu = objMenu.ListarClasificaionesPrincipales();
            modelo.Top10Menu            = objMenu.ListarTop10(FuncionesGenerales.UtcToMexCentral());
            modelo.NuevosMaterialesMenu = objMenu.NuevosMateriales();
            return(View(modelo));
        }
        // GET: Catalogo
        //[OutputCache(Duration = 30)]
        public ActionResult Index()
        {
            CatalogoIndexModelView modelo      = new CatalogoIndexModelView();
            CatalogoNegocio        objCatalogo = new CatalogoNegocio();
            MenuNegocio            objMenu     = new MenuNegocio();

            //modelo.Libros = objCatalogo.listarCatalogoPorSPPaginado(10, 1);
            modelo.ClasificacionPrincipalMenu = objMenu.ListarClasificaionesPrincipales();
            modelo.Top10Menu            = objMenu.ListarTop10(FuncionesVB.FuncionesGenerales.Takoma_UTCToMexCentral().AddDays(-40));
            modelo.NuevosMaterialesMenu = objMenu.NuevosMateriales();

            return(View(modelo));
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vIdEmpleado = ContextoUsuario.oUsuario.ID_EMPLEADO_PDE.ToString();
            vNbPrograma = ContextoUsuario.nbPrograma;
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;

            if (!IsPostBack)
            {
                ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio();
                if (Request.Params["IdArchivo"] != null || Request.Params["IdArchivo"] != "")
                {
                    vIdArchivos = int.Parse(Request.Params["IdArchivo"]);
                    List <SPE_OBTIENE_ARCHIVOS_PDE_Result> ListaArchivos = new List <SPE_OBTIENE_ARCHIVOS_PDE_Result>();
                    MenuNegocio nego = new MenuNegocio();
                    ListaArchivos = nego.ObtenerArchivos(vIdArchivos);
                    foreach (SPE_OBTIENE_ARCHIVOS_PDE_Result item in ListaArchivos)
                    {
                        vNombreArchivo = item.NB_ARCHIVO;
                        archivo        = item.FI_ARCHIVO;
                    }

                    MemoryStream memoryStream = new MemoryStream();
                    string       tipo;
                    if (vNombreArchivo.Contains(".pdf"))
                    {
                        ArchivoAdjunto.Visible = false;
                        tipo = Response.ContentType = "application/pdf";
                        Response.ClearHeaders();
                        Response.ClearContent();
                        Response.Charset = "";
                        Response.AddHeader("Content-Type", tipo);
                        memoryStream.Write(archivo, 0, archivo.Length);
                        memoryStream.WriteTo(Response.OutputStream);
                        Response.Flush();
                        Response.Close();
                        Response.End();
                    }
                    else if (vNombreArchivo.Contains(".jpg"))
                    {
                        ArchivoAdjunto.Visible = true;
                        Response.ContentType   = "image/jpg";
                        memoryStream.Write(archivo, 0, archivo.Length);
                        Bitmap bit = new Bitmap(memoryStream);
                        bit.Save(Response.OutputStream, ImageFormat.Jpeg);
                    }
                    else if (vNombreArchivo.Contains(".png"))
                    {
                        ArchivoAdjunto.Visible = true;
                        Response.ContentType   = "image/png";
                        memoryStream.Write(archivo, 0, archivo.Length);
                        Bitmap bit = new Bitmap(memoryStream);
                        bit.Save(Response.OutputStream, ImageFormat.Jpeg);
                    }
                    else if (vNombreArchivo.Contains(".jpeg"))
                    {
                        ArchivoAdjunto.Visible = true;
                        Response.ContentType   = "image/jpeg"; memoryStream.Write(archivo, 0, archivo.Length);
                        Bitmap bit = new Bitmap(memoryStream);
                        bit.Save(Response.OutputStream, ImageFormat.Jpeg);
                    }
                    else
                    {
                        Response.ContentType = "application/octet-stream";
                        Response.AddHeader("Content-Length", archivo.Length.ToString());
                        Response.AddHeader("Content-Disposition", String.Format("filename={0}", vNombreArchivo));
                        Response.BinaryWrite(archivo);
                        Response.Flush();
                        Response.End();
                    }
                }
            }
        }
Beispiel #11
0
        public IEnumerable <menu> GetMst_Menu()
        {
            MenuNegocio menuN = new MenuNegocio();

            return(menuN.listarMenu());
        }
Beispiel #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vIdEmpleado = ContextoUsuario.oUsuario.CL_USUARIO.ToString();
            vNbPrograma = ContextoUsuario.nbPrograma;
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;

            if (!IsPostBack)
            {
                ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio();
                var notificacion = negocio.ObtenerNotificaciones();
                parseNotificarConfiguracion(notificacion);
                if (vConfiguracionesNotificacion != null)
                {
                    XElement notificaciones = XElement.Parse(vConfiguracionesNotificacion.FirstOrDefault().XML_INSTRUCCION);
                    DeserializarDocumentoAutorizar(notificaciones);
                    if (vNotificacionAdministrar != null)
                    {
                        //pIns.InnerHtml = vNotificacionAdministrar.DS_INSTRUCCION.ToString();
                        pIns.Text = vNotificacionAdministrar.DS_INSTRUCCION.ToString();
                    }
                }


                if (Request.Params["pIdNotificacion"] != null)
                {
                    vIdNotificacion  = int.Parse(Request.Params["pIdNotificacion"]);
                    vBotonesVisibles = (Request.Params["pBotonesVisbles"]);
                    List <SPE_OBTIENE_NOTIFICACIONES_PENDIENTES_Result> ListaNotificacionesPendientes = new List <SPE_OBTIENE_NOTIFICACIONES_PENDIENTES_Result>();
                    MenuNegocio nego = new MenuNegocio();
                    vIdArchivo = 0;
                    ListaNotificacionesPendientes = nego.ObtenerNotificacionesPendientes(ContextoUsuario.oUsuario.CL_USUARIO, vIdNotificacion, null);
                    foreach (SPE_OBTIENE_NOTIFICACIONES_PENDIENTES_Result item in ListaNotificacionesPendientes)
                    {
                        txtAsunto.Text            = item.NB_ASUNTO;
                        lblNotificacion.InnerHtml = item.DS_NOTIFICACION;
                        archivo             = item.FI_ARCHIVO;
                        vTipoArchivo        = item.NB_ARCHIVO;
                        vStatusNotificacion = item.CL_ESTADO;
                        vComentario         = item.DS_COMENTARIO;
                        if (item.ID_ARCHIVO_PDE != null)
                        {
                            vIdArchivo = (int)item.ID_ARCHIVO_PDE;
                        }
                        else
                        {
                            vIdArchivo = (int)0;
                        }
                    }

                    if (archivo == null)
                    {
                        ArchivoAdjunto.Visible = false;
                    }
                    else
                    {
                        ArchivoAdjunto.Visible = true;
                    }

                    if (vBotonesVisibles == "true")
                    {
                        btnAutorizar.Visible = true;
                        btnRechazar.Visible  = true;
                        rcbleido.Visible     = true;
                        if (vStatusNotificacion == "En revisión")
                        {
                            rcbleido.Checked = true;
                        }
                    }
                    else
                    {
                        if (vStatusNotificacion == "Autorizada")
                        {
                            btnRerponder.Visible     = false;
                            lblFinComentario.Visible = true;
                            lblFinComentario.Text    = "Petición autorizada: " + vComentario;
                        }
                        else if (vStatusNotificacion == "Rechazada")
                        {
                            btnRerponder.Visible     = false;
                            lblFinComentario.Visible = true;
                            lblFinComentario.Text    = "Peticion rechazada: " + vComentario;
                        }

                        btnAutorizar.Visible = false;
                        btnRechazar.Visible  = false;
                        rcbleido.Visible     = false;
                    }

                    rlvComentarios.Rebind();
                }
            }
        }
Beispiel #13
0
        protected void rlvComentarios_NeedDataSource(object sender, Telerik.Web.UI.RadListViewNeedDataSourceEventArgs e)
        {
            MenuNegocio nConfiguracion = new MenuNegocio();

            rlvComentarios.DataSource = nConfiguracion.ObtenerComentariosNotificaciones(null, vIdNotificacion);
        }
 public ActionResult Lista()
 {
     menuN = new MenuNegocio();
     return(View(menuN.listarMenu()));
 }
Beispiel #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vIdEmpleado = ContextoUsuario.oUsuario.ID_EMPLEADO_PDE.ToString();
            vNbPrograma = ContextoUsuario.nbPrograma;
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;

            if (!IsPostBack)
            {
                ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio();
                if (Request.Params["IdArchivo"] != null)
                {
                    vIdArchivos = int.Parse(Request.Params["IdArchivo"]);
                    List <SPE_OBTIENE_ARCHIVOS_PDE_Result> ListaArchivos = new List <SPE_OBTIENE_ARCHIVOS_PDE_Result>();
                    MenuNegocio nego = new MenuNegocio();
                    ListaArchivos = nego.ObtenerArchivos(vIdArchivos);
                    foreach (SPE_OBTIENE_ARCHIVOS_PDE_Result item in ListaArchivos)
                    {
                        vNombreArchivo = item.NB_ARCHIVO;
                        archivo        = item.FI_ARCHIVO;
                    }


                    MemoryStream memoryStream = new MemoryStream();


                    if (vNombreArchivo.Contains(".mp3"))
                    {
                        rmpVideo.Visible = true;
                        var          url      = HttpContext.Current.Server.MapPath("~") + "\\App_Data\\RadUploadTemp\\";
                        var          filename = vNombreArchivo;
                        var          urlfile  = Path.Combine(url, filename);
                        MemoryStream ms       = new MemoryStream(archivo);
                        FileStream   file     = new FileStream(urlfile, FileMode.Create, FileAccess.Write);
                        ms.WriteTo(file);
                        file.Close();
                        ms.Close();
                        rmpVideo.Source = "../App_Data/RadUploadTemp/" + filename;
                    }
                    else if (vNombreArchivo.Contains(".mp4"))
                    {
                        //RadMediaPlayer player = new RadMediaPlayer();
                        rmpVideo.Visible = true;
                        // ArchivoAdjunto.Visible = false;
                        // var url = HttpContext.Current.Request.Url.Authority;
                        var url = HttpContext.Current.Server.MapPath("~") + "\\App_Data\\RadUploadTemp\\";
                        // string ruta = url + "\\App_Data\\" + vNombreArchivo + DateTime.Now;
                        //var result = Path.GetTempPath();
                        // var url = HttpContext.Current.Request.Url.Authority;
                        //var filename = vNombreArchivo;
                        //var urlfile = Path.Combine(result, filename);
                        var          filename = vNombreArchivo;
                        var          urlfile  = Path.Combine(url, filename);
                        MemoryStream ms       = new MemoryStream(archivo);
                        FileStream   file     = new FileStream(urlfile, FileMode.Create, FileAccess.Write);
                        ms.WriteTo(file);
                        file.Close();
                        ms.Close();
                        rmpVideo.Source = "../App_Data/RadUploadTemp/" + filename;
                        //MediaPlayerSource mpSource = new MediaPlayerSource();
                        //mpSource.Path = urlfile;
                        //player.Sources.Add(mpSource);
                        //player.StartVolume = 90;
                        //player.OnClientReady = "playerReady";
                        ////player.FullScreen = true;
                        //player.HDActive = true;
                        //player.VolumeButtonToolTip = "Zvuk";
                        //player.FullScreenButtonToolTip = "Veći ekran";
                        //player.Skin = "Metro";
                        //FileStream fileStream = File.Create("C:\\", (int)archivo.Length);
                        //// Initialize the bytes array with the stream length and then fill it with data
                        // byte[] bytesInStream = new byte[archivo.Length];
                        //archivo.Read(bytesInStream, 0, bytesInStream.Length);
                        //// Use write method to write to the file specified above
                        //fileStream.Write(bytesInStream, 0, bytesInStream.Length);
                    }
                    else if (vNombreArchivo.Contains(".avi"))
                    {
                        rmpVideo.Visible = true;
                        var          url      = HttpContext.Current.Server.MapPath("~") + "\\App_Data\\RadUploadTemp\\";
                        var          filename = vNombreArchivo;
                        var          urlfile  = Path.Combine(url, filename);
                        MemoryStream ms       = new MemoryStream(archivo);
                        FileStream   file     = new FileStream(urlfile, FileMode.Create, FileAccess.Write);
                        ms.WriteTo(file);
                        file.Close();
                        ms.Close();
                        rmpVideo.Source = "../App_Data/RadUploadTemp/" + filename;
                    }
                    else if (vNombreArchivo.Contains(".mov"))
                    {
                        rmpVideo.Visible = true;
                        var          url      = HttpContext.Current.Server.MapPath("~") + "\\App_Data\\RadUploadTemp\\";
                        var          filename = vNombreArchivo;
                        var          urlfile  = Path.Combine(url, filename);
                        MemoryStream ms       = new MemoryStream(archivo);
                        FileStream   file     = new FileStream(urlfile, FileMode.Create, FileAccess.Write);
                        ms.WriteTo(file);
                        file.Close();
                        ms.Close();
                        rmpVideo.Source = "../App_Data/RadUploadTemp/" + filename;
                    }

                    //memoryStream.Write(archivo, 0, archivo.Length);
                    //Bitmap bit = new Bitmap(memoryStream);
                    //bit.Save(Response.OutputStream, ImageFormat.Jpeg);
                }
            }
        }