Exemple #1
0
 public ActionResult EditSPCM(SanPhamCanMuaEdit loai)
 {
     if (ModelState.IsValid)
     {
         SanphamcanmuaModel ncc = new SanphamcanmuaModel();
         ncc.EditSPCM(loai);
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("EditSPCM", loai.ID));
 }
Exemple #2
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));
        }