public void ReportViewDetalle()
        {
            try
            {
                var dsEjecucion = (DataSet)Session["dsReporte"];
                var dsDiseño    = new dsPicking();
                for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++)
                {
                    var row = dsDiseño.SWIFT_PICKING_HEADER.NewRow();
                    row[0] = Convert.ToString(Session["IDPICKING"]);
                    row[1] = dsEjecucion.Tables[0].Rows[i]["NAME_CLASSIFICATION"];
                    row[2] = dsEjecucion.Tables[0].Rows[i]["NAME_CUSTOMER"];
                    row[3] = dsEjecucion.Tables[0].Rows[i]["LOGIN"];
                    row[4] = dsEjecucion.Tables[0].Rows[i]["REFERENCE"];
                    row[5] = dsEjecucion.Tables[0].Rows[i]["DOC_SAP_RECEPTION"];
                    dsDiseño.SWIFT_PICKING_HEADER.Rows.Add(row);
                }
                for (var i = 0; i < dsEjecucion.Tables[1].Rows.Count; i++)
                {
                    var row = dsDiseño.SWIFT_PICKING.NewRow();
                    row[0] = dsEjecucion.Tables[1].Rows[i]["PICKING_DETAIL"];
                    row[1] = dsEjecucion.Tables[1].Rows[i]["CODE_SKU"];
                    row[2] = dsEjecucion.Tables[1].Rows[i]["DESCRIPTION_SKU"];
                    row[3] = dsEjecucion.Tables[1].Rows[i]["DISPATCH"];
                    row[4] = dsEjecucion.Tables[1].Rows[i]["SCANNED"];
                    row[5] = dsEjecucion.Tables[1].Rows[i]["RESULT"];
                    row[6] = dsEjecucion.Tables[1].Rows[i]["DIFFERENCE"];
                    dsDiseño.SWIFT_PICKING.Rows.Add(row);
                }

                var reporte = new Report.ReportPickingAudit {
                    DataSource = dsDiseño
                };
                Session["DSDISEÑO_PICKING_AUDIT"] = dsDiseño;
                UiReporteDetalle.DataBind();
                UiReporteDetalle.Report = reporte;
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            if (Session["DSDISEÑO_PICKING"] != null)
            {
                var reporte = new Report.ReportListPicking {
                    DataSource = Session["DSDISEÑO_PICKING"]
                };
                ASPxDocumentViewer1.Report = reporte;
                ASPxDocumentViewer1.DataBind();
            }

            if (Session["DSDISEÑO_PICKING_AUDIT"] != null)
            {
                var reporte = new Report.ReportPickingAudit {
                    DataSource = Session["DSDISEÑO_PICKING_AUDIT"]
                };
                UiReporteDetalle.Report = reporte;
                UiReporteDetalle.DataBind();
            }

            UiMenuDetalle.Items.FindByName("btnBill").ClientVisible = GeneraFactura();

            if (!Page.IsPostBack)
            {
                Session["DATOS"]        = null;
                Session["datosPicking"] = null;
                ASPxDateEdit1.Date      = DateTime.Today;
                ASPxDateEdit2.Date      = DateTime.Today;
                try
                {
                    var pResult = "";
                    var ds      = _objPicking.GetAllPicking(Session["connectionString"].ToString(), Convert.ToDateTime(ASPxDateEdit1.Date), Convert.ToDateTime(ASPxDateEdit2.Date), ref pResult);
                    if (pResult == "")
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            ASPxGridView1.DataSource = ds;
                            ASPxGridView1.DataBind();
                            Session["datosPicking"] = ds;
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
                    }
                }
                catch (Exception ex)
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
                }
            }
            if (Session["datosPicking"] != null)
            {
                ASPxGridView1.DataSource = Session["datosPicking"];
                ASPxGridView1.DataBind();
            }
            if (Session["DATOS"] != null)
            {
                DataSet dstmp = (DataSet)Session["DATOS"];

                switch (dstmp.Tables[0].Rows[0]["SCANNING_STATUS"].ToString())
                {
                case "PENDING":
                    ASPxLabel11.Text      = "Pendiente";
                    ASPxLabel11.ForeColor = System.Drawing.Color.Red;
                    break;

                case "IN_PROGRESS":
                    ASPxLabel11.Text      = "En progreso...";
                    ASPxLabel11.ForeColor = System.Drawing.Color.Yellow;
                    break;

                case "COMPLETED":
                    ASPxLabel11.Text      = "Completado";
                    ASPxLabel11.ForeColor = System.Drawing.Color.Green;
                    break;
                }

                UiVistaDetalle.DataSource = dstmp.Tables[1];
                var regionCombo = (UiVistaDetalle.Columns["CODE_SKU"] as GridViewDataComboBoxColumn);
                if (regionCombo != null)
                {
                    regionCombo.PropertiesComboBox.DataSource = dstmp.Tables[1].DefaultView.ToTable(true,
                                                                                                    "CODE_SKU");
                    regionCombo.PropertiesComboBox.ValueField = "CODE_SKU";
                    regionCombo.PropertiesComboBox.TextField  = "CODE_SKU";
                }
                UiVistaDetalle.DataBind();
            }
        }