コード例 #1
0
 public VoipCallWrapper(VoipCall call, ContactWrapper contact = null)
 {
     Id = call.Id;
     From = call.From;
     To = call.To;
     Status = call.Status;
     AnsweredBy = EmployeeWraper.Get(call.AnsweredBy);
     DialDate = new ApiDateTime(call.DialDate);
     DialDuration = call.DialDuration;
     Cost = call.TotalPrice;
     Contact = contact;
     History = call.History.Select(h => new VoipCallHistoryWrapper(h));
 }
コード例 #2
0
 public VoipCallWrapper(VoipCall call, ContactWrapper contact = null)
 {
     Id           = call.Id;
     From         = call.From;
     To           = call.To;
     Status       = call.Status;
     AnsweredBy   = EmployeeWraper.Get(call.AnsweredBy);
     DialDate     = new ApiDateTime(call.DialDate);
     DialDuration = call.DialDuration;
     Cost         = call.TotalPrice;
     Contact      = contact;
     History      = call.History.Select(h => new VoipCallHistoryWrapper(h));
 }
コード例 #3
0
        public VoipCallWrapper(VoipCall call, ContactWrapper contact = null)
        {
            Id             = call.Id;
            From           = call.From;
            To             = call.To;
            Status         = call.Status;
            AnsweredBy     = EmployeeWraper.Get(call.AnsweredBy);
            DialDate       = new ApiDateTime(call.DialDate);
            DialDuration   = call.DialDuration;
            Cost           = call.Price + call.ChildCalls.Sum(r => r.Price) + call.VoipRecord.Price;
            Contact        = contact;
            RecordUrl      = call.VoipRecord.Uri;
            RecordDuration = call.VoipRecord.Duration;

            if (call.ChildCalls.Any())
            {
                Calls = call.ChildCalls.Select(childCall => new VoipCallWrapper(childCall));
            }
        }
コード例 #4
0
        public ContactBaseWithEmailWrapper(ContactWrapper contactWrapper) : base(contactWrapper.ID)
        {
            this.AccessList    = contactWrapper.AccessList;
            this.CanEdit       = contactWrapper.CanEdit;
            this.DisplayName   = contactWrapper.DisplayName;
            this.IsCompany     = contactWrapper.IsCompany;
            this.IsPrivate     = contactWrapper.IsPrivate;
            this.IsShared      = contactWrapper.IsShared;
            this.MediumFotoUrl = contactWrapper.MediumFotoUrl;
            this.SmallFotoUrl  = contactWrapper.SmallFotoUrl;

            if (contactWrapper.CommonData != null && contactWrapper.CommonData.Count() != 0)
            {
                this.Email = contactWrapper.CommonData.Where(item => item.InfoType == ContactInfoType.Email && item.IsPrimary == true).FirstOrDefault();
            }
            else
            {
                this.Email = null;
            }
        }
コード例 #5
0
        public ContactBaseWithEmailWrapper(ContactWrapper contactWrapper) : base(contactWrapper.ID)
        {
            AccessList    = contactWrapper.AccessList;
            CanEdit       = contactWrapper.CanEdit;
            DisplayName   = contactWrapper.DisplayName;
            IsCompany     = contactWrapper.IsCompany;
            IsPrivate     = contactWrapper.IsPrivate;
            IsShared      = contactWrapper.IsShared;
            ShareType     = contactWrapper.ShareType;
            MediumFotoUrl = contactWrapper.MediumFotoUrl;
            SmallFotoUrl  = contactWrapper.SmallFotoUrl;

            if (contactWrapper.CommonData != null && contactWrapper.CommonData.Count() != 0)
            {
                Email = contactWrapper.CommonData.FirstOrDefault(item => item.InfoType == ContactInfoType.Email && item.IsPrimary);
            }
            else
            {
                Email = null;
            }
        }
コード例 #6
0
        public ContactBaseWithEmailWrapper(ContactWrapper contactWrapper) : base(contactWrapper.ID)
        {
            AccessList = contactWrapper.AccessList;
            CanEdit = contactWrapper.CanEdit;
            DisplayName = contactWrapper.DisplayName;
            IsCompany = contactWrapper.IsCompany;
            IsPrivate = contactWrapper.IsPrivate;
            IsShared = contactWrapper.IsShared;
            ShareType = contactWrapper.ShareType;
            MediumFotoUrl = contactWrapper.MediumFotoUrl;
            SmallFotoUrl = contactWrapper.SmallFotoUrl;

            if (contactWrapper.CommonData != null && contactWrapper.CommonData.Count() != 0)
            {
                Email = contactWrapper.CommonData.FirstOrDefault(item => item.InfoType == ContactInfoType.Email && item.IsPrimary);
            }
            else
            {
                Email = null;
            }
        }
コード例 #7
0
        public ContactBaseWithEmailWrapper(ContactWrapper contactWrapper) : base(contactWrapper.ID)
        {
            this.AccessList = contactWrapper.AccessList;
            this.CanEdit = contactWrapper.CanEdit;
            this.DisplayName = contactWrapper.DisplayName;
            this.IsCompany = contactWrapper.IsCompany;
            this.IsPrivate = contactWrapper.IsPrivate;
            this.IsShared = contactWrapper.IsShared;
            this.MediumFotoUrl = contactWrapper.MediumFotoUrl;
            this.SmallFotoUrl = contactWrapper.SmallFotoUrl;

            if (contactWrapper.CommonData != null && contactWrapper.CommonData.Count() != 0)
            {
                this.Email = contactWrapper.CommonData.Where(item => item.InfoType == ContactInfoType.Email && item.IsPrimary == true).FirstOrDefault();
            }
            else
            {
                this.Email = null;
            }
        }
コード例 #8
0
ファイル: CRMApi.Voip.cs プロジェクト: vipwan/CommunityServer
        private static ContactWrapper GetContactWithFotos(ContactWrapper contact)
        {
            contact.SmallFotoUrl = ContactPhotoManager.GetSmallSizePhoto(contact.ID, contact.IsCompany);
            contact.MediumFotoUrl = ContactPhotoManager.GetMediumSizePhoto(contact.ID, contact.IsCompany);

            return contact;
        }