本文整理汇总了C#中System.Net.Http.FormUrlEncodedContent.ReadAsByteArrayAsync方法的典型用法代码示例。如果您正苦于以下问题:C# FormUrlEncodedContent.ReadAsByteArrayAsync方法的具体用法?C# FormUrlEncodedContent.ReadAsByteArrayAsync怎么用?C# FormUrlEncodedContent.ReadAsByteArrayAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Net.Http.FormUrlEncodedContent
的用法示例。
在下文中一共展示了FormUrlEncodedContent.ReadAsByteArrayAsync方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnCalcBooking_Click
private async void btnCalcBooking_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(this.GetBookingCalcProperties());
await PostContent(txtApiBookingCalc.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例2: btnContactPost_Click
private void btnContactPost_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("Title", ddlContactTitle.SelectedText),
new KeyValuePair<string, string>("FirstName", txtContactFirstName.Text),
new KeyValuePair<string, string>("LastName", txtContactLastName.Text),
new KeyValuePair<string, string>("Email", txtContactEmail.Text),
new KeyValuePair<string, string>("EmailAlt",txtContactEmailAlt.Text),
new KeyValuePair<string, string>("EmailAlt1",txtContactEmailAlt1.Text),
new KeyValuePair<string, string>("Telephone",txtContactTelephone.Text),
new KeyValuePair<string, string>("TelephoneAlt",txtContactTelephoneAlt.Text),
new KeyValuePair<string, string>("Mobile",txtContactMobile.Text),
new KeyValuePair<string, string>("Postcode",txtContactPostcode.Text),
new KeyValuePair<string, string>("Address",txtContactAddress.Text),
new KeyValuePair<string, string>("StreetName",txtContactStreetName.Text),
new KeyValuePair<string, string>("TownCity",txtContactCity.Text),
new KeyValuePair<string, string>("CountyArea",txtContactCountyArea.Text),
new KeyValuePair<string, string>("CountryCode",txtContactCountryCode.Text),
new KeyValuePair<string, string>("CompanyName",txtContactCompanyName.Text),
new KeyValuePair<string, string>("Comments",txtContactComments.Text),
new KeyValuePair<string, string>("TypeId",txtContactTypeId.Text),
new KeyValuePair<string, string>("DoNotMail",cbContactDoNotMail.Checked.ToString()),
new KeyValuePair<string, string>("DoNotEmail",cbContactDoNotEmail.Checked.ToString()),
new KeyValuePair<string, string>("DoNotPhone",cbContactDoNotPhone.Checked.ToString()),
new KeyValuePair<string, string>("OnEmailList",cbContactOnEmailList.Checked.ToString()),
new KeyValuePair<string, string>("Commision",txtContactCommision.Text),
new KeyValuePair<string, string>("Balance",txtContactBalance.Text),
new KeyValuePair<string, string>("Retainer",txtContactRetainer.Text)
});
PostContent(txtContactPostUrl.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例3: btnUpdatePropertyApi_Click
private async void btnUpdatePropertyApi_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("liveWebsiteURL", txtLiveWebsiteURL.Text)
});
PostContent(txtUpdatePropertyApiUrl.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例4: btnAddPayment_Click
private async void btnAddPayment_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("Amount", txtAmount.Text),
new KeyValuePair<string, string>("BookingId", txtBookingId.Text),
new KeyValuePair<string, string>("Charges", txtCharges.Text),
new KeyValuePair<string, string>("Currency", txtCurrency.Text),
new KeyValuePair<string, string>("Comments",txtComments.Text),
new KeyValuePair<string, string>("PaymentScheduleIds",txtPaymentScheduleIds.Text),
new KeyValuePair<string, string>("PaymentMethod",txtPaymentMethod.Text),
new KeyValuePair<string, string>("PaymentDate",txtPaymentDate.Text),
new KeyValuePair<string, string>("Status",txtStatus.Text),
new KeyValuePair<string, string>("PropertyId",txtPaymentPropertyId.Text)
});
PostContent(txtPaymentApi.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例5: btnAddReview_Click
private async void btnAddReview_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("ReviewTitle", txtReviewTitle.Text),
new KeyValuePair<string, string>("rating", txtRating.Text),
new KeyValuePair<string, string>("ReviewDescription", txtReviewDescription.Text),
new KeyValuePair<string, string>("ReviewerName", txtReviewerName.Text),
new KeyValuePair<string, string>("PropertyId",txtPropertyId.Text),
new KeyValuePair<string, string>("IsApproved",cbIsApproved.Checked.ToString())
});
PostContent(txtReviewsApi.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例6: btnPostEnquiry_Click
private async void btnPostEnquiry_Click(object sender, EventArgs e)
{
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("firstname", this.txtFirstName.Text),
new KeyValuePair<string, string>("lastname", this.txtLastName.Text),
new KeyValuePair<string, string>("propertyids", this.txtPropertyIDs.Text),
new KeyValuePair<string, string>("startdate", this.txtStartDate.Text),
new KeyValuePair<string, string>("enddate", this.txtEndDate.Text),
new KeyValuePair<string, string>("days", this.txtDays.Text),
new KeyValuePair<string, string>("budget", this.txtBudget.Text),
new KeyValuePair<string, string>("mobile", this.txtMobile.Text),
new KeyValuePair<string, string>("phone", this.txtPhone.Text),
new KeyValuePair<string, string>("email", this.txtEmail.Text),
new KeyValuePair<string, string>("adults", this.txtAdults.Text),
new KeyValuePair<string, string>("children", this.txtChildren.Text),
new KeyValuePair<string, string>("source", this.txtSource.Text),
new KeyValuePair<string, string>("comments", this.txtComments.Text),
new KeyValuePair<string, string>("createdate", this.txtCreatedate.Text)
});
await PostContent(this.txtApiImportEnquiry.Text, formContent.ReadAsByteArrayAsync().Result);
}
示例7: btnPostBooking_Click
private async void btnPostBooking_Click(object sender, EventArgs e)
{
var values = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("BookingTagIds", this.txtBookingTagIds.Text),
new KeyValuePair<string, string>("EnquiryId", this.txtBookingEnquiryId.Text),
new KeyValuePair<string, string>("Source", this.txtBookingSource.Text),
new KeyValuePair<string, string>("SendEmail", this.cbBookingSendEmail.Checked.ToString()),
new KeyValuePair<string, string>("PaidAmount", this.txtPaidAmount.Text),
new KeyValuePair<string, string>("PaymentMethod", this.txtBookingPaymentMethod.Text),
new KeyValuePair<string, string>("PaymentToken", this.txtBookingPaymentToken.Text),
new KeyValuePair<string, string>("CardPartialNumbers", this.txtBookingCardPartialNumbers.Text),
new KeyValuePair<string, string>("CardType", this.txtCreateBookingCardType.Text),
new KeyValuePair<string, string>("IsDeferredPayment", this.chkBookingIsDeferredPayment.Checked.ToString()),
new KeyValuePair<string, string>("SagepaySecurityKey", this.txtBookingSagepaySecurityKey.Text),
new KeyValuePair<string, string>("SagepayVendorTxCode", this.txtBookingSagepayVendorTxCode.Text),
new KeyValuePair<string, string>("SagepayVPSTxId", this.txtBookingSagepayVPSTxId.Text),
new KeyValuePair<string, string>("SagepayTxAuthNo", this.txtBookingSagepayTxAuthNo.Text),
new KeyValuePair<string, string>("Contact.ContactId", this.txtBookingContactId.Text),
new KeyValuePair<string, string>("Contact.Title", this.txtBookingContactTitle.Text),
new KeyValuePair<string, string>("Contact.FirstName", this.txtBookingContactFirstName.Text),
new KeyValuePair<string, string>("Contact.LastName", this.txtBookingContactLastName.Text),
new KeyValuePair<string, string>("Contact.Email", this.txtBookingContactEmail.Text),
new KeyValuePair<string, string>("Contact.Email1", this.txtBookingContactEmail1.Text),
new KeyValuePair<string, string>("Contact.Telephone", this.txtBookingContactTelephone.Text),
new KeyValuePair<string, string>("Contact.Mobile", this.txtBookingContactMobile.Text),
new KeyValuePair<string, string>("Contact.Address1", this.txtBookingContactAddress1.Text),
new KeyValuePair<string, string>("Contact.Address2", this.txtBookingContactAddress2.Text),
new KeyValuePair<string, string>("Contact.City", this.txtBookingContactCity.Text),
new KeyValuePair<string, string>("Contact.County", this.txtBookingContactCounty.Text),
new KeyValuePair<string, string>("Contact.Postcode", this.txtBookingContactPostcode.Text),
new KeyValuePair<string, string>("Contact.Country", this.txtBookingContactCountry.Text),
new KeyValuePair<string, string>("Contact.Source", this.txtBookingContactSource.Text)
};
values.AddRange(this.GetBookingProperties());
var formContent = new FormUrlEncodedContent(values);
await PostContent(this.txtApiBooking.Text, formContent.ReadAsByteArrayAsync().Result);
}