public void BuyLaterClick() { SocialShareIOS SocialShareIOS= new SocialShareIOS (this,Screen.RaffleDetail); string emailOrPhone = socialShareView.BuylaterTextField.Text; string[] emailOrPhoneArray = new string[] { emailOrPhone}; //check if it is a canada phone if (FormatManager.chechinput (emailOrPhone, FormatManager.FormatOption.Phone)) { DismissSocialShareClick(); if (raffle.representative_needed=="N") { SocialShareIOS.Sms (String.Format (RaffleDetailData.c_smsMessageTemplate_WithLink, raffle.organization, raffle.sell_ticket_url, GlobalVariable.currentlocation), emailOrPhoneArray); } else { SocialShareIOS.Sms (String.Format (RaffleDetailData.c_smsMessageTemplate_NoLink, raffle.organization,RaffleDetailData.Tap5050WebPageLink), emailOrPhoneArray); } } else if (FormatManager.chechinput (emailOrPhone, FormatManager.FormatOption.Email)) { DismissSocialShareClick(); if (raffle.representative_needed=="N") { SocialShareIOS.Email (String.Format (RaffleDetailData.c_emailMessageTemplate_WithLink, raffle.organization, raffle.sell_ticket_url, GlobalVariable.currentlocation), String.Format (RaffleDetailData.c_emailSubjectTemplate_WithLink, raffle.organization), emailOrPhoneArray); } else { SocialShareIOS.Email (String.Format (RaffleDetailData.c_emailMessageTemplate_NoLink, raffle.organization, raffle.event_name, RaffleDetailData.Tap5050WebPageLink ), String.Format (RaffleDetailData.c_emailSubjectTemplate_NoLink, raffle.organization), emailOrPhoneArray); } } else { //alert UIAlertController Alert = UIAlertController.Create (RaffleDetailData.AlertScreenFormatErrorTitle, RaffleDetailData.AlertScreenFormatErrorMessage, UIAlertControllerStyle.Alert); Alert.AddAction (UIAlertAction.Create (RaffleDetailData.AlertScreenFormatErrorCancelBtnTitle, UIAlertActionStyle.Cancel,null )); PresentViewController (Alert, true, null); } }
/******************************************************************************** *Btn clicks ********************************************************************************/ public void SentSMSClick() { List<string> selectedPersonPhone = new List<string> (); foreach (var x in ContactList) { if (x.Selected) { selectedPersonPhone.Add (x.Phone); } } var v=this.NavigationController; SocialShareIOS SocialShareIOS = new SocialShareIOS (this,Screen.ContactList); if (String.IsNullOrEmpty(raffle.share_sms_body)){ if (raffle.representative_needed == "N") { SocialShareIOS.Sms(String.Format(RaffleDetailData.c_smsMessageTemplate_WithLink, raffle.organization, raffle.sell_ticket_url, GlobalVariable.currentlocation), selectedPersonPhone.ToArray()); } else { SocialShareIOS.Sms(String.Format(RaffleDetailData.c_smsMessageTemplate_NoLink, raffle.organization, RaffleDetailData.Tap5050WebPageLink), selectedPersonPhone.ToArray()); } } else { //SocialShareIOS.Sms(raffle.share_sms_body,selectedPersonPhone.ToArray()); SocialShareIOS.Sms(SharingString.Format(raffle.share_sms_body, raffle), selectedPersonPhone.ToArray()); } }