protected void UiVistaDetallesDeOrdenesDeVenta_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            switch (e.Parameters.Split('|')[0])
            {
            case "ObtenerDetallesDeOrdenesDeVenta":
                if (UiFechaIncio.Date > UiFechaFinal.Date)
                {
                    EstablecerError("La Fecha de inicio tiene que se mayor a la fecha final", sender);
                }
                else
                {
                    UsuarioDesesaObtenerDetallesDeOrdenesDeVenta?.Invoke(sender, new OrdenDeVentaArgumento {
                        OrdenDeVentaDetalle = new OrdenDeVentaDetalle {
                            STAR_DATE = UiFechaIncio.Date, END_DATE = UiFechaFinal.Date
                        }
                    });
                }
                break;

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

            case "ContraerGrupoVistaGeneral":
                UiVistaDetallesDeOrdenesDeVenta.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);
         UiVistaDetallesDeOrdenesDeVenta.JSProperties.Add("cpLocation", "Enable");
         return;
     }
     if (!Page.IsPostBack)
     {
         UiFechaIncio.Value = DateTime.Today;
         UiFechaFinal.Value = DateTime.Today;
     }
     if (Session["UiVistaDetallesDeOrdenesDeVenta"] != null)
     {
         UiVistaDetallesDeOrdenesDeVenta.DataSource = Session["UiVistaDetallesDeOrdenesDeVenta"];
         UiVistaDetallesDeOrdenesDeVenta.DataBind();
         GenerarReporteVistaGeneral();
     }
 }