public int Add(SanPhamDTO sanpham) { try { return(sanphamDAO.Add(sanpham)); } catch (SqlException ex) { throw ex; } }
public JsonResult Add(SanPham ID) { SetViewBag(); return(Json(SanPhamDAO.Add(ID), JsonRequestBehavior.AllowGet)); }
public int Add(SanPham p) { return(SPDAO.Add(p)); }
public void TestAdd(SanPham p) { Assert.Positive(spDAO.Add(p)); //Nếu giá trị trả về > 0 là đúng }