예제 #1
0
        public bool Exsists(string subCategoryName)
        {
            // ProductSubcategoryData data = new ProductSubcategoryData();
            ProductSubcategoryCollection col = new ProductSubcategoryCollection();

            string where = "[Name]='" + subCategoryName + "'";
            string orderBy = String.Empty;

            try
            {
                col = GetProductSubcategoryCollection(where, orderBy);
                if (col.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "Exsists");
                throw (ex);
            }
            finally
            {
                col = null;
            }
            // return false;
        }
예제 #2
0
        public ProductSubcategoryCollection GetProductSubcategoryCollection(string whereExpression, string orderByExpression)
        {
            ProductSubcategoryData       data = new ProductSubcategoryData();
            ProductSubcategoryCollection col  = new ProductSubcategoryCollection();

            try
            {
                col = data.GetAllProductSubcategoryDynamicCollection(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductSubcategoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
예제 #3
0
        public ProductSubcategoryCollection GetAllProductSubcategoryCollection()
        {
            ProductSubcategoryData       data = new ProductSubcategoryData();
            ProductSubcategoryCollection col  = new ProductSubcategoryCollection();

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