示例#1
0
        protected virtual void LoginIn(string sUserName, string sPassword, string clientIP, string clientName, int port)
        {
            LoginInfo login = AccountUtil.LogIn(sUserName, sPassword, clientIP, clientName, port);

            if (login.Status == LoginStatus.Failed)
            {
                throw new ApplicationException(login.Message);
            }
            else
            {
                //AccountPrincipal principal = new AccountPrincipal(login.User);
                //Context.User = principal;
            }
        }
示例#2
0
 public void LogOut()
 {
     AccountUtil.LogOut(AccountUtil.Login);
 }