Beispiel #1
0
 private void AddEMail()
 {
     EMails.Add(new MailModel()
     {
         ID = 0, MailOfContact = EditableEMail
     });
 }
Beispiel #2
0
        public ContactModel GetContact()
        {
            Contact.PhoneNumbers   = new List <PhoneNumberModel>(PhoneNumbers.ToList());
            Contact.MailsOfContact = new List <MailModel>(EMails.ToList());
            var newContact = _cloneService.CloneObject(Contact);

            return(_cloneService.CloneObject(Contact));
        }
Beispiel #3
0
        private bool CanEditEMail()
        {
            if (ErrorCollection.ContainsKey(nameof(EditableEMail)))
            {
                return(false);
            }

            if (string.IsNullOrWhiteSpace(EditableEMail))
            {
                return(false);
            }

            if (EMail == null)
            {
                return(false);
            }

            if (EMails.FirstOrDefault(m => m.MailOfContact.Equals(EditableEMail)) == null)
            {
                return(true);
            }

            return(false);
        }
Beispiel #4
0
 private bool HasChanges()
 {
     return(Contact.WasModelChanged ||
            PhoneNumbers.Any(p => p.WasModelChanged) ||
            EMails.Any(e => e.WasModelChanged));
 }