Exemple #1
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string selectedServer = "";
            string date;

            if (this.ServerListFilterComboBox.SelectedIndex >= 0)
            {
                selectedServer = this.ServerListFilterComboBox.SelectedItem.Value.ToString();
            }
            if (this.DateParamEdit.Text == "")
            {
                date = DateTime.Now.ToString();
            }
            else
            {
                date = this.DateParamEdit.Value.ToString();
            }
            DateTime dt = Convert.ToDateTime(date);

            DashboardReports.SrvAvailabilityXtraRpt report = new DashboardReports.SrvAvailabilityXtraRpt();
            report.Parameters["DateM"].Value      = dt.Month;
            report.Parameters["DateY"].Value      = dt.Year;
            report.Parameters["ServerName"].Value = selectedServer;
            this.ReportViewer1.Report             = report;
            this.ReportViewer1.DataBind();
        }
Exemple #2
0
        protected void ServerListResetButton_Click(object sender, EventArgs e)
        {
            this.ServerListFilterComboBox.SelectedIndex = -1;
            DashboardReports.SrvAvailabilityXtraRpt report = new DashboardReports.SrvAvailabilityXtraRpt();
            string   date = DateTime.Now.ToString("M/d/yyyy");
            DateTime dt   = Convert.ToDateTime(date);

            report.Parameters["DateM"].Value      = dt.Month;
            report.Parameters["DateY"].Value      = dt.Year;
            report.Parameters["ServerName"].Value = "";
            this.ReportViewer1.Report             = report;
            this.ReportViewer1.DataBind();
        }