public Listado ( string Campos, string Condicion, string Orden ) : |
||
Campos | string | |
Condicion | string | |
Orden | string | |
리턴 |
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Egresos egreso = new Egresos(); EgresosReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; EgresosReportViewer.Reset(); EgresosReportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Rpts/EgresosRpt.rdlc"); EgresosReportViewer.LocalReport.DataSources.Clear(); EgresosReportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("EgresosDataSet", egreso.Listado(" * ", "1=1", ""))); EgresosReportViewer.LocalReport.Refresh(); } }
protected void ConsultaBuscarButton_Click(object sender, EventArgs e) { Egresos egreso = new Egresos(); DataTable dataTable = new DataTable(); string condicion; if (DatosTextBox.Text.Trim().Length == 0) { condicion = "1=1"; } else { condicion = ElementosDropDownList.SelectedItem.Text + " = " + DatosTextBox.Text; } dataTable = egreso.Listado(" * ", condicion, ""); ElementosGridView.DataSource = dataTable; ElementosGridView.DataBind(); }
public void ListadoTest() { Egresos egreso = new Egresos(); Assert.IsTrue(egreso.Listado(" * ", "1=1", "").Rows.Count > 0); }