public string GetCallbackResult() { if (applyHistoryID > 0) { var ah = ClubLogic.GetApplyHistory(applyHistoryID); if (ah != null && ah.IsAccepted == null) { var count = ClubLogic.GetClubMemberCount(ClubID); var quota = ClubLogic.GetClubMemberQuota(ClubID); if (!approved) { UserClubLogic.ApproveJoinClub(ah.ID.Value, approved, username); return("false"); } if (approved && count >= quota) { return(string.Empty); } UserClubLogic.ApproveJoinClub(ah.ID.Value, approved, username); //check if user joined clubs count has reached max count, if true, cancel all applications of this user var myClubs = ClubLogic.GetActiveUserClubs(userid); if (myClubs.Count >= ConfigGlobal.SingleUserMaxClubCount) { //cancel var applications = ClubLogic.GetActiveUserApplications(ah.Userid); foreach (var apply in applications) { UserClubLogic.ApproveJoinClub(apply.ID.Value, false, ClubSysPrivateMessage.ClubSysAdminName); } } return("true"); } return(string.Empty); } return(string.Empty); }