Exemplo n.º 1
0
 public IQueryable<ServiceCategory> GetCategories()
 {
     IQueryable<ServiceCategory> list;
     switch (sectionName)
     {
         case "personal":
             list= _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasPersonalServices).AsQueryable();
             break;
         case "business":
             list = _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasBusinessServices).AsQueryable();
             break;
         default:
             list = _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasPersonalServices|| s.HasPersonalServices).AsQueryable();
             break;
     }
     return list;// _servicesServices.GetCategoriesList(LanguageId).Where(s=>s.Sections.Contains(typeId.ToString())||s.Sections=="1").AsQueryable();
 }
Exemplo n.º 2
0
        private int typeId = 1;//2=personal 3=business
        public category()
        {
            TryGetRouteParameter("CategoryId", out categoryId);
            TryGetRouteParameter("Section", out sectionName);
            TryGetRouteParameter("UrlName", out urlName);

            _servicesServices = new ServicesServices();
            CategoryName      = _servicesServices.GetCategoriesList(LanguageId).First(c => c.Id == categoryId.Value).Name;
        }
Exemplo n.º 3
0
 public IQueryable <Khadmatcom.Services.Model.ServiceCategory> GetCategories()
 {
     return(_servicesServices.GetCategoriesList(LanguageId).AsQueryable());
 }
Exemplo n.º 4
0
 public IQueryable <ServiceCategory> GetCategories()
 {
     return(_servicesServices.GetCategoriesList(LanguageId).AsQueryable());
 }