示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="f1Phones"></param>
        /// <param name="pcoPhones"></param>
        private void UpdatePhoneCommunications(F1toPCO.Model.F1.communications f1Phones, F1toPCO.Model.PCO.phoneNumbers pcoPhones)
        {
            foreach (F1toPCO.Model.F1.EntityType et in F1toPCO.Model.F1.phoneSyncType.Items)
            {
                F1toPCO.Model.F1.communication tmpF1Phone  = f1Phones.FindByCommunicationTypeName(et.F1Type);
                F1toPCO.Model.PCO.phoneNumber  tmpPCOPhone = pcoPhones.FindByLocation(et.PCOType);

                if (tmpF1Phone != null)
                {
                    if (tmpPCOPhone == null)
                    {
                        tmpPCOPhone          = new Model.PCO.phoneNumber();
                        tmpPCOPhone.number   = tmpF1Phone.communicationValue;
                        tmpPCOPhone.location = et.PCOType;
                        pcoPhones.phoneNumber.Add(tmpPCOPhone);
                    }
                    else
                    {
                        tmpPCOPhone.number = tmpF1Phone.communicationValue;
                    }
                }
                else
                {
                    if (tmpPCOPhone != null)
                    {
                        pcoPhones.phoneNumber.Remove(tmpPCOPhone);
                    }
                }
            }
        }
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="f1Phones"></param>
        /// <param name="pcoPhones"></param>
        private void UpdatePhoneCommunications(F1toPCO.Model.F1.communications f1Phones, F1toPCO.Model.PCO.phoneNumbers pcoPhones)
        {
            foreach (F1toPCO.Model.F1.EntityType et in F1toPCO.Model.F1.phoneSyncType.Items)
            {
                F1toPCO.Model.F1.communication tmpF1Phone = f1Phones.FindByCommunicationTypeName(et.F1Type);
                F1toPCO.Model.PCO.phoneNumber tmpPCOPhone = pcoPhones.FindByLocation(et.PCOType);

                if (tmpF1Phone != null)
                {
                    if (tmpPCOPhone == null)
                    {
                        tmpPCOPhone = new Model.PCO.phoneNumber();
                        tmpPCOPhone.number = tmpF1Phone.communicationValue;
                        tmpPCOPhone.location = et.PCOType;
                        pcoPhones.phoneNumber.Add(tmpPCOPhone);
                    }
                    else
                    {
                        tmpPCOPhone.number = tmpF1Phone.communicationValue;
                    }
                }
                else
                {
                    if (tmpPCOPhone != null)
                    {
                        pcoPhones.phoneNumber.Remove(tmpPCOPhone);
                    }
                }
            }
        }