public IActionResult Index()
        {
            tblKullanicilar tblKullanicilar = _ItblKullanicilarService.GetById(StaticValues.LoginId);
            ModelUser       model           = new ModelUser();

            model.name            = tblKullanicilar.Isim;
            model.surname         = tblKullanicilar.Soyisim;
            model.isSuccessfull   = null;
            model.yonetmenliklist = _ItblYonetmenlikService.GetAll();
            model.kanunlist       = ITblKanunService.GetAll();
            return(View(model));
        }
Exemplo n.º 2
0
        public IActionResult Index(ModelUser model)
        {
            tblKullanicilar tblKullanicilar = _ItblKullanicilarService.GetById(StaticValues.LoginId);
            ModelUser       user            = new ModelUser();

            user.name    = tblKullanicilar.Isim;
            user.surname = tblKullanicilar.Soyisim;
            if (model.cat == 1)
            {
                tblKanun temp = new tblKanun();
                temp.Adi   = model.baslik;
                temp.Id    = _ItblKanunService.GetAll().ToList().Count + 1;
                temp.Url   = model.url;
                temp.aktif = 0;
                _ItblKanunService.Add(temp);
                model.isSuccessfull = true;
            }
            else if (model.cat == 2)
            {
                tblyonetmenlik temp = new tblyonetmenlik();
                temp.Adi   = model.baslik;
                temp.Id    = _ItblYonetmenlikService.GetAll().ToList().Count + 1;
                temp.Url   = model.url;
                temp.aktif = 0;
                _ItblYonetmenlikService.Add(temp);

                model.isSuccessfull = true;
            }
            else
            {
                user.isSuccessfull = false;
            }

            return(View(user));
        }
Exemplo n.º 3
0
        public IActionResult Index()
        {
            List <tblKanun> kanunlist = _kanun.GetAll().ToList();

            model           = new ModelKanun();
            model.kanunlist = new List <tblKanun>();
            for (int i = kanunlist.Count - 1; 0 <= i; i--)
            {
                model.kanunlist.Add(kanunlist[i]);
            }
            return(View(model));
        }
Exemplo n.º 4
0
        public IActionResult Index()
        {
            string Url = Request.GetDisplayUrl();

            string[]        sub             = Url.Split("/");
            int             length          = sub.Length;
            int             id              = Int32.Parse(sub[length - 1].Substring(0, 1));
            tblKullanicilar tblKullanicilar = _IKullanicilarService.GetById(StaticValues.LoginId);
            ModelUser       model           = new ModelUser();

            if (StaticValues.isİtKanun == 1)
            {
                foreach (var VARIABLE in _IKanunService.GetAll().ToList())
                {
                    if (id == VARIABLE.Id)
                    {
                        model.kanun = VARIABLE;
                    }
                }
            }
            else if (StaticValues.isİtKanun == 2)
            {
                foreach (var VARIABLE in _ITblYonetmenlikService.GetAll().ToList())
                {
                    if (id == VARIABLE.Id)
                    {
                        model.yonetmenlik = VARIABLE;
                    }
                }
            }


            model.name          = tblKullanicilar.Isim;
            model.surname       = tblKullanicilar.Soyisim;
            model.isSuccessfull = null;

            return(View(model));
        }