public bool RegisterUser(string userName, string password) { bool result = false; UserAccount userAccount; if (table.Contains(userName)) { userAccount = (UserAccount)table[userName]; userAccount.RefreshAccountInfo(); if (userAccount.IsValid(userName, password)) { result = true; } } else { userAccount = new UserAccount(userName); if (!userAccount.IsNew) { if (userAccount.IsValid(userName, password)) { table.Add(userName, userAccount); result = true; } } } //if (result) // BllUser.Login(userName); BllUser.Login(userName, result); return(result); }
public static void Login(string username, bool success) { BllUser.Login(username, success); }