Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public int CategoryProductsPatchRow(int categoryId, string categoryName)
        {
            var patch = new DAL.CategoryProduct.CategoryProducts();

            return(patch.CategoryProductsPatchRow(categoryId, categoryName));
        }
Exemplo n.º 4
0
        public int CategoryProductsDeleteRow(int productId)
        {
            var delete = new DAL.CategoryProduct.CategoryProducts();

            return(delete.CategoryProductsDeleteRow(productId));
        }
Exemplo n.º 5
0
        public int CategoryProductsUpdateRow(int categoryId, string categoryName)
        {
            var update = new DAL.CategoryProduct.CategoryProducts();

            return(update.CategoryProductsUpdateRow(categoryId, categoryName));
        }
Exemplo n.º 6
0
        public int CategoryProductsInsertRow(int categoryId, string categoryName)
        {
            var insert = new DAL.CategoryProduct.CategoryProducts();

            return(insert.CategoryProductsInsertRow(categoryName));
        }