protected void vcNew_ClubChanged(object sender, ClubChangedEventArgs e) { if (e == null || e.EventClub == null) throw new ArgumentNullException(nameof(e)); Club.ClearCachedClub(e.EventClub.ID); // newly created - cache actually doesn't have things like the airport code, so force a reload when we redirect. Response.Redirect(String.Format(CultureInfo.InvariantCulture, "~/Member/ClubDetails.aspx/{0}", e.EventClub.ID)); }
protected void lnkLeaveGroup_Click(object sender, EventArgs e) { // Find the current user in the club members. ClubMember cm = CurrentClub.Members.FirstOrDefault(pf => String.Compare(pf.UserName, Page.User.Identity.Name, StringComparison.Ordinal) == 0); if (cm.RoleInClub == ClubMember.ClubMemberRole.Member) { cm.FDeleteClubMembership(); Club.ClearCachedClub(cm.ClubID); Response.Redirect(Request.Path); } }