Example #1
0
 public ActionResult Create(LoaiSanPham lsp)
 {
     try
     {
         // TODO: Add insert logic here
         LoaiBUS.ThemLSP(lsp);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #2
0
 public ActionResult Edit(String id, LoaiSanPham lsp)
 {
     try
     {
         // TODO: Add update logic here
         LoaiBUS.UpdateLSP(id, lsp);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #3
0
 public ActionResult Xoa(String id, LoaiSanPham lsp)
 {
     try
     {
         // TODO: Add delete logic here
         lsp.TinhTrang = "1";
         LoaiBUS.UpdateLSP(id, lsp);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #4
0
 public ActionResult Xoa(String id)
 {
     return(View(LoaiBUS.ChiTietAdmin(id)));
 }
Example #5
0
        // GET: Admin/LoaiSanPham/Edit/5
        public ActionResult Edit(String id)
        {
            var db = LoaiBUS.ChiTietAdmin(id);

            return(View(db));
        }
Example #6
0
        // GET: Admin/LoaiSanPham
        public ActionResult Index()
        {
            var db = LoaiBUS.DanhSachAll();

            return(View(db));
        }
Example #7
0
 // GET: Admin/Admin/Create
 public ActionResult Create()
 {
     ViewBag.MaNhaSanXuat  = new SelectList(HangBUS.DanhSach(), "MaNhaSanXuat", "TenNhaSanXuat");
     ViewBag.MaLoaiSanPham = new SelectList(LoaiBUS.DanhSach(), "MaLoaiSanPham", "TenLoaiSanPham");
     return(View());
 }
Example #8
0
 // GET: Admin/Admin/Edit/5
 public ActionResult Edit(String id)
 {
     ViewBag.MaNhaSanXuat  = new SelectList(HangBUS.DanhSach(), "MaNhaSanXuat", "TenNhaSanXuat", MobiShopBUS.ChiTietSP(id).MaNhaSanXuat);
     ViewBag.MaLoaiSanPham = new SelectList(LoaiBUS.DanhSach(), "MaLoaiSanPham", "TenLoaiSanPham", MobiShopBUS.ChiTietSP(id).MaLoaiSanPham);
     return(View(MobiShopBUS.ChiTietSP(id)));
 }
Example #9
0
        // GET: Loai
        public ActionResult Index(String id, int page = 1, int pagesize = 3)
        {
            var dsLSP = LoaiBUS.Chitiet(id).ToPagedList(page, pagesize);

            return(View(dsLSP));
        }