public void ReportView() { try { if (Session["DATA_RECEPTION"] != null) { var dsDiseño = new dsListReceptions(); var dsEjecucion = (DataSet)Session["DATA_RECEPTION"]; for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) { var row = dsDiseño.SWIFT_RECEPTION_HEADER.NewRow(); row[0] = dsEjecucion.Tables[0].Rows[i]["#Recepcion"]; row[1] = dsEjecucion.Tables[0].Rows[i]["FECHA"]; row[2] = dsEjecucion.Tables[0].Rows[i]["PROVEEDOR"]; row[3] = dsEjecucion.Tables[0].Rows[i]["OPERADOR_RESPOSABLE"]; row[4] = dsEjecucion.Tables[0].Rows[i]["ESTATUS"]; dsDiseño.SWIFT_RECEPTION_HEADER.Rows.Add(row); } var reporte = new Report.ReportListReception { DataSource = dsDiseño }; Session["DSDISEÑO_RECEPTION"] = 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 { Session["DATA_RECEPTION"] = null; ASPxDateEdit1.Date = DateTime.Now; ASPxDateEdit2.Date = DateTime.Now; //Carga en el GridView var pResult = ""; var ds = _objIncome.GetAllIncome(Session["connectionString"].ToString(), Convert.ToDateTime(ASPxDateEdit2.Date), Convert.ToDateTime(ASPxDateEdit1.Date), ref pResult); if (pResult == "") { if (ds.Tables[0].Rows.Count > 0) { ASPxGridView1.DataSource = ds; ASPxGridView1.DataBind(); Session["DATA_RECEPTION"] = ds; } } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } } try { if (Session["DSDISEÑO_RECEPTION"] != null) { var reporte = new Report.ReportListReception { DataSource = Session["DSDISEÑO_RECEPTION"] }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } if (Session["DATA_RECEPTION"] != null) { ASPxGridView1.DataSource = Session["DATA_RECEPTION"]; ASPxGridView1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void ReportView() { try { if (Session["DATA_LOCATION_INVENTORY"] != null) { var dsDiseño = new dsLocationInventory(); var dsEjecucion = (DataSet)Session["DATA_LOCATION_INVENTORY"]; for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) { var row = dsDiseño.SWIFT_LOCATION_INVENTORY.NewRow(); row[0] = dsEjecucion.Tables[0].Rows[i]["SERIAL_NUMBER"]; row[1] = dsEjecucion.Tables[0].Rows[i]["WAREHOUSE"]; row[2] = dsEjecucion.Tables[0].Rows[i]["LOCATION"]; row[3] = dsEjecucion.Tables[0].Rows[i]["SKU"]; row[4] = dsEjecucion.Tables[0].Rows[i]["DESCRIPTION_SKU"]; row[5] = dsEjecucion.Tables[0].Rows[i]["ON_HAND"]; row[6] = dsEjecucion.Tables[0].Rows[i]["BATCH"]; row[7] = dsEjecucion.Tables[0].Rows[i]["EXP_DATE"]; row[8] = dsEjecucion.Tables[0].Rows[i]["EXPIRACION"]; dsDiseño.SWIFT_LOCATION_INVENTORY.Rows.Add(row); } var reporte = new Report.ReportListReception { DataSource = dsDiseño }; Session["DSDISEÑO_LOCATION_INVENTORY"] = dsDiseño; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }