public void Tanimla()
        {
            var esyalar = esyaBAL.TumEsyalariGetir().Select(p => new SelectListItem()
            {
                Value = p.EsyaId.ToString(),
                Text  = p.EsyaAdi
            }).ToList();

            ViewBag.esyalarSelectList = esyalar;
        }
Exemple #2
0
        public JsonResult TumEsyalariGetir()
        {
            EsyaJsModel model = new EsyaJsModel()
            {
                BasariliMi = true,
                EsyaList   = esyaBAL.TumEsyalariGetir()
            };

            model.EsyaSayisi = model.EsyaList.Count();
            Thread.Sleep(2000);
            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public void Tanimla()
        {
            var esyalarSelect = esyaBAL.TumEsyalariGetir().Select(p => new SelectListItem()
            {
                Text  = p.EsyaAdi,
                Value = p.EsyaId.ToString()
            }).ToList();

            ViewBag.esyalarSelect = esyalarSelect;
            var sehirlerSelect = kullaniciBAL.SehirleriGetir(KullaniciBilgileriDondur.KullaniciId()).Select(p =>
                                                                                                            new SelectListItem()
            {
                Text  = p.SehirAdi,
                Value = p.SehirId.ToString()
            }).ToList();

            ViewBag.sehirlerSelect = sehirlerSelect;
        }