private Boolean SendEnquiryDataService() { bool blnEnquiryDataSent = false; try { mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertWebLead( txtName.Value.Trim(), currentClub.ClubId.Rendered, txtPhone.Value.Trim(), "", //postcode txtEmail.Value.Trim(), "", //preferred time "", //memberFlag Settings.WebLeadsSourceID, //sourceId drpHowDidYouFindUs.SelectedValue.ToString() != "" && drpHowDidYouFindUs.SelectedValue.ToString() != Translate.Text("Select") ? drpHowDidYouFindUs.SelectedValue.ToString() : "", //source Settings.WebLeadsDefaultCampaignID, //campaignId chkSubscribe.Checked? true : false); //newsletter //var test = virginActiveService.ReadWebLead(); if (currentClub.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", currentClub.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending enquiry webservice data {1}: {0}", ex.Message, currentClub.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }
private Boolean SendEnquiryDataService() { bool blnEnquiryDataSent = false; try { //Virgin Active requirement to concatenate fields into one string System.Text.StringBuilder strCommentsField = new System.Text.StringBuilder(); strCommentsField.Append("Comment: "); strCommentsField.Append(txtComments.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Job Title: "); strCommentsField.Append(txtJobTitle.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Company Name: "); strCommentsField.Append(txtCompanyName.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Company Website: "); strCommentsField.Append(txtCompanyWebsite.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Location(s): "); strCommentsField.Append(txtLocation.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Clubs of interest: "); strCommentsField.Append(ClubNames); strCommentsField.Append("||"); strCommentsField.Append("No. of Employees: "); //strCommentsField.Append(drpNoEmployees.SelectedValue.ToString() != Translate.Text("Select") ? drpNoEmployees.SelectedValue.ToString() : ""); strCommentsField.Append(txtNoEmployees.Value.Trim()); strCommentsField.Append("||"); strCommentsField.Append("Existing Virgin Active Members: "); //strCommentsField.Append(drpExistingMembers.SelectedValue.ToString() != Translate.Text("Select") ? drpExistingMembers.SelectedValue.ToString() : ""); strCommentsField.Append(txtExistingMembers.Value.Trim()); strCommentsField.Append("||"); mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertCorporateWebLead( txtName.Value.Trim(), currentClub.ClubId.Rendered, txtPhone.Value.Trim(), txtEmail.Value.Trim(), strCommentsField.ToString(), false, //publish info false, //share info false); //var test = virginActiveService.ReadCorporateWebLead(); if (currentClub.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", currentClub.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending corporate enquiry webserivce data {1}: {0}", ex.Message, currentClub.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }
private Boolean SendEnquiryDataService() { bool blnEnquiryDataSent = false; try { mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertWebLead( txtName.Value.Trim(), clubItem.ClubId.Rendered, txtPhone.Value.Trim(), "", //postcode txtEmail.Value.Trim(), string.Empty, string.Empty, Settings.WebLeadsSourceID, currentLanding.LandingBase.LandingIdName.Rendered, "Virgin Active Website Landing Page", chkSubscribe.Checked ); //newsletter //var test = virginActiveService.ReadWebLead(); if (clubItem.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", clubItem.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending enquiry webservice data {1}: {0}", ex.Message, clubItem.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }
private Boolean SendFeedbackDataService() { bool blnEnquiryDataSent = false; try { string CommentType = Translate.Text("Kids Club Enquiry") + "- "; CommentType += drpQueryTypeList.SelectedValue.ToString() != Translate.Text("Select") ? drpQueryTypeList.SelectedValue.ToString() + ": " : ""; string FirstName = ""; string Surname = ""; if (txtName.Value.IndexOf(" ") != -1) { FirstName = txtName.Value.Substring(0, txtName.Value.IndexOf(" ")).Trim(); Surname = txtName.Value.Substring(txtName.Value.IndexOf(" ") + 1).Trim(); } else { FirstName = txtName.Value.Trim(); } mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertMemberFeedback( FirstName, Surname, FormHelper.IsMobilePhoneNumber(txtPhone.Value.Trim()) ? "" : txtPhone.Value.Trim(), FormHelper.IsMobilePhoneNumber(txtPhone.Value.Trim()) ? txtPhone.Value.Trim() : "", txtEmail.Value.Trim(), //Set as a 'General' query type Settings.FeedbackTypeGeneralComment.ToString(), //comment type string Convert.ToInt32(Settings.FeedbackAboutIDGeneral), //comment about id currentClub.ClubId.Rendered, FormHelper.IsValidMembershipNumber(txtMembership.Value.Trim()) ? "Yes" : "No", txtMembership.Value.Trim(), CommentType + txtComments.Value.Trim(), chkConsentToPublish.Checked ? "Yes" : "No", "", //preferred contact false //newsletter ); //var test = virginActiveService.ReadMemberFeedback(); if (currentClub.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", currentClub.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending kids club feedback webserivce data {1}: {0}", ex.Message, currentClub.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }
private Boolean SendEnquiryDataService() { bool blnEnquiryDataSent = false; try { mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertWebLead( yourname.Value.Trim(), currentClub.ClubId.Rendered, contact.Value.Trim(), "", //postcode email.Value.Trim(), "", //preferred time "", //memberFlag Settings.WebLeadsSourceID, //sourceId Settings.CampaignWebLeadsSource, //source //campaign.CampaignBase.Campaignname.Rendered != "" ? campaign.Campaign.CampaignBase.Campaignname.Rendered : "Unspecified Website Campaign", //source (campaignname) campaign.CampaignBase.Campaigncode.Rendered != "" ? campaign.CampaignBase.Campaigncode.Rendered : "Virgin Active Website Campaign", //campaignId (campaigncode) false); //newsletter //var test = virginActiveService.ReadWebLead(); if (currentClub.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", currentClub.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending enquiry webservice data {1}: {0}", ex.Message, currentClub.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }
private Boolean SendEnquiryDataService() { bool blnEnquiryDataSent = false; try { //Enter Referee's details mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices virginActiveService = new mm.virginactive.webservices.virginactive.feedbackenquiry.MM_WebServices(); virginActiveService.InsertWebLeadAndReferral( firstName2.Value.Trim() + " " + surname2.Value.Trim(), secondaryClub.ClubId.Rendered, number2.Value.Trim(), "", //postcode email2.Value.Trim(), "", //preferred time "", //memberFlag Settings.WebLeadsSourceID, //sourceId Settings.CampaignWebLeadsSource, //source //campaign.CampaignBase.Campaignname.Rendered != "" ? campaign.CampaignBase.Campaignname.Rendered : "Unspecified Website Campaign", //source (campaignname) campaign.CampaignBase.Campaigncode.Rendered != "" ? campaign.CampaignBase.Campaigncode.Rendered : "Virgin Active Website Campaign", //campaignId (campaigncode) false, memberNo.Value.Trim(),//referral membeship no. primaryClub.ClubId.Rendered,//referral club code firstName1.Value.Trim(),//referral first name surname1.Value.Trim(),//referral surname email1.Value.Trim(),//referral email subscribe.Checked);//referral newsletter //var test = virginActiveService.ReadWebLead(); if (secondaryClub.ClubId.Rendered == "") { Log.Error(String.Format("No Club ID exists for club: {0}", secondaryClub.Clubname.Raw), this); } } catch (Exception ex) { Log.Error(String.Format("Error sending enquiry webservice data {1}: {0}", ex.Message, secondaryClub.Clubname.Raw), this); mm.virginactive.common.EmailMessagingService.ErrorEmailNotification.SendMail(ex); } return blnEnquiryDataSent; }