Exemplo n.º 1
0
        public ActionResult Duzenle(Kullanici gelenKullanici)
        {
            var muvekkil = _kullaniciDAL.Get(x => x.TCKimlikNo == gelenKullanici.TCKimlikNo && x.Admin == false);

            muvekkil.AdSoyad = gelenKullanici.AdSoyad;
            muvekkil.Tel     = gelenKullanici.Tel;
            muvekkil.EMail   = gelenKullanici.EMail;
            muvekkil.Adres   = gelenKullanici.Adres;

            _kullaniciDAL.Update(muvekkil);

            TempData["mesaj"] = "Güncelleme İşlemi Başarılı";

            return(RedirectToActionPermanent("Liste"));
        }
Exemplo n.º 2
0
        public ActionResult Index(VMProfilDuzenle gelenKullanici)
        {
            if (ModelState.IsValid)
            {
                string    tc       = Session["portal"].ToString();
                Kullanici muvekkil = _kullaniciDAL.Get(x => x.TCKimlikNo == tc && x.AktifMi == true);

                muvekkil.AdSoyad = gelenKullanici.AdSoyad;
                if (gelenKullanici.Sifre == gelenKullanici.SifreTekrar)
                {
                    muvekkil.EMail = gelenKullanici.EMail;
                }
                else
                {
                    TempData["mesaj"] = "Şifreler Uyuşmuyor.";
                    return(View(gelenKullanici));
                }
                muvekkil.Sifre = gelenKullanici.SifreTekrar;
                muvekkil.Tel   = gelenKullanici.Tel;
                muvekkil.Adres = gelenKullanici.Adres;

                _kullaniciDAL.Update(muvekkil);
                TempData["basarili"] = "Güncelleme İşlemi Başarılı";

                return(View(gelenKullanici));
            }
            else
            {
                TempData["mesaj"] = "Hatalı İşlem Yaptınız. Lütfen Tekrar Deneyiniz.";
                return(View(gelenKullanici));
            }
        }
Exemplo n.º 3
0
 public bool Update(Kullanici entity)
 {
     return(_kullaniciDAL.Update(entity) > 0);
 }