//[CustomAuthorize(Roles = "Admin,Uye")] // GET: Home public ActionResult Index() { List <SelectListItem> marka = new List <SelectListItem>(); foreach (var item in _markaService.GetAll()) { marka.Add(new SelectListItem() { Text = item.MarkaAdi, Value = item.MarkaId.ToString() }); } ViewBag.Markalar = marka; List <SelectListItem> kategori = new List <SelectListItem>(); foreach (var item in _kategoriService.GetAll()) { kategori.Add(new SelectListItem() { Text = item.KategoriAdi, Value = item.KategoriId.ToString() }); } ViewBag.Kategoriler = kategori; return(View(_urunService.GetAll())); }
public IActionResult Index() { return View(new UrunListViewModel { Urunler = _urunService.GetAll() }); }
public ActionResult Index() { var urunListViewModel = new UrunListViewModel { Urunler = _urunService.GetAll() }; return(View(urunListViewModel)); }
public IActionResult GetAll() { var result = _urunService.GetAll(); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public ActionResult MalzemeOluştur() { List <SelectListItem> BagisTurleri = new List <SelectListItem>(); foreach (var item in _urunService.GetAll()) { BagisTurleri.Add(new SelectListItem { Text = item.UrunAdi, Value = item.ID.ToString() }); } ViewBag.Tipler = BagisTurleri; return(View()); }
public List <Urun> Get() { return(_urunService.GetAll()); }
public void yenile() { gridControl1.DataSource = _urunService.GetAll(); }
public void GenelStokListele() { gridControl1.DataSource = _urunService.GetAll(); }