Exemplo n.º 1
0
 public void FillIBMConnectionsGridBySession()
 {
     try
     {
         DataTable IBMConnectionsServersbysession = new DataTable();
         if (Session["IBMConnectionsServers"] != null && Session["IBMConnectionsServers"] != "")
         {
             IBMConnectionsServersbysession = (DataTable)Session["IBMConnectionsServers"];
         }
         if (IBMConnectionsServersbysession.Rows.Count > 0)
         {
             IBMConnectionsGridview.DataSource = IBMConnectionsServersbysession;
             IBMConnectionsGridview.DataBind();
         }
     }
     catch (Exception ex)
     {
         //6/27/2014 NS added for VSPLUS-634
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
 }
Exemplo n.º 2
0
        protected void IBMConnectionsGridview_SelectionChanged(object sender, EventArgs e)
        {
            if (IBMConnectionsGridview.Selection.Count > 0)
            {
                System.Collections.Generic.List <object> Type = IBMConnectionsGridview.GetSelectedFieldValues("SID");

                if (Type.Count > 0)
                {
                    string ID = Type[0].ToString();

                    //Mukund: VSPLUS-844, Page redirect on callback
                    try
                    {
                        DevExpress.Web.ASPxWebControl.RedirectOnCallback("IBMConnections.aspx?ID=" + ID + "");
                        Context.ApplicationInstance.CompleteRequest();                        //Mukund, 05Aug14, VSPLUS-844:Page redirect on callback
                    }
                    catch (Exception ex)
                    {
                        Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                        //throw ex;
                    }
                }
            }
        }
Exemplo n.º 3
0
        public void FillIBMConnectionsGrid()
        {
            try
            {
                DataTable IBMConnectionsServers = new DataTable();
                DataTable ServerTypeTable       = new  DataTable();
                //LotusSametimeGrid objectlotussametime = new LotusSametimeGrid();
                //sametime = VSWebBL.ConfiguratorBL.SametimeServerBL.Ins.getdata();
                if (Session["UserID"] != null)
                {
                    UserID = Convert.ToInt32(Session["UserID"]);
                }
                //ServerTypeTable = VSWebBL.ConfiguratorBL.IBMConnectionsServersBL.Ins.GetServerType(ServerNameTextBox.Text);

                //if (ServerTypeTable.Rows.Count > 0)
                //{
                //    string ServerType = ServerTypeTable.Rows[0]["ServerType"].ToString();
                IBMConnectionsServers = VSWebBL.ConfiguratorBL.IBMConnectionsServersBL.Ins.GetdataforIBMConnectionsServersGridbyUser(UserID);

                if (IBMConnectionsServers.Rows.Count > 0)
                {
                    if (Session["RestrictedServers"] != "" && Session["RestrictedServers"] != null)
                    {
                        List <int> ServerID   = new List <int>();
                        List <int> LocationID = new List <int>();
                        DataTable  resServers = (DataTable)Session["RestrictedServers"];
                        foreach (DataRow dominorow in IBMConnectionsServers.Rows)
                        {
                            foreach (DataRow resser in resServers.Rows)
                            {
                                if (resser["serverid"].ToString() == dominorow["SID"].ToString())
                                {
                                    ServerID.Add(IBMConnectionsServers.Rows.IndexOf(dominorow));
                                }
                                if (resser["locationID"].ToString() == dominorow["LocationID"].ToString())
                                {
                                    LocationID.Add(Convert.ToInt32(dominorow["LocationID"].ToString()));
                                }
                            }
                        }
                        foreach (int Id in ServerID)
                        {
                            IBMConnectionsServers.Rows[Id].Delete();
                        }
                        IBMConnectionsServers.AcceptChanges();

                        foreach (int lid in LocationID)
                        {
                            DataRow[] row = IBMConnectionsServers.Select("LocationID=" + lid + "");
                            for (int i = 0; i < row.Count(); i++)
                            {
                                IBMConnectionsServers.Rows.Remove(row[i]);
                                IBMConnectionsServers.AcceptChanges();
                            }
                        }
                        IBMConnectionsServers.AcceptChanges();
                    }
                    Session["IBMConnectionsServers"]  = IBMConnectionsServers;
                    IBMConnectionsGridview.DataSource = IBMConnectionsServers;
                    IBMConnectionsGridview.DataBind();
                }
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally
            {
            }
        }