コード例 #1
0
        public ActionResult XemChiTiet(string id)
        {
            SanPhamF spf   = new SanPhamF();
            SanPham  model = spf.ChitietSanPham(id);

            return(View(model));
        }
コード例 #2
0
        public ActionResult ChiTietSanPham(string id)
        {
            SanPhamF SPF = new SanPhamF();
            var      sp  = SPF.ChitietSanPham(id);

            return(View(sp));
        }
コード例 #3
0
        public ActionResult Xoa(string id)
        {
            MyDBContext db    = new MyDBContext();
            SanPhamF    spf   = new SanPhamF();
            SanPham     model = spf.ChitietSanPham(id);

            return(View(model));
        }
コード例 #4
0
        public ActionResult Sua(string id)
        {
            MyDBContext db    = new MyDBContext();
            SanPhamF    spf   = new SanPhamF();
            SanPham     model = spf.ChitietSanPham(id);

            ViewBag.IDHang = new SelectList(db.Hangs, "IDHang", "TenHang", model.IDHang);
            ViewBag.IDNCC  = new SelectList(db.NhaCungCaps, "IDNCC", "TenNCC", model.IDNCC);
            return(View(model));
        }