Beispiel #1
0
 /// <summary>
 /// GetNavigationTypes
 /// </summary>
 /// <param name="requestNavigationTypes"></param>
 /// <returns></returns>
 public ServiceResponse<List<NavigationTypeDC>> GetNavigationTypes()
 {
     ServiceResponse<List<NavigationTypeDC>> navigationTypesResponse = new ServiceResponse<List<NavigationTypeDC>>();
         try
         {
             SetContext();
             LookupManager lookupManager = new LookupManager();
             List<lkpNavigationType> navigationTypes = lookupManager.GetNavigationTypes();
             navigationTypesResponse.Result = new List<NavigationTypeDC>();
             foreach (lkpNavigationType navigationType in navigationTypes)
             {
                 navigationTypesResponse.Result.Add(Mapper.Map<lkpNavigationType, NavigationTypeDC>(navigationType));
             }
         }
         catch (Exception ex)
         {
             HandleError(ex, navigationTypesResponse);
         }
     return navigationTypesResponse;
 }
Beispiel #2
0
 /// <summary>
 /// GetLanguages
 /// </summary>
 /// <param name="requestLanguages"></param>
 /// <returns></returns>
 public ServiceResponse<List<LanguageDC>> GetLanguages()
 {
     ServiceResponse<List<LanguageDC>> languagesResponse = new ServiceResponse<List<LanguageDC>>();
     try
     {
         SetContext();
         LookupManager lookupManager = new LookupManager();
         List<lkpLanguage> languages = lookupManager.GetLanguages();
         languagesResponse.Result = new List<LanguageDC>();
         foreach (lkpLanguage language in languages)
         {
             languagesResponse.Result.Add(Mapper.Map<lkpLanguage, LanguageDC>(language));
         }
     }
     catch (Exception ex)
     {
         HandleError(ex, languagesResponse);
     }
     return languagesResponse;
 }