public ActionResult Danhsachcanmua() { var sp = new SanPhamCanMuaModel(); var temp = sp.getDS(0, 5); return(View(temp)); }
public ActionResult ChitietAuction(SanPhamCanMua a) { var sp = new SanPhamCanMuaModel(); a.SanPham = sp.getSP(a.SanPhamId); return(View(a)); }
public ActionResult TimSPCM(string key, int?page) { var spcm = new SanPhamCanMuaModel(); ViewBag.key = key; return(PhanTrangSPCM(spcm.TimSPCM(key), page, null)); }
public ActionResult KyHopDong(string id) { var sp = new SanPhamCanMuaModel(); sp.DeleteSPCM(Convert.ToInt32(id)); return(TimDS(null, null, null, null)); }
public ActionResult ChitietSanphamAuction(int spcm) { var spmodel = new SanPhamCanMuaModel(); var temp = spmodel.getSanphamcanmua(spcm); temp.SanPham = spmodel.getSP(temp.SanPhamId); return(View(temp)); }
public ActionResult MultibleDel(List <string> lstdel) { foreach (var item in lstdel) { var ncc = new SanPhamCanMuaModel(); ncc.DeleteSPCM(Convert.ToInt32(item)); } return(TimSPCM(null, null)); }
public ActionResult EditSPCM(SanPhamCanMuaEdit loai) { if (ModelState.IsValid) { var ncc = new SanPhamCanMuaModel(); ncc.EditSPCM(loai); return(RedirectToAction("Index")); } return(RedirectToAction("EditSPCM", loai.ID)); }
public ActionResult ThemSPCM(SanPhamCanMuaAdd loai) { if (ModelState.IsValid) { var ncc = new SanPhamCanMuaModel(); ncc.ThemSPCM(GetData(loai)); return(View("Index")); } return(View("Index", loai)); }
public ActionResult DeleteSPCM(int id) { var ncc = new SanPhamCanMuaModel(); if (ncc.getSanphamcanmua(id) == null) { return(HttpNotFound()); } ncc.DeleteSPCM(id); return(TimSPCM(null, null)); }
public ActionResult EditSPCM(int id) { var sp = new SanPhamCanMuaModel(); var s = sp.getSanphamcanmua(id); var model = new SanPhamCanMuaEdit(); model.ID = s.Id; model.Mota = s.Mota; model.Ngayketthuc = s.Ngayketthuc; model.Soluong = s.Soluong; return(View(model)); }