public void Hideorshowbutton(ViewRequestedServiceStatusModel obj) { if (_OldDisciplinaryData == obj) { obj.isbuttonvisible = !obj.isbuttonvisible; UpdateProduct(obj); } else { if (_OldDisciplinaryData != null) { foreach (var items in ViewRequestedServiceStatusModels) { if (_OldDisciplinaryData.personName == items.personName) { _OldDisciplinaryData.isbuttonvisible = false; UpdateProduct(_OldDisciplinaryData); break; } } } obj.isbuttonvisible = true; UpdateProduct(obj); } _OldDisciplinaryData = obj; }
public void UpdateProduct(ViewRequestedServiceStatusModel obj) { var index = ViewRequestedServiceStatusModels.IndexOf(obj); ViewRequestedServiceStatusModels.Remove(obj); ViewRequestedServiceStatusModels.Insert(index, obj); }
public async void Onwhatsappcommand(ViewRequestedServiceStatusModel obj) { try { Device.OpenUri(new Uri("whatsapp://send?phone=+91" + obj.personMobileNo)); } catch (Exception ex) { await App.Current.MainPage.DisplayAlert("Not Installed", "Whatsapp Not Installed", "ok"); } }
public async void OnCallCommand(ViewRequestedServiceStatusModel obj) { try { PhoneDialer.Open(obj.personMobileNo); } 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 OnTapCommand(ViewRequestedServiceStatusModel obj) { Hideorshowbutton(obj); }