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; } }
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); }
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); }