Ejemplo n.º 1
0
 public static List<Category> GetCategories()
 {
     BusinessCategoryData bcd = new BusinessCategoryData();
     List<Category> catList = BusinessDataBinder.BindData<List<Category>>(bcd.SelectCategory(new object[] { DBNull.Value }));
     var sortedList = from c in catList orderby c.Name select c;
     return sortedList.ToList();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get Catgory by abbreviation
 /// </summary>
 /// <param name="abbr">abbreviation of category</param>
 /// <returns>Category object</returns>
 public static Category GetByAbbreviation(string abbr)
 {
     BusinessCategoryData bcd = new BusinessCategoryData();
     return BusinessDataBinder.BindData<Category>(bcd.SelectCategoryByAbbr(new object[] { abbr }));
 }