Пример #1
0
        private Sanphamcanmua GetData(SanPhamCanMuaAdd loai)
        {
            Sanphamcanmua sp = new Sanphamcanmua();

            sp.MaSP        = loai.MaSP;
            sp.Ngayketthuc = loai.Ngayketthuc;
            sp.Mota        = loai.Mota;
            sp.Soluong     = loai.Soluong;
            return(sp);
        }
Пример #2
0
 public ActionResult ThemSPCM(SanPhamCanMuaAdd loai)
 {
     if (ModelState.IsValid)
     {
         SanphamcanmuaModel ncc = new SanphamcanmuaModel();
         ncc.ThemSPCM(GetData(loai));
         return(View("Index"));
     }
     return(View("Index", loai));
 }