Exemplo n.º 1
0
        public ViewViewComponentResult Invoke()
        {
            var KulId       = HttpContext.Session.GetInt32("id");
            var bildirimler = _bildirimServis.BildirimleriGetir();
            var kullanici   = _kullaniciServis.KullanicilariGetir();
            AdminBildirimViewModel model = new AdminBildirimViewModel();

            model.Bildirimler  = bildirimler;
            model.KulId        = KulId;
            model.Kullanicilar = kullanici;

            //foreach (var item in bildirimler)
            //{
            //    if (item.Gonderilen==KulId)
            //    {
            //       model = new AdminBildirimViewModel
            //        {
            //           Baslik=item.Baslik,
            //           Mesaj=item.Mesaj,
            //           Gonderen=item.Gonderen,
            //           Gonderilen=item.Gonderilen,
            //           GondermeTarihi=item.GondermeTarihi,
            //           Okundumu=item.Okundumu,
            //           Tur=item.Tur

            //        };
            //    }
            //}
            return(View(model));
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            var bildirimler = _bildirimServis.BildirimleriGetir();
            var kullanici   = _kullaniciServis.KullanicilariGetir();
            var model       = new AdminBildirimViewModel();

            model.Bildirimler  = bildirimler;
            model.Kullanicilar = kullanici;
            return(View(model));
        }
Exemplo n.º 3
0
        public IActionResult BildirimDetay(int id = 1)
        {
            var bildirim    = _bildirimServis.BildirimGetir(id);
            var bildirimler = _bildirimServis.BildirimleriGetir();
            var kullanici   = _kullaniciServis.KullanicilariGetir();


            var model = new AdminBildirimViewModel();

            model.Bildirim = bildirim;

            model.Bildirimler  = bildirimler;
            model.Kullanicilar = kullanici;

            return(View(model));
        }