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