// GET: QuanLyProduct/Edit/5 public ActionResult Edit(int id) { //if (id == null) //{ // Response.StatusCode = 404; // return null; //} var sp = ProductBus.GetProduct(id); if (sp == null) { HttpNotFound(); } ViewBag.CategogyID = new SelectList(ProductBus.GetListCategogy(), "ID", "CategogyName", sp.CategogyID); ViewBag.ManufacturerID = new SelectList(ProductBus.GetListManufacturer(), "ID", "ManufacturerName", sp.ManufacturerID); ViewBag.ThongBao = ""; ViewBag.ListImage = ProductBus.getListImage(id).ToList(); return(View(sp)); }