private void DrawProfilesModule()
        {
            //Int64 subject = 0;

            if (HttpContext.Current.Request.QueryString["subject"] != null)
            {
                this.Subject = Convert.ToInt64(HttpContext.Current.Request.QueryString["subject"]);
            }

            hdSubject.Value = this.Subject.ToString();

            if (sm.Session().UserID != 0)
            {
                if (this.Subject != sm.Session().NodeID&& (!Root.AbsolutePath.Contains("/proxy") && !Root.AbsolutePath.Contains("/edit") && !Root.AbsolutePath.Contains("/search") && !Root.AbsolutePath.Contains("/activenetwork") && !Root.AbsolutePath.Contains("/about") && !Root.AbsolutePath.Contains("/history")))
                {
                    int count = RelationshipTypeUtils.GetRelationshipTypes(Convert.ToInt64(Subject)).Count;

                    if (count > 0)
                    {
                        rptRelationshipTypes.DataSource = RelationshipTypeUtils.GetRelationshipTypes(Convert.ToInt64(Subject));
                        rptRelationshipTypes.DataBind();
                        this.Count = count;
                    }
                }
            }
        }
        private void DrawProfilesModule()
        {
            this.first = true;
            Utilities.DataIO   data        = new Profiles.Framework.Utilities.DataIO();
            List <NetworkItem> networkitem = new List <NetworkItem>();

            if (HttpContext.Current.Request.QueryString["subject"] != null)
            {
                this.Subject = Convert.ToInt64(HttpContext.Current.Request.QueryString["subject"]);
            }

            hdSubject.Value = this.Subject.ToString();

            using (SqlDataReader reader = data.GetActiveNetwork(0, false))
            {
                while (reader.Read())
                {
                    networkitem.Add(new NetworkItem(reader[1].ToString(), Convert.ToInt64(reader[2]), reader[3].ToString()));
                }

                if (!reader.IsClosed)
                {
                    reader.Close();
                }
            }


            if (networkitem.Count > 0)
            {
                gvActiveNetwork.DataSource = networkitem;
                gvActiveNetwork.DataBind();
                this.Count = networkitem.Count;
                string seeall = string.Empty;
                if (this.Count > 1)
                {
                    seeall = "See all " + networkitem.Count.ToString() + " people";
                }
                else
                {
                    seeall = "See all people";
                }
                litActiveNetworkDetails.Text = "<li  style='height: 25px !important'><a style='border-left:1px solid #383737;border-right:1px solid #383737;border-bottom:1px solid #383737;border-top:2px solid #383737;' href='" + Root.Domain + "/activenetwork/default.aspx'>" + seeall + "</a></li>";
            }
            else
            {
                gvActiveNetwork.Visible         = false;
                litActiveNetworkDetails.Visible = false;
            }


            if (sm.Session().UserID != 0 && Subject > 0)
            {
                if (this.Subject != sm.Session().NodeID&& (Root.AbsolutePath.Contains("/display/")))
                {
                    int count = RelationshipTypeUtils.GetRelationshipTypes(Convert.ToInt64(Subject)).Count;

                    if (count > 0)
                    {
                        rptRelationshipTypes.DataSource = RelationshipTypeUtils.GetRelationshipTypes(Convert.ToInt64(Subject));
                        rptRelationshipTypes.DataBind();
                        this.Count = count;
                        rptRelationshipTypes.Visible = true;
                    }
                    else
                    {
                        rptRelationshipTypes.Visible = false;
                    }
                }
            }
        }