Esempio n. 1
0
        public bool Exsists(string categoryName)
        {
            // ProductCategoryData data = new ProductCategoryData();
            string where = "[Name]='" + categoryName + "'";
            string orderBy = String.Empty;
            ProductCategoryCollection col = new ProductCategoryCollection();

            try
            {
                col = GetProductCategoryCollection(where, orderBy);
                if (col.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "Exsists");
                throw (ex);
            }
            finally
            {
                col = null;
            }
        }
Esempio n. 2
0
        public ProductCategoryCollection GetProductCategoryCollection(string whereExpression, string orderByExpression)
        {
            ProductCategoryData       data = new ProductCategoryData();
            ProductCategoryCollection col  = new ProductCategoryCollection();

            try
            {
                col = data.GetProductCategorysDynamicCollection(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductCategoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Esempio n. 3
0
        public ProductCategoryCollection GetAllProductCategoryCollection()
        {
            ProductCategoryData       data = new ProductCategoryData();
            ProductCategoryCollection col  = new ProductCategoryCollection();

            try
            {
                col = data.GetAllProductCategorysCollection();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllProductCategoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }