public ArrayList searchAll()
        {
            pCategoryDAL = new ProductCategoryDAL();
            ArrayList arr = pCategoryDAL.searchAll();

            return(arr);
        }
        // ======================================== End of Product population in comboBox method ====================================



        // ======================================== ProductListing  method ====================================
        public ArrayList pListingSearch(PCategoryDTO DTO)
        {
            pCategoryDAL = new ProductCategoryDAL();
            ArrayList arr = pCategoryDAL.pListingSearch(DTO);

            return(arr);
        }
        // ====================================== end of delete in database ============================================



        // ============================== END OF PRODUCT CATEGORY UPDATE DELETE SEARCH INSERT METHODS ==============================



        // ========================================== Product population in comboBox method ========================================

        public List <string> productInsertComboPopu()
        {
            pCategoryDAL = new ProductCategoryDAL();
            List <string> result = new List <string>();

            result = pCategoryDAL.productComboPoping();
            return(result);
        }
        public string Add(string CategoryName)
        {
            string result = "";

            try
            {
                ProductCategoryDAL ProdCatObj = new ProductCategoryDAL();
                result = ProdCatObj.AddProductCategory(CategoryName);
            }
            catch (Exception)
            {
                result = "Failed";
            }
            return(result);
        }
        public JsonResult Display()
        {
            ProductCategoryDAL     ProdCatObj = new ProductCategoryDAL();
            List <ProductCategory> catlist    = new List <ProductCategory>();

            try
            {
                var result = ProdCatObj.getAllProductCategory();
                foreach (var obj in result)
                {
                    ProductCategory cat = new ProductCategory();
                    cat.CategoryId   = obj.CategoryId;
                    cat.CategoryName = obj.CategoryName;
                    catlist.Add(cat);
                }
                return(Json(catlist));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemple #6
0
 public DataTable GetProductCategoryByID(int ID)
 {
     //return ProductCategoryDAL.GetProductCategoryByID(ID);
     return(ProductCategoryDAL.spGetProductCategoryByID(ID));
 }
Exemple #7
0
 public void DeleteProductCategory(int ID)
 {
     //ProductCategoryDAL.DeleteProductCategory(ID);
     ProductCategoryDAL.spDeleteProductCategory(ID);
 }
Exemple #8
0
 public void UpdateProductCategory(int ID, String name)
 {
     //ProductCategoryDAL.UpdateProductCategory(ID,name);
     ProductCategoryDAL.spUpdateProductCategory(ID, name);
 }
Exemple #9
0
 public void AddProductCategory(String Name)
 {
     //ProductCategoryDAL.AddProductCategory(Name);
     ProductCategoryDAL.spAddProductCategory(Name);
 }
Exemple #10
0
 public DataTable GetProductCategory()
 {
     //return ProductCategoryDAL.GetProductCategory();
     return(ProductCategoryDAL.spGetProductCategory());
 }
Exemple #11
0
 public ProductCategoryBO()
 {
     productcategoryDAL = new ProductCategoryDAL();
 }
        // ====================================== end of update in database ============================================


        // ====================================== delete in database ============================================

        public void deleteCatRecord(PCategoryDTO DTO)
        {
            pCategoryDAL = new ProductCategoryDAL();
            pCategoryDAL.deleteCatToDatabase(DTO);
        }
        // ====================================== end of insertion in database ============================================

        // ====================================== search in database ============================================

        public void searchCatRecord(PCategoryDTO DTO)
        {
            pCategoryDAL = new ProductCategoryDAL();
            pCategoryDAL.searchCatInDatabase(DTO);
        }
        // ============================== PRODUCT CATEGORY UPDATE DELETE SEARCH INSERT METHODS ==============================

        // ====================================== category insertion in database ============================================
        public void insertCatRecord(PCategoryDTO DTO)
        {
            pCategoryDAL = new ProductCategoryDAL();
            pCategoryDAL.insertCatToDatabase(DTO);
        }
 public ProductCategoryBLL(DBHelper _dbHelper)
     : base(_dbHelper)
 {
     productCategoryDAL = new ProductCategoryDAL(_dbHelper);
 }