Esempio n. 1
0
        public ActionResult login(Clint user)
        {
            // var usr = db.clint.Where(u => u.Name == user.Name && u.password == user.password).FirstOrDefault();
            var usr = db.clints.Where(u => u.username == user.username && u.password == user.password).FirstOrDefault();

            if (usr != null)
            {
                if (user.username == "kahraba")
                {
                    Session["id"]       = usr.id;
                    Session["username"] = "******";
                    return(RedirectToAction("loggedin"));
                }
                else
                {
                    Session["id"]       = usr.id;
                    Session["username"] = usr.username;
                    return(RedirectToAction("loggedin"));
                }
            }



            return(View());
        }
Esempio n. 2
0
    private void ActiveDialogueSprite(string name)
    {
        if (Joe != null)
        {
            if (name == "Detetive Joe")
            {
                Joe.SetActive(true);
            }
            else
            {
                Joe.SetActive(false);
            }
        }

        if (Clint != null)
        {
            if (name == "Clint")
            {
                Clint.SetActive(true);
            }
            else
            {
                Clint.SetActive(false);
            }
        }

        if (Bigboss != null)
        {
            if (name == "Big Boss")
            {
                Bigboss.SetActive(true);
            }
            else
            {
                Bigboss.SetActive(false);
            }
        }
    }