/// <summary> /// 載入點名活動 /// </summary> /// <param name="token"></param> /// <param name="outerKey"></param> public void SignIn_LoadMultipleDetails(Guid token, string outerKey) { var tokenInfo = CheckToken(token.ToString()); if (tokenInfo == null) { return; } try { // 是否為合法使用者 var auth = new ServerCheckItem(); var check = AuthCheck(token, ref auth); if (check) { var authService = new AuthService(); // 將outerKey轉回event guid var tokenArray = new List <Guid>(); outerKey.Split(',').ToList().ForEach(item => tokenArray.Add(Service.Utility.OuterKeyHelper.PageTokenToGuid(item))); var activityInfo = signInService.GetSignInInfomation(tokenArray.FirstOrDefault()); var checkisAdminRole = authService.CheckFunctionAuth(activityInfo.LearningId, SignInFunction.Admin, tokenInfo.MemberId); // 取出點名活動、簽到記錄 var param = new SignInEventParam() { EventIds = tokenArray, MemberId = auth.MemberId }; var obj = signInService.GetMutipEventData(param, checkisAdminRole); Clients.Caller.renderMultipleDetails(obj); } else { Clients.Caller.onError("SignIn_LoadMultipleDetails", "身分驗證失敗,請重新登入!token:[" + token + "]"); } } catch (Exception ex) { var msg = string.Format("{0}\n\n{1}", ex.Message, ex.StackTrace); Clients.Caller.onError("SignIn_LoadMultipleDetails", "載入點名細節發生意外: " + msg); } }