示例#1
0
 protected void ServerListResetButton_Click(object sender, EventArgs e)
 {
     //this.ServerListFilterComboBox.SelectedIndex = -1;
     //2/4/2015 NS added for VSPLUS-1370
     this.ServerTypeFilterListBox.UnselectAll();
     this.ServerListFilterListBox.UnselectAll();
     fillcombo("");
     DashboardReports.DeviceUptimeXtraRpt report = new DashboardReports.DeviceUptimeXtraRpt();
     report.Parameters["ServerName"].Value = "";
     //2/4/2015 NS added for VSPLUS-1370
     report.Parameters["ServerType"].Value = "";
     this.ReportViewer1.Report             = report;
     this.ReportViewer1.DataBind();
 }
示例#2
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            string selectedServer = "";
            string selectedType   = "";
            string date;

            //8/5/2013 NS modified

            /*
             * if (this.ServerListFilterComboBox.SelectedIndex >= 0)
             * {
             *  selectedServer = this.ServerListFilterComboBox.SelectedItem.Value.ToString();
             * }
             */
            if (this.ServerListFilterListBox.SelectedItems.Count > 0)
            {
                selectedServer = "";
                for (int i = 0; i < this.ServerListFilterListBox.SelectedItems.Count; i++)
                {
                    selectedServer += "'" + this.ServerListFilterListBox.SelectedItems[i].Text + "'" + ",";
                }
                try
                {
                    selectedServer = selectedServer.Substring(0, selectedServer.Length - 1);
                }
                catch
                {
                    selectedServer = "";     // throw ex;
                }
                finally { }
            }
            //2/4/2015 NS added for VSPLUS-1370
            if (this.ServerTypeFilterListBox.SelectedItems.Count > 0)
            {
                for (int i = 0; i < this.ServerTypeFilterListBox.SelectedItems.Count; i++)
                {
                    selectedType += "'" + this.ServerTypeFilterListBox.SelectedItems[i].Text + "'" + ",";
                }
                try
                {
                    selectedType = selectedType.Substring(0, selectedType.Length - 1);
                }
                catch
                {
                    selectedType = "";
                }
                finally { }
            }
            if (this.DateParamEdit.Text == "")
            {
                date = DateTime.Now.ToString();
            }
            else
            {
                date = this.DateParamEdit.Value.ToString();
            }
            DateTime dt = Convert.ToDateTime(date);

            DashboardReports.DeviceUptimeXtraRpt report = new DashboardReports.DeviceUptimeXtraRpt();
            report.Parameters["DateVal"].Value    = dt;
            report.Parameters["ServerName"].Value = selectedServer;
            report.Parameters["ServerType"].Value = selectedType;
            this.ReportViewer1.Report             = report;
            this.ReportViewer1.DataBind();
        }