protected void UiVistaPerformanceDeRuta_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            switch (e.Parameters.Split('|')[0])
            {
            case "ObtenerPerformanceDeRuta":

                if (UiFechaFinal.Date < UiFechaDeInicio.Date)
                {
                    UiVistaPerformanceDeRuta.JSProperties.Add("cpError", "La fecha final es mayor a fecha final");
                }
                else
                {
                    var ruta = new Ruta
                    {
                        STAR_DATE  = UiFechaDeInicio.Date,
                        END_DATE   = UiFechaFinal.Date,
                        CODE_ROUTE = ObtenerRutasSeleccionadas()
                    };
                    UsuarioDeseaObtenerPerformanceDeRuta?.Invoke(sender, new RutaArgumento {
                        Data = ruta
                    });
                }
                break;

            case "ExpandirGrupoVistaGeneral":
                UiVistaPerformanceDeRuta.ExpandAll();
                break;

            case "ContraerGrupoVistaGeneral":
                UiVistaPerformanceDeRuta.CollapseAll();
                break;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     if (Session["connectionString"] == null || Session["USER"] == null)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "Logoff", "LogOff();", true);
         UiVistaPerformanceDeRuta.JSProperties.Add("cpLocation", "Enable");
         return;
     }
     if (Session["UiVistaPerformanceDeRuta"] != null)
     {
         UiVistaPerformanceDeRuta.DataSource = Session["UiVistaPerformanceDeRuta"];
         UiVistaPerformanceDeRuta.DataBind();
         GenerarReporteVistaGeneral();
     }
     if (Session["UiListaRuta"] != null)
     {
         UiListaRuta.DataSource = Session["UiListaRuta"];
         UiListaRuta.DataBind();
     }
 }