// Method ListForExcel
        public List <CategoriesModel> ListForExcel(string keyword, string sortColumn, string sortBy)
        {
            DataTable dt = DataProvider.Instance.Query(CategoriesQuerys.ListForExcel(keyword, sortColumn, sortBy));

            return(HelperDao.GenerateList <CategoriesModel>(dt));
        }
        // Method CheckExist
        public int CheckExist(CategoriesModel category, string[] parameters)
        {
            Dictionary <string, object> dicParameters = HelperDao.GenerateParameter <CategoriesModel>(category, parameters);

            return(DataProvider.Instance.Count(CategoriesQuerys.CheckExsist(parameters, category.Id), dicParameters));
        }
        // Method Edit
        public int Edit(CategoriesModel category, string[] paramters)
        {
            Dictionary <string, object> dicParameters = HelperDao.GenerateParameter <CategoriesModel>(category, paramters);

            return(DataProvider.Instance.Execute(CategoriesQuerys.Edit(paramters, category.Id), dicParameters));
        }
        // Method List
        public List <CategoriesModel> List(bool?status = null)
        {
            DataTable dt = DataProvider.Instance.Query(CategoriesQuerys.List(status));

            return(HelperDao.GenerateList <CategoriesModel>(dt));
        }