public ActionResult Create(LoaiSP LSP) { try { // TODO: Add insert logic here PhanLoaiBus.ThemLSP(LSP); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(String id, LoaiSP LSP) { try { // TODO: Add update logic here PhanLoaiBus.UpdateLSP(id, LSP); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult XoaTam(String id, LoaiSP LSP) { try { // TODO: Add delete logic here LSP.TinhTrang = 1; PhanLoaiBus.UpdateLSP(id, LSP); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Phanloai public ActionResult Index(String id, int PagedList = 1, int size = 6) { var sql = PhanLoaiBus.ChiTietPL(id).ToPagedList(PagedList, size); return(View(sql)); }
// POST: Admin/LoaiSanPhamAdmin/xoatamthoi public ActionResult XoaTam(String id) { return(View(PhanLoaiBus.EditLSP(id))); }
// GET: Admin/AdminLSP/Edit/5 public ActionResult Edit(String id) { var sql = PhanLoaiBus.EditLSP(id); return(View(sql)); }
// GET: Admin/AdminLSP public ActionResult Index() { var sql = PhanLoaiBus.DanhSanhLSPAdmin(); return(View(sql)); }
//catch //{ // return View(); // GET: Admin/AdminSP/Edit/5 public ActionResult Edit(string id) { ViewBag.MaNhaSX = new SelectList(NhaSanXuatBus.DanhSach(), "MaNhaSX", "TenNhaSX"); ViewBag.MaLoaiSanPham = new SelectList(PhanLoaiBus.DanhSach(), "MaLoaiSP", "TenLoaiSP"); return(View(MobileShopBus.ChiTiet(id))); }
// GET: Admin/AdminSP/Create // GET: Admin/AdminSP/Create public ActionResult Create() { ViewBag.MaNhaSX = new SelectList(NhaSanXuatBus.DanhSach(), "MaNhaSX", "TenNhaSX"); ViewBag.MaLoaiSP = new SelectList(PhanLoaiBus.DanhSach(), "MaLoaiSP", "TenLoaiSP"); return(View()); }