public ActionResult SuaThongSoKT(List <ThongSoKyThuat> lstkt) { if (lstkt.Count == 0) { return(RedirectToAction("SanPham")); } var spm = new SanPhamModel(); spm.DelAllTSKT(lstkt[0].SanPhamId); foreach (var item in lstkt) { if (!string.IsNullOrEmpty(item.ThuocTinh)) { spm.ThemTSKT(item); } } return(RedirectToAction("SanPham")); }