public async void OnWhatsappCommand(WardenInfoModel guestModel) { try { Device.OpenUri(new Uri("whatsapp://send?phone=+91" + guestModel.contact)); } catch (Exception ex) { await App.Current.MainPage.DisplayAlert("Not Installed", "Whatsapp Not Installed", "ok"); } }
public async void OnMessageCommand(WardenInfoModel obj) { try { var message = new SmsMessage("", obj.contact); await Sms.ComposeAsync(message); } catch (FeatureNotSupportedException ex) { await App.Current.MainPage.DisplayAlert("Failed", "Sms is not supported on this device.", "OK"); } catch (Exception ex) { await App.Current.MainPage.DisplayAlert("Failed", ex.Message, "OK"); } }
public async void OnCallCommand(WardenInfoModel obj) { try { PhoneDialer.Open(obj.contact); } catch (ArgumentNullException anEx) { // Number was null or white space } catch (FeatureNotSupportedException ex) { // Phone Dialer is not supported on this device. } catch (Exception ex) { // Other error has occurred. } }
public async void OnDeleteCommand(WardenInfoModel obj) { web.DeleteWardenDetail(obj.userId); }
public async void OnEditCommand(WardenInfoModel obj) { //App.areaid = obj.id; await App.Current.MainPage.Navigation.PushModalAsync(new EditWarden(obj.id.ToString(), obj.firstName, obj.contact)); }