コード例 #1
0
 private async void btnCalcBooking_Click(object sender, EventArgs e)
 {
     var formContent = new FormUrlEncodedContent(this.GetBookingCalcProperties());
     await PostContent(txtApiBookingCalc.Text, formContent.ReadAsByteArrayAsync().Result);
 }
コード例 #2
0
        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
0
        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
0
        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
0
        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
0
        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
0
        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);
        }