Esempio n. 1
0
        public ViewResult Details(int id)
        {
            BarcodeBll bll     = new BarcodeBll();
            Barcode    barcode = bll.Gets(x => x.Id == id).SingleOrDefault();

            return(View(barcode));
        }
Esempio n. 2
0
        // GET: Barcode
        public ActionResult Index()
        {
            BarcodeBll     bll  = new BarcodeBll();
            List <Barcode> list = bll.GetAll().ToList();

            return(View(list));
        }
Esempio n. 3
0
        public ActionResult Delete(int id, Barcode model)
        {
            var barcode = new BarcodeBll().Get(x => x.Id == id);

            if (barcode != null)
            {
                new BarcodeBll().Delete(barcode);
            }
            return(RedirectToAction("Index"));
        }
Esempio n. 4
0
        public ActionResult Update(int id)
        {
            Barcode model = new BarcodeBll().Get(x => x.Id == id);

            return(View(model));
        }