コード例 #1
0
        public override List<OrganisationalUnit> GetOrganisationalUnits(Municipality municipality)
        {
            var rawJson = string.Empty;

            /*
             * http://api.kolada.se/v2/ou?municipality=1290
             * This is the URL that returns organisational units based on monicipality Id.
             * This is exactly what we need.
             */
            var BaseUrlGetOperators = BaseUrl + "ou?" + "municipality=" + municipality.Id;

            var request = (HttpWebRequest)WebRequest.Create(BaseUrlGetOperators);

            using (var response = request.GetResponse())
            using (var reader = new StreamReader(response.GetResponseStream()))
            {
                rawJson = reader.ReadToEnd();
            }

            var OU = JsonConvert.DeserializeObject<OrganisationalUnits>(rawJson).Values;

            return OU;
        }
コード例 #2
0
 public IEnumerable<OperationalUnit> GetTownOperators(Municipality municipality, Category category)
 {
     //Method added becouse project would not compile without it!!
     throw new NotImplementedException();
 }
コード例 #3
0
ファイル: Service.cs プロジェクト: mp222sf/jamforelsetjanst
 //Methods
 public List<OperationalUnit> GetTownOperators(Municipality municipality, Category category)
 {
     return _townWebService.GetTownOperators(municipality, category);
 }
コード例 #4
0
 public List<OperationalUnit> GetTownOperators(Municipality municipality, Category category)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 public abstract List<OrganisationalUnit> GetOrganisationalUnits(Municipality municipiality);