private void EmailKontrolu(Uye uye)
 {
     if (_uyeDal.Get(m => m.Email == uye.Email) != null)
     {
         throw new Exception("Bu kullanıcı daha önce kayıt olmuştur");
     }
 }
示例#2
0
        public ActionResult Index(Uye uye, Admin admin)
        {
            var kullanici      = _uyeDal.Get(x => x.Email == uye.Email && x.Sifre == uye.Sifre);
            var adminkullanici = _adminDal.Get(x => x.Email == admin.Email && x.Sifre == admin.Sifre);

            if (kullanici != null)
            {
                FormsAuthentication.SetAuthCookie(kullanici.Email, false);
                return(RedirectToAction("Index", "Profilim"));
            }
            if (adminkullanici != null)
            {
                //FormsAuthentication.SetAuthCookie(kullanici.Email, false);
                return(RedirectToAction("Index", "Admin"));
            }
            else
            {
                return(View());
            }
        }
示例#3
0
 public Uye Get(int id)
 {
     return(_uyeDal.Get(x => x.Id == id));
 }
示例#4
0
 public Uye GetById(int uyeId)
 {
     return(uyeDal.Get(p => p.uyeNo == uyeId));
 }