Пример #1
0
        static model.PersonContact MergePersonContact(model.Person person, model.Contact contact)
        {
            Logger.generatorMergePC();
            var date = Date.getDate(person.BirthDate);

            try
            {
                var personContact = new model.PersonContact
                {
                    Person   = person,
                    Contact  = contact,
                    Assigned = date
                };
                return(personContact);
            }
            catch (Exception e)
            {
                Logger.log(e);
                return(null);
            }
        }
Пример #2
0
 static model.Contact SetContact(string firstName, string lastName)
 {
     Logger.generatorSetContact();
     try
     {
         var contact = new model.Contact
         {
             Email = Email.getMail(firstName, lastName)//"*****@*****.**"
         };
         if (RandomNumber.Draw(1, 3) < 3)
         {
             contact.PhoneNumber = Telephone.getPhoneNumber(); //"0048721686274";
         }
         return(contact);
     }
     catch (Exception e)
     {
         Logger.log(e);
         return(null);
     }
 }