示例#1
0
 public new static ContactWrapper GetSample()
 {
     return(new PersonWrapper(0)
     {
         IsPrivate = true,
         IsShared = false,
         IsCompany = false,
         FirstName = "Tadjeddine",
         LastName = "Bachir",
         Company = CompanyWrapper.GetSample(),
         Title = "Programmer",
         About = "",
         Created = ApiDateTime.GetSample(),
         CreateBy = EmployeeWraper.GetSample(),
         CommonData = new List <ContactInfoWrapper>()
         {
             ContactInfoWrapper.GetSample()
         },
         CustomFields = new List <CustomFieldBaseWrapper>()
         {
             CustomFieldBaseWrapper.GetSample()
         },
         ShareType = ShareType.None,
         CanDelete = true,
         CanEdit = true,
         TaskCount = 0,
         HaveLateTasks = false
     });
 }
        private ContactInfo FromContactInfoWrapper(ContactInfoWrapper contactInfoWrapper)
        {
            return new ContactInfo
                       {
                           ID = contactInfoWrapper.ID,
                           Category = contactInfoWrapper.Category,
                           Data = contactInfoWrapper.Data,
                           InfoType = contactInfoWrapper.InfoType,
                           IsPrimary = contactInfoWrapper.IsPrimary

                       };

        }