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);
                //Response.Redirect("Login.aspx");
            }

            if (!Page.IsPostBack)
            {
                try
                {
                    ASPxDateEdit1.Date = DateTime.Now;
                    ASPxDateEdit2.Date = DateTime.Now;
                    ScriptManager.RegisterStartupScript(this, GetType(), "llamarCall", "DoCallback();", true);
                }
                catch (Exception ex)
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
                }
                //getDelivery(ASPxDateEdit2.Date, ASPxDateEdit1.Date);
            }
            try
            {
                if (Session["DS_DISEÑO_MOVEMENT"] != null)
                {
                    var reporte = new Report.ReportInventoryMovement();
                    reporte.DataSource         = Session["DS_DISEÑO_MOVEMENT"];
                    ASPxDocumentViewer1.Report = reporte;
                    ASPxDocumentViewer1.DataBind();
                }
                if (Session["DATA_MOVEMENT"] != null)
                {
                    ASPxGridView1.DataSource = Session["DATA_MOVEMENT"];

                    ASPxGridView1.DataBind();
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "llamarCall", "DoCallback();", true);
                    //getMovement(ASPxDateEdit2.Date, ASPxDateEdit1.Date);
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }
        public void ReportView()
        {
            try
            {
                if (Session["DATA_MOVEMENT"] != null)
                {
                    var dsDiseño    = new DS.dsInventoryMovement();
                    var dsEjecucion = (DataSet)Session["DATA_MOVEMENT"];

                    for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++)
                    {
                        var row = dsDiseño.SWIFT_INVENTORY_MOVEMENT.NewRow();
                        row[0]  = dsEjecucion.Tables[0].Rows[i]["TXN_ID"];
                        row[1]  = dsEjecucion.Tables[0].Rows[i]["TXN_CREATED_STAMP"];
                        row[2]  = dsEjecucion.Tables[0].Rows[i]["TXN_TYPE"];
                        row[3]  = dsEjecucion.Tables[0].Rows[i]["SKU"];
                        row[4]  = dsEjecucion.Tables[0].Rows[i]["SKU_DESCRIPTION"];
                        row[5]  = dsEjecucion.Tables[0].Rows[i]["QTY"];
                        row[6]  = dsEjecucion.Tables[0].Rows[i]["SALDO_ANTERIOR"];
                        row[7]  = dsEjecucion.Tables[0].Rows[i]["NUEVO_SALDO"];
                        row[8]  = dsEjecucion.Tables[0].Rows[i]["PALLET_ID"];
                        row[9]  = dsEjecucion.Tables[0].Rows[i]["BATCH_SUPPLIER"];
                        row[10] = (Convert.IsDBNull(dsEjecucion.Tables[0].Rows[i]["BATCH_SUPPLIER_EXPIRATION_DATE"])) ? "" : DateTime.Parse(dsEjecucion.Tables[0].Rows[i]["BATCH_SUPPLIER_EXPIRATION_DATE"].ToString()).ToString("dd/MM/yyyy");
                        dsDiseño.SWIFT_INVENTORY_MOVEMENT.Rows.Add(row);
                    }

                    var reporte = new Report.ReportInventoryMovement();
                    reporte.DataSource            = dsDiseño;
                    Session["DS_DISEÑO_MOVEMENT"] = dsDiseño;

                    ASPxDocumentViewer1.Report = reporte;
                    ASPxDocumentViewer1.DataBind();
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }