Ejemplo n.º 1
0
        /// <summary>
        /// Create a new MemberGroup
        /// </summary>
        /// <param name="Name">The name of the MemberGroup</param>
        /// <param name="u">The creator of the MemberGroup</param>
        /// <returns>The new MemberGroup</returns>
        public static MemberGroup MakeNew(string Name, BusinessLogic.User u)
        {
            Guid newId = Guid.NewGuid();

            CMSNode.MakeNew(-1, _objectType, u.Id, 1, Name, newId);
            MemberGroup  mg = new MemberGroup(newId);
            NewEventArgs e  = new NewEventArgs();

            mg.OnNew(e);
            return(mg);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new MemberGroup
        /// </summary>
        /// <param name="Name">The name of the MemberGroup</param>
        /// <param name="u">The creator of the MemberGroup</param>
        /// <returns>The new MemberGroup</returns>
        public static MemberGroup MakeNew(string Name, BusinessLogic.User u)
        {
            var group = new global::Umbraco.Core.Models.MemberGroup {
                Name = Name
            };

            ApplicationContext.Current.Services.MemberGroupService.Save(group);

            var mg = new MemberGroup(group);
            var e  = new NewEventArgs();

            mg.OnNew(e);
            return(mg);
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Create a new MemberGroup
		/// </summary>
		/// <param name="Name">The name of the MemberGroup</param>
		/// <param name="u">The creator of the MemberGroup</param>
		/// <returns>The new MemberGroup</returns>
		public static MemberGroup MakeNew(string Name, BusinessLogic.User u) 
		{
			Guid newId = Guid.NewGuid();
			CMSNode.MakeNew(-1,_objectType, u.Id, 1,  Name, newId);
			MemberGroup mg = new MemberGroup(newId);
            NewEventArgs e = new NewEventArgs();
            mg.OnNew(e);
            return mg;
		}