Esempio n. 1
0
        //[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()));
        }
Esempio n. 2
0
 public IActionResult Index()
 {
     return View(new UrunListViewModel
     {
         Urunler = _urunService.GetAll()
     });
 }
Esempio n. 3
0
        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));
        }
Esempio n. 5
0
        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());
        }
Esempio n. 6
0
 public List <Urun> Get()
 {
     return(_urunService.GetAll());
 }
Esempio n. 7
0
 public void yenile()
 {
     gridControl1.DataSource = _urunService.GetAll();
 }
Esempio n. 8
0
 public void GenelStokListele()
 {
     gridControl1.DataSource = _urunService.GetAll();
 }