Example #1
0
        public ActionResult Delete(int id)
        {
            ViewBag.ProductType_ID = new SelectList(SanphamService.GetAllLoaisanpham(), "ID", "ProductTypeName");
            var model = SanphamService.GetById(id);

            return(PartialView("_Delete", model));
        }
Example #2
0
        public ActionResult Edit(int id)
        {
            ViewBag.ProductType_ID = new SelectList(SanphamService.GetAllLoaisanpham(), "ID", "ProductTypeName");
            var model = SanphamService.GetById(id);

            //TODO
            return(View("CreateEdit", model));
        }
Example #3
0
 public ActionResult Create()
 {
     ViewBag.ProductType_ID = new SelectList(SanphamService.GetAllLoaisanpham(), "ID", "ProductTypeName");
     //TODO
     return(View("CreateEdit"));
 }
Example #4
0
 // GET: SanPham
 public ActionResult Index(SanphamSearchModel searchModel)
 {
     ViewBag.ProductType_ID = new SelectList(SanphamService.GetAllLoaisanpham(), "ID", "ProductTypeName");
     return(View(searchModel));
 }