Exemplo n.º 1
0
        public ActionResult LoginCheck(User us )
        {
            var type= Request["optradio"];
            //User us = new User();
            //us.UserName=Request["email"];
            //us.Password=Request["password"];
            //var usr=db.Users.First(x=>x.UserName==us.UserName && x.Password==us.Password);
            var usr = from x in db.Users
                      where (x.UserName == us.UserName && x.Password == us.Password)
                      select x;

            if (usr != null )
            {
                if (type.ToString() == "User")
                {
                    return RedirectToAction("Successful");
                }
                else if(type.ToString() =="Admin")
                {
                    return RedirectToAction("SuccessfulAdmin");
                }
            }
            return RedirectToAction("Login");
        }
Exemplo n.º 2
0
 partial void UpdateUser(User instance);
Exemplo n.º 3
0
 partial void DeleteUser(User instance);
Exemplo n.º 4
0
 partial void InsertUser(User instance);