コード例 #1
0
        public static bool GirisOnay(Kullanici K)
        {
            KullaniciYonetimi KY = new KullaniciYonetimi();
            if (K != null)
            {
                if (KY.KullaniciVarMi(K))
                {
                    return true;
                }
                else
                {

                    return false;
                }

            }
            else
            {
                return false;
            }
        }
コード例 #2
0
        public ActionResult Login(Kullanici K)
        {
            KullaniciYonetimi KY = new KullaniciYonetimi();
            try
            {

                if (KY.KullaniciVarMi(K))
                {
                    Session["Kullanici"] = KY.KullaniciGetir(K);
                    return Redirect("Index");
                }
                else
                {
                    ViewBag.Hata = "Kullanici adı & şifre hatalı";
                    return View(K);
                }
            }
            catch (Exception)
            {

                return Redirect("Login");
            }
        }
コード例 #3
0
        public ActionResult Login()
        {
            KullaniciYonetimi KY = new KullaniciYonetimi();
            if (Session["Kullanici"]!=null)
            {
                if (KY.KullaniciVarMi((Kullanici)Session["Kullanici"]))
                {
                    return Redirect("Index");
                }
                else
                {
                    ViewBag.Hata = "Kullanici adı & şifre hatalı";
                    return View();
                }

            }
            else
            {
                return View();
            }
        }