public void AddOrganization(Organization org) { if (org != null) { OrgsList.Add(org); } }
private void Remove_Clicked(object sender, EventArgs e) { var smsManager = CrossMessaging.Current.SmsMessenger; if (smsManager.CanSendSms) { smsManager.SendSms(this.SelectedItem.PhoneNumber, "Your organization was deleted!"); } OrgsList.Remove(this.SelectedItem); }
public void UpdateOrganization(Organization org) { if (this.SelectedItem != null) { var oldOrganization = OrgsList.Where(x => x.OrgNumber == this.SelectedItem.OrgNumber).FirstOrDefault(); OrgsList.Remove(oldOrganization); } OrgsList.Add(this.SelectedItem); }