示例#1
0
        public void DrawProfilesModule()
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["Subject"] == null)
            {
                return;
            }

            base.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["Subject"]));



            dlGoogleMapLinks.DataSource = data.GetGoogleMapZoomLinks();
            dlGoogleMapLinks.DataBind();

            SqlDataReader reader  = null;
            SqlDataReader reader2 = null;

            Profiles.Framework.Utilities.SessionManagement session = new SessionManagement();

            GoogleMapHelper gmh = new GoogleMapHelper();

            if (base.GetModuleParamString("MapType") == "CoAuthor")
            {
                reader  = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 0, session.Session().SessionID);
                reader2 = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 1, session.Session().SessionID);
            }

            if (base.GetModuleParamString("MapType") == "SimilarTo")
            {
                reader  = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, false, session.Session().SessionID);
                reader2 = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, true, session.Session().SessionID);
            }

            if (base.GetModuleParamString("MapType") == "Group")
            {
                litCoauthorGroup.Text = "group members";
                reader  = data.GetGMapUserGroup(base.RDFTriple.Subject, 0, session.Session().SessionID);
                reader2 = data.GetGMapUserGroup(base.RDFTriple.Subject, 1, session.Session().SessionID);
            }

            string googleCode, tableText;

            gmh.MapPlotPeople(base.RDFTriple.Subject, reader, reader2, out googleCode, out tableText);
            litGoogleCode.Text  = googleCode;
            litNetworkText.Text = tableText;


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

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