Exemple #1
0
 protected void CollapseAllButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (CollapseAllButton.Text == "Collapse All")
         {
             ServersTreeList.CollapseAll();
             CollapseAllButton.Image.Url = "~/images/icons/add.png";
             CollapseAllButton.Text      = "Expand All";
         }
         else
         {
             ServersTreeList.ExpandAll();
             CollapseAllButton.Image.Url = "~/images/icons/forbidden.png";
             CollapseAllButton.Text      = "Collapse All";
         }
     }
     catch (Exception ex)
     {
         //Log.Entry.Ins.Write(Server.MapPath("~/LogFiles/"), "VSPlusLog.txt", DateTime.Now.ToString() + " Error in Page: " +
         //    Request.Url.AbsolutePath + ", Method: " + System.Reflection.MethodBase.GetCurrentMethod().Name +
         //    ", Error: " + ex.ToString());
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
 }
Exemple #2
0
        public void fillServersTreeList()
        {
            try
            {
                DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure();
                string    PrimaryNode     = "";
                DataTable ServerNodes     = Session["ServerNodes"] as DataTable;
                if (ServerNodes != null && ServerNodes.Rows.Count > 0)
                {
                    PrimaryNode = ServerNodes.Rows[0][1].ToString();
                }
                foreach (DataRow dr in DataServersTree.Rows)
                {
                    if (dr["LocId"].ToString() != "")
                    {
                        if (dr["MonitoredBy"].ToString() == "")
                        {
                            if (PrimaryNode != "")
                            {
                                dr["MonitoredBy"] = "Unassigned(Monitored by " + PrimaryNode + ")";
                            }
                            else
                            {
                                dr["MonitoredBy"] = "Unassigned";
                            }
                        }
                    }
                }
                Session["DataServers"] = DataServersTree;


                ServersTreeList.DataSource = (DataTable)Session["DataServers"];
                ServersTreeList.DataBind();
                ServersTreeList.ExpandAll();
                ServersTreeList.UnselectAll();
            }
            catch (Exception ex)
            {
                //Log.Entry.Ins.Write(Server.MapPath("~/LogFiles/"), "VSPlusLog.txt", DateTime.Now.ToString() + " Error in Page: " +
                //    Request.Url.AbsolutePath + ", Method: " + System.Reflection.MethodBase.GetCurrentMethod().Name +
                //    ", Error: " + ex.ToString());
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
        }
Exemple #3
0
        public void fillServersTreeList()
        {
            try
            {
                if (Session["DataServers"] == null)
                {
                    DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure();
                    DataTable filteredData    = DataServersTree.Select("ServerType='" + ServerTypeComboBox.Text + "' or ServerType is null").CopyToDataTable();
                    Session["DataServers"] = filteredData;
                }

                ServersTreeList.DataSource = (DataTable)Session["DataServers"];
                ServersTreeList.DataBind();
                ServersTreeList.ExpandAll();
            }
            catch (Exception ex)
            {
                //Log.Entry.Ins.Write(Server.MapPath("~/LogFiles/"), "VSPlusLog.txt", DateTime.Now.ToString() + " Error in Page: " +
                //    Request.Url.AbsolutePath + ", Method: " + System.Reflection.MethodBase.GetCurrentMethod().Name +
                //    ", Error: " + ex.ToString());
            }
        }
Exemple #4
0
 protected void CollapseAllSrvButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (CollapseAllSrvButton.Text == "Collapse All")
         {
             ServersTreeList.CollapseAll();
             CollapseAllSrvButton.Image.Url = "~/images/icons/add.png";
             CollapseAllSrvButton.Text      = "Expand All";
         }
         else
         {
             ServersTreeList.ExpandAll();
             CollapseAllSrvButton.Image.Url = "~/images/icons/forbidden.png";
             CollapseAllSrvButton.Text      = "Collapse All";
         }
     }
     catch (Exception ex)
     {
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
     }
 }