コード例 #1
0
        protected void _exportar(object sender, EventArgs e)
        {
            USERNAME = Request.QueryString["USUARIO"].ToString();
            ROWSGXID = Request.QueryString["LOCALIDAD"].ToString();

            this.xQueryParameters.Clear();
            this.xQueryValues.Clear();
            this.xQueryParameters.Add((object)"@ROWSGXID");
            this.xQueryValues.Add((object)this.ROWSGXID);
            this.xQueryParameters.Add((object)"@FECHA1");
            this.xQueryValues.Add(Convert.ToDateTime(txtDesde.Value));
            this.xQueryParameters.Add((object)"@FECHA2");
            this.xQueryValues.Add(Convert.ToDateTime(txtHasta.Value));

            this.xQuery = "PR_ESTADISTICAS_DIAGNOSTICOXRANGOEDAD";
            dtconsulta  = DB.ExecuteAdapter(this.xQuery, this.xQueryParameters, this.xQueryValues, CommandType.StoredProcedure);

            if (dtconsulta.Rows.Count != 0)
            {
                this.rpData.DataSource = dtconsulta;
                this.rpData.DataBind();
                Comunes.ExportToExcel(this, dtconsulta, @"DiagnosticoxRangodeEdades.xls"); //C:\Users\user\Downloads\
            }
        }
コード例 #2
0
        protected void _exportar(object sender, EventArgs e)
        {
            //USERNAME = Request.QueryString["USUARIO"].ToString();
            ROWSGXID = Request.QueryString["LOCALIDAD"].ToString();

            this.xQueryParameters.Clear();
            this.xQueryValues.Clear();
            this.xQueryParameters.Add((object)"@ROWSGXID");
            this.xQueryValues.Add((object)this.ROWSGXID);
            this.xQueryParameters.Add((object)"@FECHA1");
            this.xQueryValues.Add(Convert.ToDateTime(txtDesde.Value));
            this.xQueryParameters.Add((object)"@FECHA2");
            this.xQueryValues.Add(Convert.ToDateTime(txtHasta.Value));

            this.xQuery = "PR_FACTURACIONPORSUBSIDIO";
            dtconsulta  = DB.ExecuteAdapter(this.xQuery, this.xQueryParameters, this.xQueryValues, CommandType.StoredProcedure);

            if (dtconsulta.Rows.Count != 0)
            {
                this.rpData.DataSource = dtconsulta;
                this.rpData.DataBind();
                Comunes.ExportToExcel(this, dtconsulta, @"FacturacionPxSubsidiados.xls"); //C:\Users\user\Downloads\
            }
        }