Example #1
0
        public string Toggle(int eventId)
        {
            var umbracoEvent = new Event(eventId);

            var currentMemberId = Members.GetCurrentMember().Id;
            if (currentMemberId > 0)
            {
                if (Relation.IsRelated(eventId, currentMemberId) == false)
                    umbracoEvent.SignUp(currentMemberId, "no comment");
                else
                    umbracoEvent.Cancel(currentMemberId, "no comment");
            }

            return "true";
        }
Example #2
0
 public static void SignUp(int memberId, int eventId)
 {
     Event e = new Event(eventId);
     e.SignUp(memberId, "no comment");
 }
Example #3
0
        public string SignUp(int eventId)
        {
            var currentMemberId = Members.GetCurrentMember().Id;

            if (currentMemberId > 0)
            {
                var umbracoEvent = new Event(eventId);
                umbracoEvent.SignUp(currentMemberId, "no comment");
            }

            return "true";
        }