public CoordinationRequestInterstateAnswer Save() { string url = System.Configuration.ConfigurationManager.AppSettings["webServiceRootUrl"] + "ProposedCoordination"; string result = Utilities.PostJsonToUrl(url, this); CoordinationRequestInterstateAnswer answer = Newtonsoft.Json.JsonConvert.DeserializeObject <CoordinationRequestInterstateAnswer>(result); return(answer); }
private void SubmitRequest() { if (Page.IsValid) { string latitude = txtLatitude.Text; string longitude = txtLongitude.Text; if (rbCoordinates.SelectedValue == "Degrees, minutes, seconds") { latitude = ConvertDmsToDecimal(txtLatitudeDeg.Text, txtLatitudeMin.Text, txtLatitudeSec.Text).ToString(); longitude = ConvertDmsToDecimal(txtLongitudeDeg.Text, txtLongitudeMin.Text, txtLongitudeSec.Text).ToString(); } CoordinationRequestInterstate req = new CoordinationRequestInterstate(latitude, longitude, txtTransmitFrequency.Text, txtReceiveFrequency.Text, creds); CoordinationRequestInterstateAnswer answer = req.Save(); Panel1.Visible = false; Panel2.Visible = true; lblAnswer.Text = string.Format("Your request to coordinate a repeater at {0}, {1} transmitting on {2} and receiving on {3} is {4}. {5}", latitude, longitude, answer.TransmitFrequency.ToString(), answer.ReceiveFrequency.ToString(), answer.Answer.ToUpper(), answer.Comment); } }