public void fillNodesTreeListbycellID() { try { int cellid = Convert.ToInt32(Request.QueryString["CellID"]); //string id = Convert.ToString(cellid); NodesTreeList.CollapseAll(); CollapseAllButton.Image.Url = "~/images/icons/add.png"; CollapseAllButton.Text = "Expand All"; if (Session["DataEvents"] == null) { //DataTable DataEventsTree = VSWebBL.SecurityBL.webspehereImportBL.Ins.GetnodesserversFromProcedure(); DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); //DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure(); Session["DataEvents"] = bycelldata; } NodesTreeList.DataSource = (DataTable)Session["DataEvents"]; NodesTreeList.DataBind(); } 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()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
public void fillNodesTreeListbycellID(int id) { try { int cellid = Convert.ToInt32(id); //DataTable DataEventsTree = VSWebBL.SecurityBL.webspehereImportBL.Ins.GetnodesserversFromProcedure(); DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); //DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure(); Session["DataEvents"] = bycelldata; if (bycelldata.Rows.Count > 0) { NodesTreeList.Visible = true; CollapseAllButton.Visible = true; ImportButton.Visible = true; } else { NodesTreeList.Visible = false; CollapseAllButton.Visible = false; ImportButton.Visible = false; } NodesTreeList.DataSource = (DataTable)Session["DataEvents"]; NodesTreeList.DataBind(); expandButton(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
protected void CollapseAllButton_Click(object sender, EventArgs e) { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.CollapseAll(); CollapseAllButton.Image.Url = "~/images/icons/add.png"; CollapseAllButton.Text = "Expand All"; } else { NodesTreeList.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()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
protected void ASPxComboBox2_SelectedIndexChanged(object sender, EventArgs e) { CellName = ASPxComboBox2.SelectedItem.Text; CellID = Convert.ToInt32(ASPxComboBox2.SelectedItem.Value); bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(CellID); Session["NodesServers"] = bycelldata; NodesTreeList.DataSource = (DataTable)Session["NodesServers"]; NodesTreeList.DataBind(); }
protected void webspherecellgrid_FocusedRowChanged(object sender, EventArgs e) { webspherecellgrid.EnableCallBacks = false; if (webspherecellgrid.VisibleRowCount > 0) { NodesTreeList.UnselectAll(); NodesTreeList.DataSource = ""; NodesTreeList.DataBind(); int index = webspherecellgrid.FocusedRowIndex; if (index > -1) { cellvalue = Convert.ToInt32(webspherecellgrid.GetRowValues(index, "CellID").ToString()); //fillNodesTreeListbycellID(cellvalue); fillNodesTreeListbycellID(cellvalue); } } expandButton(); }
public void fillCelldetailsfromSession() { DataTable CellDetails = new DataTable(); try { if (Session["cell"] != "" && Session["cell"] != null) { CellDetails = Session["cell"] as DataTable; } NodesTreeList.DataSource = CellDetails; NodesTreeList.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
public void fillNodesTreeListbycellIDfromsession() { try { if (Session["DataEvents"] != null) { NodesTreeList.DataSource = (DataTable)Session["DataEvents"]; NodesTreeList.DataBind(); expandButton(); } } 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()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
public void expandButton() { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.ExpandAll(); //CollapseButton.Image.Url = "~/images/icons/add.png"; //CollapseButton.Text = "Expand All Rows"; } else { NodesTreeList.CollapseAll(); //CollapseButton.Image.Url = "~/images/icons/forbidden.png"; //CollapseButton.Text = "Collapse All Rows"; } } catch (Exception ex) { throw ex; } }
protected void CollapseAllButton_Click(object sender, EventArgs e) { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.CollapseAll(); CollapseAllButton.Image.Url = "~/images/icons/add.png"; CollapseAllButton.Text = "Expand All"; } else { NodesTreeList.ExpandAll(); CollapseAllButton.Image.Url = "~/images/icons/forbidden.png"; CollapseAllButton.Text = "Collapse All"; } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
public void fillNodesTreefromSession() { DataTable DataEvents = new DataTable(); try { if (Session["NodesServers"] != "" && Session["NodesServers"] != null) { DataEvents = Session["NodesServers"] as DataTable; } NodesTreeList.DataSource = DataEvents; NodesTreeList.DataBind(); } 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()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
//public void fillNodesTreeListbycellID(int id) //{ // //Session["DataEvents"] = null; // try // { // int cellid = Convert.ToInt32(id); // //string id = Convert.ToString(cellid); // NodesTreeList.CollapseAll(); // CollapseAllButton.Image.Url = "~/images/icons/add.png"; // CollapseAllButton.Text = "Expand All"; // if (Session["DataEvents123"] == null) // { // DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); // //DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); // //DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure(); // Session["DataEvents123"] = bycelldata; // NodesTreeList.DataSource = (DataTable)Session["DataEvents123"]; // NodesTreeList.DataBind(); // } // else // { // if(Page.IsPostBack) // { // Session["DataEvents123"] = null; // NodesTreeList.DataSource = ""; // NodesTreeList.DataBind(); // NodesTreeList.ClearNodes(); // } // } // NodesTreeList.DataSource = (DataTable)Session["DataEvents123"]; // NodesTreeList.DataBind(); // //DataTable DataEventsTree = VSWebBL.SecurityBL.webspehereImportBL.Ins.GetnodesserversFromProcedure(); // //DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure(); // //if (bycelldata.Rows.Count > 0) // //{ // //bycelldata = (DataTable)Session["DataEvents123"]; // // NodesTreeList.DataSource = bycelldata; // // NodesTreeList.DataBind(); // //} // //else // //{ // //Session["DataEvents1"] = bycelldata; // //NodesTreeList.DataSource = bycelldata; // //NodesTreeList.RefreshVirtualTree(); // //NodesTreeList.DataBind(); // //NodesTreeList.LayoutChanged(); // //NodesTreeList.Nodes.Clear(); // //NodesTreeList.ClearNodes(); // } // 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()); // //6/27/2014 NS added for VSPLUS-634 // Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); // } //} //public void fillNodesTreeListbycellIDfromsession() //{ // try // { // //int cellid = Convert.ToInt32(id); // ////string id = Convert.ToString(cellid); // //NodesTreeList.CollapseAll(); // //CollapseAllButton.Image.Url = "~/images/icons/add.png"; // //CollapseAllButton.Text = "Expand All"; // //if (Session["DataEvents"] == null) // //{ // // //DataTable DataEventsTree = VSWebBL.SecurityBL.webspehereImportBL.Ins.GetnodesserversFromProcedure(); // // DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); // // //DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure(); // // Session["DataEvents"] = bycelldata; // //} // //DataTable bycelldata = VSWebBL.SecurityBL.webspehereImportBL.Ins.FetserversbycellID(cellid); // DataTable DataEvents = new DataTable(); // if (Session["DataEvents123"]== null) // { // if (Session["DataEvents123"] != "" && Session["DataEvents123"] != null) // DataEvents = Session["DataEvents123"] as DataTable; // NodesTreeList.DataSource = DataEvents; // NodesTreeList.DataBind(); // } // } // 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()); // //6/27/2014 NS added for VSPLUS-634 // Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); // } //} //public void FillWebsphereNodeStatusGrid(int id) //{ // DataTable dt = new DataTable(); // dt = VSWebBL.DashboardBL.WebsphereBL.Ins.GetWebsphereNodeStatus(id); // WebsphereNodesgridview.DataSource = dt; // WebsphereNodesgridview.DataBind(); //} private DataTable GetSelectedEvents(int CellID) { DataTable dtSel = new DataTable(); try { dtSel.Columns.Add("CellID"); dtSel.Columns.Add("ServerID"); dtSel.Columns.Add("NodeID"); dtSel.Columns.Add("Enabled"); dtSel.Columns.Add("NodeName"); dtSel.Columns.Add("Status"); dtSel.Columns.Add("HostName"); //10/16/2014 NS added //dtSel.Columns.Add("ConsecutiveFailures"); //string selValues = ""; TreeListNodeIterator iterator = NodesTreeList.CreateNodeIterator(); TreeListNode node; //TreeListColumn columnActid = EventsTreeList.Columns["actid"]; TreeListColumn columnActid = NodesTreeList.Columns["actid"]; TreeListColumn columnSrvId = NodesTreeList.Columns["SrvId"]; TreeListColumn columnTbl = NodesTreeList.Columns["tbl"]; TreeListColumn columnNodeName = NodesTreeList.Columns["NodeName"]; TreeListColumn columnStatus = NodesTreeList.Columns["Status"]; TreeListColumn columnHostName = NodesTreeList.Columns["HostName"]; while (true) { node = iterator.GetNext(); if (node == null) { break; } //if (node.Level == 1 && node.ParentNode.Selected) //{ // // root node selected ie All Events selected // DataRow dr = dtSel.NewRow(); // dr["CellID"] = CellID; // dr["ServerID"] = 0;// node.GetValue("actid"); // dr["NodeID"] = 0;//node.GetValue("SrvId"); // dr["Enabled"] = true; // dtSel.Rows.Add(dr); // break; //} //else if (node.Level == 1 && node.ParentNode.Selected == false && node.Selected) //{ // // level 1 node selected ie One Servertype selected and all events under it // DataRow dr = dtSel.NewRow(); // dr["CellID"] = CellID; // dr["ServerID"] = 0; //node.GetValue("actid"); // dr["NodeID"] = ((System.Data.DataRowView)(node.DataItem)).Row.ItemArray[3];//node.GetValue("SrvId"); // dr["Enabled"] = true; // dtSel.Rows.Add(dr); //} ////else if (node.Level == 1 && node.ParentNode.Selected == false && node.HasChildren) ////{ //// // level 1 node selected ie One Servertype selected and all events under it //// DataRow dr = dtSel.NewRow(); //// dr["CellID"] = CellID; //// dr["ServerID"] = node.GetValue("actid"); //// dr["NodeID"] = ((System.Data.DataRowView)(node.DataItem)).Row.ItemArray[3];//node.GetValue("SrvId"); //// dr["Enabled"] = true; //// dtSel.Rows.Add(dr); ////} //else if (node.Level == 2) { if (node.Selected) { DataRow dr = dtSel.NewRow(); dr["CellID"] = CellID; dr["ServerID"] = node.GetValue("actid"); dr["NodeID"] = node.GetValue("SrvId"); dr["NodeName"] = node.GetValue("Name"); dr["Status"] = node.GetValue("Status"); dr["HostName"] = node.GetValue("HostName"); dr["Enabled"] = true; //10/16/2014 NS added //dr["ConsecutiveFailures"] = node.GetValue("ConsecutiveFailures"); dtSel.Rows.Add(dr); } } } } 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()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } return(dtSel); }