Exemplo n.º 1
0
        public IActionResult Index(ModelUser user)
        {
            tblKullanicilar tblKullanicilar = _ItblKullanicilarService.GetById(StaticValues.LoginId);
            ModelUser       model           = new ModelUser();

            model.name    = tblKullanicilar.Isim;
            model.surname = tblKullanicilar.Soyisim;
            tblKullanicilar kull = _ItblKullanicilarService.FindbyMail(user.kull.mail, user.icerik);

            if (kull == null)
            {
                model.isSuccessfull = false;
            }
            else
            {
                model.isSuccessfull = true;
                if (kull.aktif == 1)
                {
                    kull.aktif = 0;
                }
                else
                {
                    kull.aktif = 1;
                }
                _ItblKullanicilarService.Update(kull);
            }

            return(View(model));
        }
        public IActionResult Index(ModelUser model)
        {
            ModelUser user = new ModelUser();

            tblKullanicilar change = _ItblKullanicilarService.GetById(StaticValues.LoginId);

            if (model.password1 == model.password2 && model.password1 != null && model.password1 != "")
            {
                change.Sifre = model.password1;
                _ItblKullanicilarService.Update(change);
                user.isSuccessfull = true;
            }
            else
            {
                user.isSuccessfull = false;
            }
            user.name    = change.Isim;
            user.surname = change.Soyisim;
            return(View(user));
        }