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));
        }