public GetStoreNode ( string value ) : System.Int64 | ||
value | string | |
리턴 | System.Int64 |
public EditObjectTypeProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { Edit.Utilities.DataIO data; SessionManagement sm = new SessionManagement(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.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"); this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false); this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + this.PropertyLabel + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = PredicateURI; this.PredicateID = data.GetStoreNode(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); }
private void UpdateVisibility() { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); int securitygroup = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode(this.PredicateURI), securitygroup); if (securitygroup >= -10 && securitygroup < 0) { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), -20); } else { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), securitygroup); } }
protected void gridEntities_RowDeleting(object sender, GridViewDeleteEventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); Int64 _object = Convert.ToInt64(data.GetStoreNode(gridEntities.DataKeys[e.RowIndex].Values[0].ToString())); data.DeleteTriple(this.SubjectID, this.PredicateID, _object); this.LoadEntityGrid(true); upnlEditSection.Update(); }
protected void ibDown_Click(object sender, EventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); gridEntities.EditIndex = -1; GridViewRow row = ((ImageButton)sender).Parent.Parent as GridViewRow; Int64 _object = Convert.ToInt64(data.GetStoreNode(gridEntities.DataKeys[row.RowIndex].Values[0].ToString())); data.MoveTripleUp(this.SubjectID, this.PredicateID, _object); this.LoadEntityGrid(true); upnlEditSection.Update(); }
private void SaveEntityByURI(string uri) { Int64 objectid = 0; Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); objectid = data.GetStoreNode(uri.Trim()); Session["pnlAddBySearch.Visible"] = null; Session["pnlAddByURI.Visible"] = null; data.AddExistingEntity(SubjectID, PredicateID, objectid); this.LoadEntityGrid(true); }
private void UpdateSecuritySetting(string securitygroup) { // maybe be able to make this more general purpose if (this.PredicateURI.StartsWith(Profiles.ORNG.Utilities.OpenSocialManager.ORNG_ONTOLOGY_PREFIX)) { Profiles.ORNG.Utilities.DataIO data = new Profiles.ORNG.Utilities.DataIO(); if ("0".Equals(securitygroup)) { data.RemovePersonalGadget(this.Subject, this.PredicateURI); } else { data.AddPersonalGadget(this.Subject, this.PredicateURI); } } else if (!"0".Equals(securitygroup)) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); } //Framework.Utilities.Cache.AlterDependency(this.Subject.ToString()); }
public EditObjectTypeProperty(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { Edit.Utilities.DataIO data; SessionManagement sm = new SessionManagement(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.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"); } this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false); this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + this.PropertyLabel + "</b>"; securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = PredicateURI; this.PredicateID = data.GetStoreNode(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); }
private void UpdateSecuritySetting(string securitygroup) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); }
private void UpdateVisibility() { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); int securitygroup = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value); data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode(this.PredicateURI), securitygroup); if (securitygroup >= -10 && securitygroup < 0) { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), -20); } else { data.UpdateSecuritySetting(this.SubjectID, data.GetStoreNode("http://vivoweb.org/ontology/core#email"), securitygroup); } }
private void SaveEntityByURI(string uri) { Int64 objectid = 0; Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); objectid = data.GetStoreNode(uri.Trim()); Session["pnlAddBySearch.Visible"] = null; Session["pnlAddByURI.Visible"] = null; data.AddExistingEntity(SubjectID, PredicateID, objectid); this.LoadEntityGrid(true); }
protected void ibUp_Click(object sender, EventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); gridEntities.EditIndex = -1; GridViewRow row = ((ImageButton)sender).Parent.Parent as GridViewRow; Int64 _object = Convert.ToInt64(data.GetStoreNode(gridEntities.DataKeys[row.RowIndex].Values[0].ToString())); data.MoveTripleDown(this.SubjectID, this.PredicateID, _object); this.LoadEntityGrid(true); upnlEditSection.Update(); }
protected void gridEntities_RowDeleting(object sender, GridViewDeleteEventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); Int64 _object = Convert.ToInt64(data.GetStoreNode(gridEntities.DataKeys[e.RowIndex].Values[0].ToString())); // ULTIMATE HACK TO END ALL HACKS START if (this.PredicateID == 1445 || this.PredicateID == 1472) { long nodeIDOfGrantProfilePage = _object; string grantid = data.getGrantIDFromResearchRoleNodeID(nodeIDOfGrantProfilePage); if (grantid != " ") { data.DeleteOneGrant(Convert.ToInt32(Session["ProfileUsername"]), grantid); } else { data.DeleteTriple(this.SubjectID, this.PredicateID, _object); } } else { data.DeleteTriple(this.SubjectID, this.PredicateID, _object); } // ULTIMATE HACK TO END ALL HACKS END this.LoadEntityGrid(true); upnlEditSection.Update(); }
public EditObjectTypeProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) : base(pagedata, moduleparams, pagenamespaces) { Edit.Utilities.DataIO data; SessionManagement sm = new SessionManagement(); Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO(); data = new Profiles.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"); this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#"); GetSubjectProfile(); this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false); this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value; litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> > <b>" + this.PropertyLabel + "</b>"; //Quick add for adding a note on the format of grant info when adding manually if (PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/@Label").Value == "Research") { litGrantNote1.Text = "Please use the following format when adding the grant information: "; litGrantNote2.Text = "Funding Agency: Agency Name - Title: Grant Title - Award Number: Grant ID Number - Total direct costs: $amount - Start Date: yyyy-mm-dd - End Date: yyyy-mm-dd <br /> Or for subaward:<br /> Subaward: Name of Pass-Through Institution - Funding Agency: Agency Name - Title: Grant Title - Award Number: Grant ID Number - Total direct costs: $amount - Start Date: yyyy-mm-dd - End Date: yyyy-mm-dd"; } //Quick fix to allow only Admin and Curators to edit Visibility privacy securityOptions.userRole = propdata.GetUserRole(sm.Session().SessionID); if (securityOptions.userRole == -40 || securityOptions.userRole == -50) { securityOptions.FindControl("imbSecurityOptions").Visible = true; securityOptions.FindControl("lbSecurityOptions").Visible = true; } else { securityOptions.FindControl("imbSecurityOptions").Visible = false; securityOptions.FindControl("lbSecurityOptions").Visible = false; } securityOptions.Subject = this.SubjectID; securityOptions.PredicateURI = PredicateURI; this.PredicateID = data.GetStoreNode(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); this._subject = Convert.ToInt64(Request.QueryString["subject"]); this._personId = data.GetPersonID(_subject); }
public void DrawProfilesModule() { Framework.Utilities.DataIO data = new Profiles.Framework.Utilities.DataIO(); if (Request.Form["hdnSelectedURI"] != string.Empty && Request.Form["hdnSelectedURI"] != null) { Edit.Utilities.DataIO editdata = new Profiles.Edit.Utilities.DataIO(); string newentity = string.Empty; newentity = Request.Form["hdnSelectedURI"].Trim(); Int64 _object = Convert.ToInt64(editdata.GetStoreNode(newentity)); editdata.AddExistingEntity(this.SubjectID, this.PredicateID, _object); Session["pnlAddBySearch.Visible"] = null; this.LoadEntityGrid(true); } else { LoadEntityGrid(false); } XmlDocument list = data.GetPropertyRangeList(this.PredicateURI); List<GenericListItem> propertylist = new List<GenericListItem>(); string space = string.Empty; foreach (XmlNode property in list.SelectNodes("PropertyRangeList/PropertyRange")) { for (int i = 0; i < Convert.ToInt16(property.SelectSingleNode("@Depth").Value); i++) { space += Server.HtmlDecode(" "); } //remove PI and Co-PI in drop down list when it's investigator, remove all other relationships besides "Advising Relationship" if (this.PropertyLabel == "investigator on" || this.PropertyLabel == "advisees") { if (property.SelectSingleNode("@Label").Value == "Investigator Role" || property.SelectSingleNode("@Label").Value == "Advising Relationship") { propertylist.Add(new GenericListItem(space + property.SelectSingleNode("@Label").Value, property.SelectSingleNode("@ClassURI").Value)); } } else { propertylist.Add(new GenericListItem(space + property.SelectSingleNode("@Label").Value, property.SelectSingleNode("@ClassURI").Value)); } space = string.Empty; } PropertyList = propertylist; if (ddlPropertyList.SelectedValue == string.Empty) { ddlPropertyList.DataSource = propertylist; ddlPropertyList.DataTextField = "Text"; ddlPropertyList.DataValueField = "Value"; ddlPropertyList.DataBind(); ddlPropertyList.Items.Insert(0, new ListItem("--- Select ---", "")); ddlPropertyList.SelectedValue = ""; ddlPropertyList.EnableViewState = true; } if (ddlAddNewPropertyList.SelectedValue == string.Empty) { ddlAddNewPropertyList.DataSource = propertylist; ddlAddNewPropertyList.DataTextField = "Text"; ddlAddNewPropertyList.DataValueField = "Value"; ddlAddNewPropertyList.DataBind(); ddlAddNewPropertyList.Items.Insert(0, new ListItem("--- Select ---", "")); ddlAddNewPropertyList.SelectedValue = ""; ddlAddNewPropertyList.EnableViewState = true; } }
protected void gridEntities_RowDeleting(object sender, GridViewDeleteEventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); Int64 _object = Convert.ToInt64(data.GetStoreNode(gridEntities.DataKeys[e.RowIndex].Values[0].ToString())); data.DeleteTriple(this.SubjectID, this.PredicateID, _object); this.LoadEntityGrid(true); upnlEditSection.Update(); }
private void UpdateSecuritySetting(string securitygroup) { // maybe be able to make this more general purpose if (this.PredicateURI.StartsWith(Profiles.ORNG.Utilities.OpenSocialManager.ORNG_ONTOLOGY_PREFIX)) { Profiles.ORNG.Utilities.DataIO dataORNG = new Profiles.ORNG.Utilities.DataIO(); if ("0".Equals(securitygroup)) { dataORNG.RemovePersonalGadget(this.Subject, this.PredicateURI); } else { dataORNG.AddPersonalGadget(this.Subject, this.PredicateURI); } } // else if (!"0".Equals(securitygroup)) // { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); // } Framework.Utilities.Cache.AlterDependency(this.Subject.ToString()); }
private void UpdateSecuritySetting(string securitygroup) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); //Framework.Utilities.Cache.AlterDependency(this.Subject.ToString()); }
public void DrawProfilesModule() { Framework.Utilities.DataIO data = new Profiles.Framework.Utilities.DataIO(); if (Request.Form["hdnSelectedURI"] != string.Empty && Request.Form["hdnSelectedURI"] != null) { Edit.Utilities.DataIO editdata = new Profiles.Edit.Utilities.DataIO(); string newentity = string.Empty; newentity = Request.Form["hdnSelectedURI"].Trim(); Int64 _object = Convert.ToInt64(editdata.GetStoreNode(newentity)); editdata.AddExistingEntity(this.SubjectID, this.PredicateID, _object); Session["pnlAddBySearch.Visible"] = null; this.LoadEntityGrid(true); } else { LoadEntityGrid(false); } XmlDocument list = data.GetPropertyRangeList(this.PredicateURI); List <GenericListItem> propertylist = new List <GenericListItem>(); string space = string.Empty; foreach (XmlNode property in list.SelectNodes("PropertyRangeList/PropertyRange")) { for (int i = 0; i < Convert.ToInt16(property.SelectSingleNode("@Depth").Value); i++) { space += Server.HtmlDecode(" "); } propertylist.Add(new GenericListItem(space + property.SelectSingleNode("@Label").Value, property.SelectSingleNode("@ClassURI").Value)); space = string.Empty; } PropertyList = propertylist; if (ddlPropertyList.SelectedValue == string.Empty) { ddlPropertyList.DataSource = propertylist; ddlPropertyList.DataTextField = "Text"; ddlPropertyList.DataValueField = "Value"; ddlPropertyList.DataBind(); ddlPropertyList.Items.Insert(0, new ListItem("--- Select ---", "")); ddlPropertyList.SelectedValue = ""; ddlPropertyList.EnableViewState = true; } if (ddlAddNewPropertyList.SelectedValue == string.Empty) { ddlAddNewPropertyList.DataSource = propertylist; ddlAddNewPropertyList.DataTextField = "Text"; ddlAddNewPropertyList.DataValueField = "Value"; ddlAddNewPropertyList.DataBind(); ddlAddNewPropertyList.Items.Insert(0, new ListItem("--- Select ---", "")); ddlAddNewPropertyList.SelectedValue = ""; ddlAddNewPropertyList.EnableViewState = true; } }
private void UpdateSecuritySetting(string securitygroup) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); //Framework.Utilities.Cache.AlterDependency(this.Subject.ToString()); }
private void UpdateSecuritySetting(string securitygroup) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); data.UpdateSecuritySetting(this.Subject, data.GetStoreNode(this.PredicateURI), Convert.ToInt32(securitygroup)); }