Пример #1
0
 protected void LogIn(object sender, EventArgs e)
 {
     Models.Account accountModel = new Models.Account();
     if (accountModel.checkLogin(txtUserName.Text, txtPassword.Text) != -1)
     {
         Bean.User userBean = accountModel.getUserSession();
         Session["fullName"]     = userBean.FullName1;
         Session["userid"]       = userBean.Userid;
         Session["userImageUrl"] = userBean.ImageUrl;
         Session["role"]         = userBean.Role;
         Session["password"]     = userBean.PassWord;
         if (userBean.Role == "1")
         {
             Response.Redirect("../Admin/GirlFriend/ManageGirlFriend.aspx");
         }
         else
         {
             Response.Redirect("../Default.aspx");
         }
     }
 }