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