Exemplo n.º 1
0
        public ActionResult Ekle(VMMuvekkilEkle gelen)
        {
            if (ModelState.IsValid)
            {
                if (_kullaniciDAL.Get(x => x.TCKimlikNo == gelen.TCKimlikNo) == null)
                {
                    Kullanici yeniKullanici = new Kullanici()
                    {
                        Admin      = false,
                        Adres      = gelen.Adres,
                        AdSoyad    = gelen.AdSoyad,
                        EMail      = gelen.EMail,
                        Sifre      = gelen.TCKimlikNo.Substring(5),
                        TCKimlikNo = gelen.TCKimlikNo,
                        Tel        = gelen.Tel,
                        AktifMi    = true
                    };

                    _kullaniciDAL.Add(yeniKullanici);

                    return(RedirectToActionPermanent("Liste"));
                }
            }
            return(View());
        }
Exemplo n.º 2
0
        public void CheckMail(string mail)
        {
            Kullanici user = _kullaniciDAL.Get(a => a.Mail == mail);

            if (user != null)
            {
                throw new Exception("Bu mail adresi zaten kayıtlı");
            }
        }
Exemplo n.º 3
0
        // GET: Portal/Muvekkil
        public ActionResult Index()
        {
            string          tc       = Session["portal"].ToString();
            Kullanici       muvekkil = _kullaniciDAL.Get(x => x.TCKimlikNo == tc && x.AktifMi == true);
            VMProfilDuzenle profil   = new VMProfilDuzenle()
            {
                Adres       = muvekkil.Adres,
                EMail       = muvekkil.EMail,
                AdSoyad     = muvekkil.AdSoyad,
                Sifre       = muvekkil.Sifre,
                SifreTekrar = muvekkil.Sifre,
                Tel         = muvekkil.Tel
            };

            return(View(profil));
        }
Exemplo n.º 4
0
 public ActionResult Index(VMLogin model)
 {
     if (ModelState.IsValid)
     {
         Kullanici admin = _kullaniciDAL.Get(x => x.TCKimlikNo == model.TCKimlikNo && x.Sifre == model.Sifre && x.Admin == true);
         if (admin != null)
         {
             Session["admin"] = admin.TCKimlikNo;
             return(RedirectToActionPermanent("Index", "Home"));
         }
         else
         {
             TempData["hata"] = "TC Kimlik No yada Şifre Hatalı.";
         }
     }
     return(View());
 }
Exemplo n.º 5
0
 public ActionResult Index(VMLogin model)
 {
     if (ModelState.IsValid)
     {
         Kullanici user = _kullaniciDAL.Get(x => x.TCKimlikNo == model.TCKimlikNo && x.Sifre == model.Sifre && x.Admin == false);
         if (user != null)
         {
             Session["portal"] = user.TCKimlikNo;
             return(RedirectToAction("Index", "Home"));
         }
         else
         {
             TempData["hata"] = "TC Kimlik No yada Şifre Hatalı.";
         }
     }
     return(View());
 }