public static async Task <string> DeleteScenarioPolygon(string ScenarioId, enumPolygonType PolygonType, string PolygonName)
        {
            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri(BaseAddress);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                string strUri = "api/Routing/DeleteScenarioPolygon?ScenarioId=" + ScenarioId + "&PolygonType=" + (int)PolygonType + "&PolygonName=" + PolygonName;
                HttpResponseMessage response = await client.GetAsync(strUri);

                if (response.StatusCode != System.Net.HttpStatusCode.OK)
                {
                    return("FALSE");
                }
                return("OK");
            }
        }
Beispiel #2
0
        public static async Task<string> DeleteScenarioPolygon(string ScenarioId, enumPolygonType PolygonType, string PolygonName)
        {
             using (var client = new HttpClient())
             {
                 client.BaseAddress = new Uri(BaseAddress);
                 client.DefaultRequestHeaders.Accept.Clear();
                 client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                 string strUri = "api/Routing/DeleteScenarioPolygon?ScenarioId=" + ScenarioId + "&PolygonType=" + (int)PolygonType + "&PolygonName=" + PolygonName;
                 HttpResponseMessage response = await client.GetAsync(strUri);

                 if (response.StatusCode != System.Net.HttpStatusCode.OK)
                 {
                     return "FALSE";
                 }
                 return "OK";
             }

        }