예제 #1
0
        protected void uiLinkButtonTicketsCC_Click(object sender, EventArgs e)
        {
            TicketInfo tickets = new TicketInfo();
            DateTime from, to;
            from = DateTime.TryParseExact(uiTextBoxFromDate.Text, "MM/dd/yyyy", null, System.Globalization.DateTimeStyles.None, out from) ? from : new DateTime(1900, 1, 1);
            to = DateTime.TryParseExact(uiTextBoxToDate.Text, "MM/dd/yyyy", null, System.Globalization.DateTimeStyles.None, out to) ? to : new DateTime(8000, 12, 31);

            tickets.RPT_GetTickets_ByCreditCardID(from, to, Convert.ToInt32( uiDropDownListCC.SelectedValue));

            uiReportViewerMain.Reset();
            uiReportViewerMain.LocalReport.ReportPath = "ReportsFiles/TotalTicketsCC.rdlc";
            uiReportViewerMain.LocalReport.DataSources.Clear();
            uiReportViewerMain.LocalReport.SetParameters(new ReportParameter("CCNumber", uiDropDownListCC.SelectedItem.Text));
            uiReportViewerMain.LocalReport.DataSources.Add(new ReportDataSource("CCDataSet", tickets.DefaultView));
            uiReportViewerMain.LocalReport.Refresh();
        }