AddExistingEntity() публичный Метод

public AddExistingEntity ( System.Int64 subjectid, System.Int64 predicateid, System.Int64 objectid ) : bool
subjectid System.Int64
predicateid System.Int64
objectid System.Int64
Результат bool
        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 AddNewEntity()
        {
            Utilities.DataIO data           = new Profiles.Edit.Utilities.DataIO();
            string           newentity      = txtNewEntity.Text.Trim();
            string           entityclassuri = ddlAddNewPropertyList.SelectedValue.Trim();

            Session["pnlAddBySearch.Visible"] = null;
            Session["pnlAddByURI.Visible"]    = null;
            Int64 entityid = 0;

            entityid = data.AddNewEntity(newentity, entityclassuri);

            data.AddExistingEntity(this.SubjectID, this.PredicateID, entityid);

            this.LoadEntityGrid(true);
        }
        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 AddNewEntity()
        {
            Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            string newentity = txtNewEntity.Text.Trim();
            string entityclassuri = ddlAddNewPropertyList.SelectedValue.Trim();

            Session["pnlAddBySearch.Visible"] = null;
            Session["pnlAddByURI.Visible"] = null;
            Int64 entityid = 0;
            entityid = data.AddNewEntity(newentity, entityclassuri);

            data.AddExistingEntity(this.SubjectID, this.PredicateID, entityid);

            this.LoadEntityGrid(true);
        }
        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("&nbsp;&nbsp;&nbsp;");
                }
                //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;
            }
        }
        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("&nbsp;&nbsp;&nbsp;");
                }
                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;
            }
        }