Пример #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
     });
 }
Пример #2
0
 public static CasesWrapper GetSample()
 {
     return(new CasesWrapper
     {
         IsClosed = false,
         Title = "Exhibition organization",
         Created = (ApiDateTime)DateTime.UtcNow,
         CreateBy = EmployeeWraper.GetSample(),
         IsPrivate = false,
         CustomFields = new[] { CustomFieldBaseWrapper.GetSample() }
     });
 }
        private CustomField ToCustomField(CustomFieldBaseWrapper customFieldWrapper)
        {

            return new CustomField
                       {

                           EntityID = customFieldWrapper.EntityId,
                           FieldType = customFieldWrapper.FieldType,
                           ID = customFieldWrapper.ID,
                           Label = customFieldWrapper.Label,
                           Mask = customFieldWrapper.Mask,
                           Position = customFieldWrapper.Position,
                           Value = customFieldWrapper.FieldValue
                       };

        }