Example #1
0
        public ActionResult TimSPCM(string key, int?page)
        {
            SanphamcanmuaModel spcm = new SanphamcanmuaModel();

            ViewBag.key = key;
            return(PhanTrangSPCM(spcm.TimSPCM(key), page, null));
        }
Example #2
0
        public ActionResult ChitietAuction(Sanphamcanmua a)
        {
            SanphamcanmuaModel sp = new SanphamcanmuaModel();

            a.SanPham = sp.getSP(a.MaSP);
            return(View(a));
        }
Example #3
0
        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));
        }
Example #5
0
        public ActionResult ChitietSanphamAuction(int spcm)
        {
            SanphamcanmuaModel spmodel = new SanphamcanmuaModel();
            Sanphamcanmua      temp    = spmodel.getSanphamcanmua(spcm);

            temp.SanPham = spmodel.getSP(temp.MaSP);
            return(View(temp));
        }
Example #6
0
 public ActionResult MultibleDel(List <string> lstdel)
 {
     foreach (var item in lstdel)
     {
         SanphamcanmuaModel ncc = new SanphamcanmuaModel();
         ncc.DeleteSPCM(Convert.ToInt32(item));
     }
     return(TimSPCM(null, null));
 }
Example #7
0
 public ActionResult EditSPCM(SanPhamCanMuaEdit loai)
 {
     if (ModelState.IsValid)
     {
         SanphamcanmuaModel ncc = new SanphamcanmuaModel();
         ncc.EditSPCM(loai);
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("EditSPCM", loai.ID));
 }
Example #8
0
 public ActionResult ThemSPCM(SanPhamCanMuaAdd loai)
 {
     if (ModelState.IsValid)
     {
         SanphamcanmuaModel ncc = new SanphamcanmuaModel();
         ncc.ThemSPCM(GetData(loai));
         return(View("Index"));
     }
     return(View("Index", loai));
 }
Example #9
0
        public ActionResult DeleteSPCM(int id)
        {
            SanphamcanmuaModel ncc = new SanphamcanmuaModel();

            if (ncc.getSanphamcanmua(id) == null)
            {
                return(HttpNotFound());
            }
            ncc.DeleteSPCM(id);
            return(TimSPCM(null, null));
        }
Example #10
0
        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));
        }