Exemplo n.º 1
0
        private void OnAdd()
        {
            if (!FirstName.IsNullOrEmpty() &&
                !LastName.IsNullOrEmpty() &&
                !NamesList.Contains(FullName))
            {
                NamesList.Add(FullName);

                FirstName = null;
                LastName  = null;
            }
        }
Exemplo n.º 2
0
        public void Validate()
        {
            if (FirstName.IsNullOrEmpty() || LastName.IsNullOrEmpty())
            {
                AddNotification("0001", "Nome Inválido");
            }

            if (Email.IsNullOrEmpty())
            {
                AddNotification("0002", "Email Inválido");
            }
        }
Exemplo n.º 3
0
            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;
                    }
                }
            }
Exemplo n.º 4
0
 public bool HasAllNonEmpty()
 {
     return(!FirstName.IsNullOrEmpty() &&
            !LastName.IsNullOrEmpty() &&
            !EmailAddress.IsNullOrEmpty());
 }