Exemplo n.º 1
0
        public ActionResult Soru(int id)
        {
            kullaniciModeli = new KullaniciModel();
            servis          = new KodusorServisClient();

            kullaniciModeli.Soru = servis.SoruGetir(id);
            if (Session["kullaniciID"] != null)
            {
                int kulID = Convert.ToInt32(Session["kullaniciID"]);
                kullaniciModeli.Kullanici      = servis.KullaniciBilgileriniGetir(kulID);
                kullaniciModeli.FavoriSorular  = servis.FavoriSorular(kulID).ToList();
                kullaniciModeli.FavoriCevaplar = servis.FavoriCevaplar(kulID).ToList();
            }
            return(View(kullaniciModeli));
        }
Exemplo n.º 2
0
 // GET: Profil
 public ActionResult Index()
 {
     if (Session["kullaniciID"] != null)
     {
         kullaniciModeli = new KullaniciModel();
         servis          = new KodusorServisClient();
         int kulID = Convert.ToInt32(Session["kullaniciID"]);
         kullaniciModeli.Kullanici      = servis.KullaniciBilgileriniGetir(kulID);
         kullaniciModeli.SoruListesi    = servis.SorulariListele(kulID).ToList();
         kullaniciModeli.CevapListesi   = servis.KullaniciCevapları(kulID).ToList();
         kullaniciModeli.EtiketListesi  = servis.KullanicininEtiketleri(kulID).ToList();
         kullaniciModeli.FavoriSorular  = servis.FavoriSorular(kulID).ToList();
         kullaniciModeli.FavoriCevaplar = servis.FavoriCevaplar(kulID).ToList();
         return(View(kullaniciModeli));
     }
     return(RedirectToAction("Index", "Home"));
 }