private void OnAdd() { if (!FirstName.IsNullOrEmpty() && !LastName.IsNullOrEmpty() && !NamesList.Contains(FullName)) { NamesList.Add(FullName); FirstName = null; LastName = null; } }
public void Validate() { if (FirstName.IsNullOrEmpty() || LastName.IsNullOrEmpty()) { AddNotification("0001", "Nome Inválido"); } if (Email.IsNullOrEmpty()) { AddNotification("0002", "Email Inválido"); } }
public void Merge(AndroidContact other) { if (this.Equals(other)) { if ((FirstName.IsNullOrEmpty() || FirstName.IsNumber()) && !other.FirstName.IsNullOrEmpty()) { FirstName = other.FirstName; } if ((LastName.IsNullOrEmpty() || LastName.IsNumber()) && !other.LastName.IsNullOrEmpty()) { LastName = other.LastName; } if (NormalizedNumber.IsNullOrEmpty() && !other.NormalizedNumber.IsNullOrEmpty()) { NormalizedNumber = other.NormalizedNumber; } } }
public bool HasAllNonEmpty() { return(!FirstName.IsNullOrEmpty() && !LastName.IsNullOrEmpty() && !EmailAddress.IsNullOrEmpty()); }