Ejemplo n.º 1
0
        public void Ad_edit(string id_user, Ad_model edit)
        {
            List <string> Teg = edit.tags.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();

            if (this.Ad_user_id(edit.id) == id_user)
            {
                if (this.create(id_user, edit.type, Teg, edit.header, edit.data))
                {
                    neo4j_s.Del_node(edit.id.ToString());
                }
            }
        }
Ejemplo n.º 2
0
        private static List <Ad_model> Ad_model_list(List <INode> data)
        {
            List <Ad_model> models = new List <Ad_model>();

            foreach (var i in data)
            {
                Ad_model model = new Ad_model();
                model.id     = i.Id;
                model.header = i.Properties["header"].As <string>();
                model.data   = i.Properties["data"].As <string>();

                foreach (var j in type_standart.types(i.Id))
                {
                    model.type = j.Properties["name"].As <string>();
                }
                model.tags_list = new List <string>();
                foreach (var j in tag.tags(i.Id))
                {
                    model.tags_list.Add(j.Properties["name"].As <string>());
                }
                models.Add(model);
            }
            return(models);
        }