public void ReportView() { try { if (Session["DATA_CONSOLIDATED_INVENTORY"] != null) { var reporte = new Report.ReportConsolidatedInventory { DataSource = (ASPxGridView1.DataSource), DataMember = ((DataSet)ASPxGridView1.DataSource).Tables[0].TableName }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } /*try * { * if (Session["DATA_CONSOLIDATED_INVENTORY"] != null) * { * var dsDiseño = new dsConsolidatedInventory(); * var dsEjecucion = (DataSet)Session["DATA_CONSOLIDATED_INVENTORY"]; * * for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) * { * var row = dsDiseño.SWIFT_CONSOLIDATED_INVENTORY.NewRow(); * row[0] = dsEjecucion.Tables[0].Rows[i]["SERIAL_NUMBER"]; * row[1] = dsEjecucion.Tables[0].Rows[i]["SKU"]; * row[2] = dsEjecucion.Tables[0].Rows[i]["DESCRIPTION_SKU"]; * row[3] = dsEjecucion.Tables[0].Rows[i]["ON_HAND"]; * dsDiseño.SWIFT_CONSOLIDATED_INVENTORY.Rows.Add(row); * } * * var reporte = new Report.ReportConsolidatedInventory {DataSource = dsDiseño}; * Session["DSDISEÑO_CONSOLIDATED_INVENTORY"] = dsDiseño; * * ASPxDocumentViewer1.Report = reporte; * ASPxDocumentViewer1.DataBind(); * } * } * 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 (!Page.IsPostBack) { try { ASPxDateEdit1.Date = DateTime.Now; ASPxDateEdit2.Date = DateTime.Now; GetLocationInventory(ASPxDateEdit2.Date, ASPxDateEdit1.Date); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } } try { if (Session["DSDISEÑO_CONSOLIDATED_INVENTORY"] != null) { var reporte = new Report.ReportConsolidatedInventory { DataSource = Session["DSDISEÑO_CONSOLIDATED_INVENTORY"] }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } if (Session["DATA_CONSOLIDATED_INVENTORY"] != null) { GetLocationInventory(ASPxDateEdit2.Date, ASPxDateEdit1.Date); } if (Session["SKU_HIST"] == null) { return; } ASPxGridView2.DataSource = Session["SKU_HIST"]; ASPxGridView2.DataBind(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }