コード例 #1
0
        public async Task <JToken> cdcallClubMembersPOST(cdUpdateClubMembers regacccount)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPostAPI(App.cdClubMemberAPIPutPost, regacccount, App.cdClubMemberKey);

            return(response);
        }
コード例 #2
0
        async void cdSubmit(object sender, System.EventArgs e)
        {
            try
            {
                System.Diagnostics.Debug.WriteLine(" Clicked Submit Button");
                cdReadError         myerror         = new cdReadError();
                cdUpdateClubMembers updatemyAccount = new cdUpdateClubMembers();
                updatemyAccount.ClubMemberID = unClubMembers[counter].ClubMemberID;
                updatemyAccount.ColumnName   = "Attr9";
                //updatemyAccount.ColumnValue = picker.SelectedItem.ToString();
                updatemyAccount.ColumnName1  = "Attr6";
                updatemyAccount.ColumnValue1 = unClubMembers[counter].Attr6;
                updatemyAccount.ColumnName2  = "Attr7";
                updatemyAccount.ColumnValue2 = unClubMembers[counter].Attr7;
                updatemyAccount.ColumnName3  = "Attr8";
                updatemyAccount.ColumnValue3 = unClubMembers[counter].Attr8;
                updatemyAccount.ColumnName4  = "Attr5";
                updatemyAccount.ColumnValue4 = unClubMembers[counter].Attr9;

                System.Diagnostics.Debug.WriteLine(" Before calling Post API ");
                cdCallAPI mycallAPI  = new cdCallAPI();
                var       jsresponse = await mycallAPI.cdcallClubMembersPOST(updatemyAccount);

                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());
                    await DisplayAlert("Update Failed", "Update Failed. " + myerror.message, "OK");
                }
                else
                {
                    System.Diagnostics.Debug.WriteLine(" Post API Call Successful");
                    await DisplayAlert("Update Successful", "Update Successful", "OK");
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(" Unable to update " + ex);
            }
        }