예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Cookies["ht_id"] == null && Request.Cookies["ht_pwd"] == null)
     {
         Response.Redirect("login.html");
     }
     else
     {
         BLL.user bll_user = new BLL.user();
         list_user = bll_user.GetModelList("");
     }
 }
예제 #2
0
        public ActionResult Login()
        {
            BLL.user          userBll   = new BLL.user();
            string            LoginName = Request["userName"];
            string            pwd       = Request["pwd"];
            string            sql       = "loginName='" + LoginName + "' and PWD='" + pwd + "' and validFlag='1' ";
            List <Model.user> userlist  = userBll.GetModelList(sql);

            if (userlist.Count > 0)
            {
                ViewData["ID"] = userlist[0].ID;
                return(View("./Index"));
            }
            return(View());
        }