Beispiel #1
0
 /// <summary>
 /// 更新活動持續時間
 /// </summary>
 /// <param name="token"></param>
 /// <param name="circleKey"></param>
 /// <param name="outerKey"></param>
 /// <param name="duration"></param>
 public void SignIn_UpdateDuration(Guid token, string circleKey, string outerKey, int duration)
 {
     try
     {
         var auth = new ServerCheckItem()
         {
             CircleKey = circleKey, OuterKey = outerKey, ModuleFun = SignInFunction.Admin
         };
         bool check = AuthCheck(token, ref auth);
         if (check)
         {
             if (auth.ModuleAuth)
             {
                 signInService.UpdateDuration(auth.EventId, auth.MemberId, duration);
                 //2017-01-09 暫時先給APP整個點名物件(未來調整為最省資源)
                 var rtn = signInService.GetSignInEvent(auth.EventId, auth.MemberId);
                 Clients.Group(circleKey.ToLower()).signIn_DurationChanged(outerKey, rtn);
             }
         }
         else
         {
             Clients.Caller.onError("SignIn_UpdateDuration", "您沒有變更活動時間的權限");
         }
     }
     catch (Exception ex)
     {
         Clients.Caller.onError("SignIn_UpdateDuration", "變更點名活動時間發生意外: " + ex.Message);
     }
 }