public void RegisterTest() { AccountInfo account = new AccountInfo() { UserName = "******", Password = "******" }; // TODO: 初始化为适当的值 object[] expected = null; // TODO: 初始化为适当的值 object[] actual; actual = AccountBL.Register(account); Console.WriteLine("{0},{1}", actual[0], actual[1]); }
public object[] Register(AccountInfo account) { if (string.IsNullOrEmpty(account.UserName) || string.IsNullOrEmpty(account.Password)) { return null; } return SqlMapper.QueryForObject<object[]>("AccountInfoMap.Register", account); }
private static void AccountCookieSet(AccountInfo account) { HttpCookie cookie = AccountCookieGet(); cookie.Value = GetCryptographyString(string.Format("{0}|{1}|{2}|{3}", Context.Request.UserHostName, account.UserName, account.Id, DateTime.Now.Ticks)); CacheCommand<AccountInfo> cache = new CacheCommand<AccountInfo>(cookie.Value); cache.Set(account, cookie.Expires); if (Context.Request.Cookies.Get(cookie.Name) == null) { Context.Response.Cookies.Add(cookie); } else { Context.Response.Cookies.Set(cookie); } }
public static object[] Register(AccountInfo account) { return localDao.Register(account); }