public CustomEditMainImage(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); SessionManagement sm = new SessionManagement(); this.XMLData = pagedata; propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = PredicateURI; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); securityOptions.BubbleClick += SecurityDisplayed; }
public CustomEditAuthorInAuthorship(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); propdata = new Profiles.Profile.Utilities.DataIO(); this._subject = Convert.ToInt64(Request.QueryString["subject"]); this._predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this._personId = data.GetPersonID(_subject); Session["NodeID"] = this._subject; Session["SessionID"] = sm.Session().SessionID; this.PropertyListXML = propdata.GetPropertyList(pagedata, base.PresentationXML, this._predicateuri, false, true, false); securityOptions.Subject = this._subject; securityOptions.PredicateURI = this._predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); securityOptions.BubbleClick += SecurityDisplayed; }
protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) { System.IO.Stream stream; Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); stream = AsyncFileUpload1.PostedFile.InputStream; byte[] imageBytes = new byte[AsyncFileUpload1.PostedFile.InputStream.Length + 1]; AsyncFileUpload1.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length); Framework.Utilities.Namespace xmlnamespace = new Profiles.Framework.Utilities.Namespace(); XmlNamespaceManager namespaces = xmlnamespace.LoadNamespaces(BaseData); if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Person']", namespaces) != null) { data.SaveImage(this.SubjectID, imageBytes, this.PropertyListXML); } if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Group']", namespaces) != null) { data.SaveGroupImage(this.SubjectID, imageBytes, this.PropertyListXML); } base.GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false); this.DrawProfilesModule(); InitLinks(); pnlUpload.Visible = false; upnlEditSection.Update(); }
public CustomEditWebsite(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); this.XMLData = pagedata; data = new Profiles.Edit.Modules.CustomEditWebsite.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } Predicate = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, Predicate, false, true, false); this.PredicateID = data.GetStoreNode(Predicate); base.GetNetworkProfile(this.SubjectID, this.PredicateID); litBackLink.Text = "<a href='" + Root.Domain + "/edit/default.aspx?subject=" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; btnEditAwards.Text = "Add " + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "(s)"; lblNoAwards.Text = "No " + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "s have been added."; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = Predicate; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); if (Request.QueryString["new"] != null && Session["new"] != null) { Session["pnlInsertAward.Visible"] = null; Session["new"] = null; if (Session["newclose"] != null) { Session["newclose"] = null; btnInsertCancel_OnClick(this, new EventArgs()); } else { btnEditAwards_OnClick(this, new EventArgs()); } } securityOptions.BubbleClick += SecurityDisplayed; }
public CustomEditFreetextKeyword(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.Edit.Utilities.DataIO(); string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); PropertyLabel = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //btnEditProperty.Text = "Add " + PropertyLabel; imbAddArrow.Visible = true; this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); this.MaxCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality").Value; this.MinCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MinCardinality").Value; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); txtLabel.Attributes.Add("data-autocomplete-url", Root.Domain + "/edit/Modules/CustomEditFreetextKeyword/keywordAutocomplete.aspx?keys="); }
public BaseSocialMediaModule(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { this.Init(); this.LoadRawQueryString(); this.BaseData = pagedata; this.ModuleParams = moduleparams; this.Namespaces = pagenamespaces; this.PropertyListXML = propdata.GetPropertyList(pagedata, base.PresentationXML, this.PredicateURI, false, true, false); }
public PropertyList(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { XmlDocument presentationxml = base.PresentationXML; SessionManagement sm = new SessionManagement(); Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO(); this.PropertyListXML = data.GetPropertyList(pagedata, presentationxml, "", false, false, true); mp = new ModulesProcessing(); }
public EditPersonalGadget(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); base.BaseData = pagedata; data = new Profiles.ORNG.Utilities.DataIO(); Profiles.Edit.Utilities.DataIO editdata = new Profiles.Edit.Utilities.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //create a new network triple request. base.RDFTriple = new RDFTriple(this.SubjectID, editdata.GetStoreNode(this.PredicateURI)); base.RDFTriple.Expand = true; base.RDFTriple.ShowDetails = true; base.GetDataByURI();//This will reset the data to a Network. // Profiles OpenSocial Extension by UCSF uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value; uri = uri.Substring(0, uri.IndexOf(Convert.ToString(this.SubjectID)) + Convert.ToString(this.SubjectID).Length); appId = Convert.ToInt32(base.GetModuleParamString("AppId")); om = OpenSocialManager.GetOpenSocialManager(uri, Page, true); gadget = om.AddGadget(appId, base.GetModuleParamString("View"), base.GetModuleParamString("OptParams")); securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = this.PredicateURI; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); hasGadget = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@NumberOfConnections").Value) > 0; }
public CustomEditEagleI(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); base.BaseData = pagedata; Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Edit.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; //create a new network triple request. base.RDFTriple = new RDFTriple(this.SubjectID, data.GetStoreNode(predicateuri)); base.RDFTriple.Expand = true; base.RDFTriple.ShowDetails = true; base.GetDataByURI();//This will reset the data to a Network. securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { if (PubMedResults.Tables.Count > 0) { grdPubMedSearchResults.DataSource = PubMedResults; grdPubMedSearchResults.DataBind(); } } else { Session["phAddPub.Visible"] = null; Session["pnlAddPubMed.Visible"] = null; Session["pnlAddCustomPubMed.Visible"] = null; Session["pnlDeletePubMed.Visible"] = null; } // a flag to inform the ucProfileBaseInfo that it is edit page Session["ProfileEdit"] = "true"; Session["ProfileUsername"] = _personId; if (_personId == 0) { if (Session["CurrentPersonEditing"] != null) { _personId = System.Convert.ToInt32(Session["CurrentPersonEditing"]); } } else { Session["CurrentPersonEditing"] = _personId; } Edit.Utilities.DataIO data; data = new Edit.Utilities.DataIO(); string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + _subject + "'>Edit Menu</a>" + " > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { if (PubMedResults.Tables.Count > 0) { grdPubMedSearchResults.DataSource = PubMedResults; grdPubMedSearchResults.DataBind(); } } else { Session["phAddPub.Visible"] = null; Session["pnlAddPubMed.Visible"] = null; Session["pnlAddCustomPubMed.Visible"] = null; Session["pnlDeletePubMed.Visible"] = null; } if (_personId == 0) { if (Session["CurrentPersonEditing"] != null) { _personId = System.Convert.ToInt32(Session["CurrentPersonEditing"]); } } else { Session["CurrentPersonEditing"] = _personId; } Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO data; data = new Profiles.Edit.Modules.CustomEditAuthorInAuthorship.DataIO(); string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); litBackLink.Text = "<a href='" + Root.Domain + "/edit/default.aspx?subject=" + _subject + "'>Edit Menu</a>" + " > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; Boolean disambig = data.GetDisambiguationSettings(_personId); rblDisambiguationSettings.SelectedValue = disambig ? "enable" : "disable"; lblDisambigStatus.Text = disambig ? "Automatically adding publications to my profile." : "Not automatically adding publications to my profile."; }
public CustomEditORCID(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { SessionManagement sm = new SessionManagement(); this.XMLData = pagedata; data = new Edit.Utilities.DataIO(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); if (Request.QueryString["subject"] != null) { this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]); } else if (base.GetRawQueryStringItem("subject") != null) { this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); } else { Response.Redirect("~/search"); } string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#"); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false); this.PredicateID = data.GetStoreNode(predicateuri); base.GetNetworkProfile(this.SubjectID, this.PredicateID); litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = predicateuri; securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); securityOptions.SecurityGroups = new XmlDataDocument(); securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); securityOptions.BubbleClick += SecurityDisplayed; string orcidHelpLink = string.Empty; string orcidInfoSite = Profiles.ORCID.Utilities.config.InfoSite; if (!string.IsNullOrEmpty(orcidInfoSite)) { orcidHelpLink = " <a style='border: none;' href='" + orcidInfoSite + "' target='_blank'>click here.</a>"; litOrcidInfolink.Text = "For more info about ORCID" + orcidHelpLink; } //litCreateProvideORCID.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/CreateMyORCID.aspx'>Create My ORCID</a>" + orcidHelpLink + "<br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/ProvideORCID.aspx'>Provide My ORCID</a>" + orcidHelpLink; //litUploatInfoToORCID.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/UploadInfoToORCID.aspx'>Upload Info To ORCID</a>"; string loggedInInternalUsername = new Profiles.ORCID.Utilities.DataIO().GetInternalUserID(); //Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person person = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().GetByInternalUsername(loggedInInternalUsername); String orcid = null; try { orcid = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:orcidId", base.Namespaces).InnerText; } catch (Exception ex) { } if (orcid == null) { pnlAddORCID.Visible = true; pnlEditORCID.Visible = false; orcidtable.Visible = false; pnlORCIDProxy.Visible = false; } else { litORCIDID.Text = "<a href='" + Profiles.ORCID.Utilities.config.ORCID_URL + "/" + orcid + "'>" + orcid + "</a>"; pnlAddORCID.Visible = false; pnlEditORCID.Visible = true; orcidtable.Visible = true; pnlORCIDProxy.Visible = false; } if (Profiles.ORCID.Utilities.DataIO.getNodeIdFromInternalUserName(loggedInInternalUsername) != this.SubjectID) { pnlORCIDProxy.Visible = true; imbProvideMyORCID.Visible = false; lbProvideMyORCID.Visible = false; imbUploadToORCID.Visible = false; lbUploadToORCID.Visible = false; } if (data.GetSessionSecurityGroup() == -50) { pnlORCIDAdmin.Visible = true; litORCIDAdmin.Text = "<img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/CreateBatch.aspx'>Batch Upload</a><br><img src='" + Root.Domain + "/framework/images/icon_squareArrow.gif' border='0'/> <a href='" + Root.Domain + "/ORCID/UpdateSecurityGroupDefaultDecisions.aspx'>ORCID Privacy Mapping</a></li>"; } }
protected void FillPropertyGrid(bool refresh) { if (refresh) { base.GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false); } List <LiteralState> literalstate = new List <LiteralState>(); bool editexisting = false; bool editaddnew = false; bool editdelete = false; if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditExisting").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editexisting = true; } if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditAddNew").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editaddnew = true; } if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditDelete").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editdelete = true; } if (!editaddnew) { btnEditProperty.Visible = false; imbAddArrow.Visible = false; } this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); this.PredicateURI = Server.UrlDecode(base.GetRawQueryStringItem("predicateuri").Replace("!", "#")); this.PredicateID = data.GetStoreNode(this.PredicateURI); foreach (XmlNode property in this.PropertyListXML.SelectNodes("PropertyList/PropertyGroup/Property/Network/Connection")) { literalstate.Add(new LiteralState(this.SubjectID, this.PredicateID, data.GetStoreNode(property.InnerText.Trim()), property.InnerText.Trim(), editexisting, editdelete)); } btnEditProperty.Visible = true; imbAddArrow.Visible = true; if (literalstate.Count > 0) { GridViewProperty.DataSource = literalstate; GridViewProperty.DataBind(); lblNoItems.Visible = false; GridViewProperty.Visible = true; // not sure of this if (MaxCardinality == literalstate.Count.ToString()) { btnEditProperty.Visible = false; imbAddArrow.Visible = false; btnInsertProperty.Visible = false; } } else { lblNoItems.Visible = true; GridViewProperty.Visible = false; if (MaxCardinality == "1") // not sure about this { btnInsertProperty.Visible = false; } upnlEditSection.Update(); } }
private void DrawProfilesModule() { List <GenericListItem> gli = new List <GenericListItem>(); bool canedit = false; Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO(); List <List <SecurityItem> > si = new List <List <SecurityItem> >(); List <SecurityItem> singlesi; this.Dropdown = new List <GenericListItem>(); this.PropertyList = data.GetPropertyList(this.BaseData, base.PresentationXML, "", true, true, false); this.Subject = Convert.ToInt64(Request.QueryString["subject"]); this.SecurityGroups = new XmlDocument(); this.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml); litBackLink.Text = "<h2>Edit Menu</h2>"; foreach (XmlNode group in this.PropertyList.SelectNodes("//PropertyList/PropertyGroup")) { singlesi = new List <SecurityItem>(); foreach (XmlNode node in group.SelectNodes("Property")) { if (node.SelectSingleNode("@EditExisting").Value == "false" && node.SelectSingleNode("@EditAddExisting").Value == "false" && node.SelectSingleNode("@EditAddNew").Value == "false" && node.SelectSingleNode("@EditDelete").Value == "false") { canedit = false; } else { canedit = true; } string objecttype = string.Empty; switch (node.SelectSingleNode("@ObjectType").Value) { case "1": objecttype = "Literal"; break; case "0": objecttype = "Entity"; break; } string editlink = "<a class=listTableLink href=\"" + Root.Domain + "/edit/default.aspx?subject=" + this.Subject.ToString() + "&predicateuri=" + node.SelectSingleNode("@URI").Value.Replace("#", "!") + "&module=DisplayItemToEdit&ObjectType=" + objecttype + "\" >" + node.SelectSingleNode("@Label").Value + "</a>"; singlesi.Add(new SecurityItem(node.ParentNode.SelectSingleNode("@Label").Value, node.SelectSingleNode("@Label").Value, node.SelectSingleNode("@URI").Value, Convert.ToInt32(node.SelectSingleNode("@NumberOfConnections").Value), Convert.ToInt32(node.SelectSingleNode("@ViewSecurityGroup").Value), this.SecurityGroups.SelectSingleNode("SecurityGroupList/SecurityGroup[@ID='" + node.SelectSingleNode("@ViewSecurityGroup").Value + "']/@Label").Value, node.SelectSingleNode("@ObjectType").Value, canedit, editlink)); } si.Add(singlesi); } string uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value; foreach (XmlNode securityitem in this.SecurityGroups.SelectNodes("SecurityGroupList/SecurityGroup")) { this.Dropdown.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value, securityitem.SelectSingleNode("@ID").Value)); gli.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value, securityitem.SelectSingleNode("@Description").Value)); } repPropertyGroups.DataSource = si; repPropertyGroups.DataBind(); BuildSecurityKey(gli); }