public ActionResult Edit(int id, BabyShopConnection.loaisanpham lsp)
        {
            //try
            //{
            //    // TODO: Add update logic here

            //    return RedirectToAction("Index");
            //}
            //catch
            //{
            //    return View();
            //}
            QLloaisanphambus.EditLoaiSanPham(id, lsp);
            return(RedirectToAction("Index"));
        }
Example #2
0
 // GET: Admin/QLSanPham/Edit/5
 public ActionResult Edit(int id)
 {
     ViewBag.MaNhaSanXuat  = new SelectList(QLNhaSanXuatbus.HienThiDanhSachNSX(), "MaNhaSanXuat", "TenNhaSanXuat");
     ViewBag.MaLoaiSanPham = new SelectList(QLloaisanphambus.HienThiLoaiSanPham(), "MaLoaiSanPham", "TenLoaiSanPham");
     return(View(QLsanphambus.ChiTietSanPham(id)));
 }
Example #3
0
 // GET: Admin/QLSanPham/Create
 public ActionResult Create()
 {
     ViewBag.MaNhaSanXuat  = new SelectList(QLNhaSanXuatbus.HienThiDanhSachNSX(), "MaNhaSanXuat", "TenNhaSanXuat");
     ViewBag.MaLoaiSanPham = new SelectList(QLloaisanphambus.HienThiLoaiSanPham(), "MaLoaiSanPham", "TenLoaiSanPham");
     return(View());
 }
 // GET: Admin/QLLoaiSanPham/Edit/5
 public ActionResult Edit(int id)
 {
     return(View(QLloaisanphambus.ChiTietLoaiSanPham(id)));
 }
 public ActionResult Create(BabyShopConnection.loaisanpham lsp)
 {
     QLloaisanphambus.ThemLoaiSanPham(lsp);
     return(RedirectToAction("Index"));
 }
        // GET: Admin/QLLoaiSanPham
        public ActionResult Index(int page = 1)
        {
            var ds = QLloaisanphambus.HienThiDanhSachLoaiSanPham(page, 3);

            return(View(ds));
        }