Пример #1
0
        public void fillDominoServersTreeList()
        {
            try
            {
                if (Session["DominoServers"] == null)
                {
                    DataTable DataServersTree = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetServersFromProcedure();
                    DataTable filteredData    = DataServersTree.Select("ServerType= 'Domino' or ServerType is null").CopyToDataTable();
                    Session["DominoServers"] = filteredData;
                }

                DominoServerTreeList.DataSource = (DataTable)Session["DominoServers"];
                DominoServerTreeList.DataBind();
                DominoServerTreeList.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());
            }
        }
Пример #2
0
        public void fillDominoServersTreeListfromSession()
        {
            DataTable DataServers = new DataTable();

            try
            {
                if (Session["DominoServers"] != "" && Session["DominoServers"] != null)
                {
                    DataServers = Session["DominoServers"] as DataTable;
                }
                if (DataServers.Rows.Count > 0)
                {
                    DataServers.PrimaryKey = new DataColumn[] { DataServers.Columns["ID"] };
                }
                DominoServerTreeList.DataSource = DataServers;
                DominoServerTreeList.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());
            }
        }