public void SetChartForMail(string serverName) { string MailList = ""; DataTable dt = new DataTable(); dt = VSWebBL.DashboardBL.DominoServerHealthBLL.Ins.GetMailChart(Type); Session["MailStatus"] = dt; MailList = "0"; if (dt != null && dt.Rows.Count > 0) { MailList = dt.Rows.Count.ToString(); } MailWebChart.DataSource = dt; MailWebChart.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["DominoServerList"] = null; Session["TravelerServerList"] = null; Session["SametimeServerList"] = null; Session["DominoIssues"] = null; Session["MailStatus"] = null; dt.Columns.Add("Mail"); DataColumn Mail = new DataColumn("Value", typeof(int)); dt.Columns.Add(Mail); srvroles.Columns.Add("Role"); DataColumn dc = new DataColumn("RoleCount", typeof(int)); srvroles.Columns.Add(dc); DataColumn statuscol = new DataColumn("Status", typeof(string)); statuslist.Columns.Add(statuscol); statuscol = new DataColumn("StatusCount", typeof(int)); statuslist.Columns.Add(statuscol); //10/21/2015 NS added for VSPLUS-2253 DataColumn versioncol = new DataColumn("DominoVersion", typeof(string)); versionlist.Columns.Add(versioncol); versioncol = new DataColumn("DominoVersionCount", typeof(int)); versionlist.Columns.Add(versioncol); DataColumn oscol = new DataColumn("OperatingSystem", typeof(string)); oslist.Columns.Add(oscol); oscol = new DataColumn("OperatingSystemCount", typeof(int)); oslist.Columns.Add(oscol); FillServersListGrid(); FillTravelersListGrid(); FillSametimeListGrid(); FillMonitoredGrid(); SetChartForMail(Type); FillDominoIssuesGrid(); //10/23/2015 NS added for VSPLUS-2253 FillSysInfo(); SrvRolesWebChart.DataSource = srvroles; SrvRolesWebChart.Series[0].DataSource = srvroles; SrvRolesWebChart.Series[0].ArgumentDataMember = srvroles.Columns[0].ToString(); SrvRolesWebChart.Series[0].ValueDataMembers.AddRange(srvroles.Columns[1].ToString()); SrvRolesWebChart.Series[0].Visible = true; SrvRolesWebChart.DataBind(); StatusWebChart.DataSource = statuslist; StatusWebChart.Series[0].DataSource = statuslist; StatusWebChart.Series[0].ArgumentDataMember = statuslist.Columns[0].ToString(); StatusWebChart.Series[0].ValueDataMembers.AddRange(statuslist.Columns[1].ToString()); StatusWebChart.Series[0].Visible = true; StatusWebChart.DataBind(); //10/21/2015 NS added for VSPLUS-2253 VersionWebChart.DataSource = versionlist; VersionWebChart.Series[0].DataSource = versionlist; VersionWebChart.Series[0].ArgumentDataMember = versionlist.Columns[0].ToString(); VersionWebChart.Series[0].ValueDataMembers.AddRange(versionlist.Columns[1].ToString()); VersionWebChart.Series[0].Visible = true; VersionWebChart.DataBind(); OSWebChart.DataSource = oslist; OSWebChart.Series[0].DataSource = oslist; OSWebChart.Series[0].ArgumentDataMember = oslist.Columns[0].ToString(); OSWebChart.Series[0].ValueDataMembers.AddRange(oslist.Columns[1].ToString()); OSWebChart.Series[0].Visible = true; OSWebChart.DataBind(); dt = (DataTable)Session["MailStatus"]; MailWebChart.DataSource = dt; MailWebChart.Series[0].DataSource = dt; MailWebChart.Series[0].ArgumentDataMember = dt.Columns[1].ToString(); MailWebChart.Series[0].ValueDataMembers.AddRange(dt.Columns[2].ToString()); MailWebChart.Series[0].Visible = true; MailWebChart.DataBind(); } else { FillServersListGridfromSession(); FillTravelerListGridfromSession(); FillSametimeListGridfromSession(); FillDominoIssuesGridFromSession(); //10/23/2015 NS added for VSPLUS-2253 FillSysInfoFromSession(); } string url = HttpContext.Current.Request.Url.AbsoluteUri; Session["BackURL"] = url; if (Session["UserPreferences"] != null) { DataTable UserPreferences = (DataTable)Session["UserPreferences"]; foreach (DataRow dr in UserPreferences.Rows) { if (dr[1].ToString() == "DominoServerHealthPage|DominoHealthGridView") { DominoHealthGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } if (dr[1].ToString() == "DominoServerHealthPage|TravelerGridView") { TravelerGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } if (dr[1].ToString() == "DominoServerHealthPage|SameTimeGridView") { SameTimeGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } if (dr[1].ToString() == "DominoServerHealthPage|DominoIssuesGrid") { DominoIssuesGrid.SettingsPager.PageSize = Convert.ToInt32(dr[2]); } } } }