public async Task <JToken> cdcallEventsPOST(cdUpdateEvent regEvent) { cdCallAPI mycallAPI = new cdCallAPI(); var response = await mycallAPI.cdCallPostAPI(App.cdEventAPIPutPost, regEvent, App.cdEventKey); return(response); }
async void cdSubmit(object sender, System.EventArgs e) { if (assignedEvents[counter].Attr1.Contains("A") == true) { if (assignedEvents[counter].AddressLine1 != EventAddress.Text || assignedEvents[counter].City != City.Text || assignedEvents[counter].cdState != myState.Text || assignedEvents[counter].PostalCode != PostalCode.Text) { cdReadError myerror = new cdReadError(); cdUpdateEvent updateAddress = new cdUpdateEvent(); updateAddress.EventID = assignedEvents[counter].EventID; updateAddress.ColumnName = "AddressLine1"; updateAddress.ColumnValue = EventAddress.Text; updateAddress.ColumnName2 = "City"; updateAddress.ColumnValue2 = City.Text; updateAddress.ColumnName3 = "cdState"; updateAddress.ColumnValue3 = myState.Text; updateAddress.ColumnName4 = "PostalCode"; updateAddress.ColumnValue4 = PostalCode.Text; System.Diagnostics.Debug.WriteLine(" Before calling Post API "); cdCallAPI mycallAPI = new cdCallAPI(); var jsresponse = await mycallAPI.cdcallEventsPOST(updateAddress); System.Diagnostics.Debug.WriteLine(" After calling Post API "); if (jsresponse.ToString().Contains("ValidationException")) { System.Diagnostics.Debug.WriteLine(" Post API Call failed " + jsresponse); myerror = JsonConvert.DeserializeObject <cdReadError>(jsresponse.ToString()); } else { System.Diagnostics.Debug.WriteLine(" Post API Call Successful"); } } } if (cdAddAll.IsChecked == true) { var resp = await createEventSignups("Everyone"); } if (cdCheckRider.IsChecked == true) { var resp = await createEventSignups("Self"); } //Driver Student Allocation var getresp = await cdMapStdDrv(assignedEvents[counter].EventID); }