public ViewResult Details(int id) { BarcodeBll bll = new BarcodeBll(); Barcode barcode = bll.Gets(x => x.Id == id).SingleOrDefault(); return(View(barcode)); }
// GET: Barcode public ActionResult Index() { BarcodeBll bll = new BarcodeBll(); List <Barcode> list = bll.GetAll().ToList(); return(View(list)); }
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")); }
public ActionResult Update(int id) { Barcode model = new BarcodeBll().Get(x => x.Id == id); return(View(model)); }