Пример #1
0
 public bool IsLogin()
 {
     using ( AccountService.AccountServiceClient proxy = new AccountService.AccountServiceClient())
     {
         try
         {
             return proxy.IsLogin(Session);
         }
         catch (FaultException<HCSMSException> ex)
         {
             raiseError(ex);
             return false;
         }
         catch (Exception ex)
         {
             raiseError(ex);
             throw ex;
         }
     }
 }
        //check for user authentication
        private bool IsAuthorize(Session session)
        {
            using (AccountService.AccountServiceClient proxy = new AccountService.AccountServiceClient())
            {
                try
                {

                    return proxy.IsLogin(session);

                }
                catch (FaultException<HCSMSException> ex)
                {
                    raiseError(ex);
                    return false;
                }
                catch (Exception ex)
                {
                    raiseError(ex);
                    return false;
                }

            }
        }