Esempio n. 1
0
		public static ContentItem MakeNew(string Name, ContentItemType cit, BusinessLogic.User u, int ParentId) 
		{			
			Guid newId = Guid.NewGuid();
			// Updated to match level from base node
			CMSNode n = new CMSNode(ParentId);
			int newLevel = n.Level;
			newLevel++;
			CMSNode.MakeNew(ParentId,_objectType, u.Id, newLevel,  Name, newId);
			ContentItem tmp = new ContentItem(newId);
			tmp.CreateContent(cit);
			return tmp;
		}
Esempio n. 2
0
		public static void DeleteFromType(ContentItemType cit) 
		{
			foreach (Content c in Content.getContentOfContentType(cit)) 
			{
				// due to recursive structure document might already been deleted..
				if (CMSNode.IsNode(c.UniqueId)) 
				{
					ContentItem tmp = new ContentItem(c.UniqueId);
					tmp.delete();
				}
			}
		}