Esempio n. 1
0
 private List<ExternalModel> GetAllExternalWebService(Config config)
 {
     List<ExternalModel> list = new List<ExternalModel>();
     foreach (ExternalWebServiceElement element in config.ExternalWebService)
     {
         ExternalModel externalWebService = new ExternalModel();
         externalWebService.Description = element.Description;
         externalWebService.Name = element.Name;
         externalWebService.SystemCode = element.SystemCode;
         externalWebService.URL = element.URL;
         list.Add(externalWebService);
     }
     return list;
 }
Esempio n. 2
0
 private ExternalModel GetExternalWebServiceByName(Config config, string systemCode)
 {
     ExternalModel external = new ExternalModel();
     if (!string.IsNullOrEmpty(systemCode))
     {
         ExternalWebServiceElement element = config.ExternalWebService.OfType<ExternalWebServiceElement>().Where<ExternalWebServiceElement>(x => x.SystemCode.Equals(systemCode)).FirstOrDefault<ExternalWebServiceElement>();
         if (element != null)
         {
             external.Description = element.Description;
             external.Name = element.Name;
             external.SystemCode = element.SystemCode;
             external.URL = element.URL;
         }
     }
     return external;
 }
Esempio n. 3
0
 public ExternalController()
 {
     this.configuration = ConfigManager.GetConfig();
     this.config = ConfigManager.GetSection(this.configuration);
 }