Esempio n. 1
0
        public void FillServersListGridfromSession()
        {
            DataTable DataServers = new DataTable();

            try
            {
                if (Session["DominoServerList"] != null && Session["DominoServerList"] != "")
                {
                    DataServers = Session["DominoServerList"] as DataTable;
                }
                if (DataServers.Rows.Count > 0)
                {
                    DataServers.PrimaryKey = new DataColumn[] { DataServers.Columns["ID"] };
                }

                DominoHealthGridView.DataSource = DataServers;
                DominoHealthGridView.DataBind();
            }
            catch (Exception ex)
            {
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
        }
Esempio n. 2
0
        public void FillServersListGrid()
        {
            string    DominoList = "";
            DataTable dt         = new DataTable();

            dt = VSWebBL.DashboardBL.DominoServerHealthBLL.Ins.GetDominoServerDetails();
            Session["DominoServerList"] = dt;
            DominoList = "0";
            DataRow[] foundRows;
            DataRow   statusrow;

            statusrow = statuslist.NewRow();
            //10/21/2015 NS added for VSPLUS-2253
            DataRow versionrow;

            versionrow = versionlist.NewRow();
            DataRow osrow;

            osrow = oslist.NewRow();

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (statuslist.Rows.Count > 0)
                    {
                        foundRows = statuslist.Select("Status = '" + dt.Rows[i]["Status"].ToString() + "'");
                        if (foundRows.Length == 0)
                        {
                            statusrow                = statuslist.Rows.Add();
                            statusrow["Status"]      = dt.Rows[i]["Status"].ToString();
                            statusrow["StatusCount"] = 1;
                            statusrow                = statuslist.NewRow();
                        }
                        else
                        {
                            statusrow = foundRows[0];
                            statusrow["StatusCount"] = Convert.ToInt32(statusrow["StatusCount"].ToString()) + 1;
                        }
                    }
                    else
                    {
                        statusrow                = statuslist.Rows.Add();
                        statusrow["Status"]      = dt.Rows[i]["Status"].ToString();
                        statusrow["StatusCount"] = 1;
                        statusrow                = statuslist.NewRow();
                    }
                    //10/21/2015 NS added for VSPLUS-2253
                    if (versionlist.Rows.Count > 0)
                    {
                        foundRows = versionlist.Select("DominoVersion = '" + dt.Rows[i]["DominoVersion"].ToString() + "'");
                        if (foundRows.Length == 0)
                        {
                            versionrow = versionlist.Rows.Add();
                            versionrow["DominoVersion"]      = dt.Rows[i]["DominoVersion"].ToString();
                            versionrow["DominoVersionCount"] = 1;
                            versionrow = versionlist.NewRow();
                        }
                        else
                        {
                            versionrow = foundRows[0];
                            versionrow["DominoVersionCount"] = Convert.ToInt32(versionrow["DominoVersionCount"].ToString()) + 1;
                        }
                    }
                    else
                    {
                        versionrow = versionlist.Rows.Add();
                        versionrow["DominoVersion"]      = dt.Rows[i]["DominoVersion"].ToString();
                        versionrow["DominoVersionCount"] = 1;
                        versionrow = versionlist.NewRow();
                    }
                    if (oslist.Rows.Count > 0)
                    {
                        foundRows = oslist.Select("OperatingSystem = '" + dt.Rows[i]["OperatingSystem"].ToString() + "'");
                        if (foundRows.Length == 0)
                        {
                            osrow = oslist.Rows.Add();
                            osrow["OperatingSystem"]      = dt.Rows[i]["OperatingSystem"].ToString();
                            osrow["OperatingSystemCount"] = 1;
                            osrow = oslist.NewRow();
                        }
                        else
                        {
                            osrow = foundRows[0];
                            osrow["OperatingSystemCount"] = Convert.ToInt32(osrow["OperatingSystemCount"].ToString()) + 1;
                        }
                    }
                    else
                    {
                        osrow = oslist.Rows.Add();
                        osrow["OperatingSystem"]      = dt.Rows[i]["OperatingSystem"].ToString();
                        osrow["OperatingSystemCount"] = 1;
                        osrow = oslist.NewRow();
                    }
                }
                DominoList = dt.Rows.Count.ToString();
            }
            DominoHealthGridView.DataSource = dt;
            DominoHealthGridView.DataBind();
            DataRow rolerow = srvroles.Rows.Add();

            rolerow["Role"]      = "Domino";
            rolerow["RoleCount"] = Convert.ToInt32(DominoList);
        }