/// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     if (Request.Cookies["accountId"] != null)
     {
         AccountDao accountDao = new AccountDao();
         Session["account"] = accountDao.GetAccountById(Convert.ToInt32(Request.Cookies["accountId"].Value));
         Response.Redirect("Main.aspx");
         return;
     }
 }
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     if (Request.Cookies["accountId"] != null)
     {
         AccountDao accountDao = new AccountDao();
         Session["account"] = accountDao.GetAccountById(Convert.ToInt32(Request.Cookies["accountId"].Value));
     }
     if (Session["account"] != null)
     {
         Account account = (Account)Session["account"];
         btnLogin.Text    = account.Username;
         btnRegister.Text = "购物车";
         btnHelp.Text     = "退出";
     }
 }
        public Account GetSingleAccount(Guid accountId)
        {
            var accountDao = new AccountDao();

            return(accountDao.GetAccountById(accountId));
        }