public CategoryProducts CategoryProductsSelectRow(int categoryId) { var select = new DAL.CategoryProduct.CategoryProducts(); DbDataReader dr = select.CategoryProductsSelectRow(categoryId); var categoryProduct = new CategoryProducts(); if (dr.Read()) { categoryProduct.categoryId = (int)dr["CategoryId"]; categoryProduct.categoryName = (string)dr["CategoryName"]; } return(categoryProduct); }
public List <CategoryProducts> CategoryProductsSelectAll() { var select = new DAL.CategoryProduct.CategoryProducts(); var categoryProducts = new List <CategoryProducts>(); DbDataReader dr = select.CategoryProductsSelectAll(); while (dr.Read()) { var myCategoryProducts = new CategoryProducts { categoryId = (int)dr["CategoryId"], categoryName = (string)dr["CategoryName"] }; categoryProducts.Add(myCategoryProducts); } return(categoryProducts); }
public int CategoryProductsPatchRow(int categoryId, string categoryName) { var patch = new DAL.CategoryProduct.CategoryProducts(); return(patch.CategoryProductsPatchRow(categoryId, categoryName)); }
public int CategoryProductsDeleteRow(int productId) { var delete = new DAL.CategoryProduct.CategoryProducts(); return(delete.CategoryProductsDeleteRow(productId)); }
public int CategoryProductsUpdateRow(int categoryId, string categoryName) { var update = new DAL.CategoryProduct.CategoryProducts(); return(update.CategoryProductsUpdateRow(categoryId, categoryName)); }
public int CategoryProductsInsertRow(int categoryId, string categoryName) { var insert = new DAL.CategoryProduct.CategoryProducts(); return(insert.CategoryProductsInsertRow(categoryName)); }