/// <summary> /// allows a user to sign up for or cancel membership to a group /// </summary> /// <param name="groupID"></param> /// <param name="active"></param> /// <returns></returns> public ActionResult SignUpCancelGroup(string groupID, bool active) { string message = ""; if (active) { _userManager.DeleteUserGroup(_userManager.RetrieveUserIDFromEmail(User.Identity.Name), groupID); message = groupID + " Ministry Canceled"; } else { _groupManager.AddUnapprovedPersonGroup(_userManager.RetrieveUserIDFromEmail(User.Identity.Name), groupID); message = groupID + " Ministry Applied for"; } return(RedirectToAction("PersonGroups", new { message = message })); }
// This event handler is fired when the sign up button is clicked. It puts the user in a wailist for the selected group. private void BtnSignup_Click(object sender, RoutedEventArgs e) { try { var group = lbGroups.SelectedItem.ToString(); if (_groupManager.AddUnapprovedPersonGroup(_user.PersonID, lbGroups.SelectedItem.ToString())) { populateWaitlist(); populateGroups(); MessageBox.Show("You have been added to the wait list for the " + group + " group."); } } catch (Exception) { MessageBox.Show("You must make a group selection."); } }