Ejemplo n.º 1
0
 private static void FromXmlElements(XmlNodeList elems, IList <XmlTelephoneItem> telephoneItems)
 {
     if (elems != null)
     {
         foreach (XmlElement elem in elems)
         {
             var newTelephoneItem = new XmlTelephoneItem();
             FromXmlElement(elem, newTelephoneItem);
             telephoneItems.Add(newTelephoneItem);
         }
     }
 }
Ejemplo n.º 2
0
        private static void FromXmlElement(XmlElement elem, XmlTelephoneItem telephoneItem)
        {
            if (elem == null)
            {
                return;
            }
            telephoneItem.Date          = elem.GetAttribute("Date");
            telephoneItem.DateActivated = elem.GetAttribute("DateActivated");
            telephoneItem.Comment       = elem.GetAttribute("Comment");
            telephoneItem.GroupName     = elem.GetAttribute("GroupName");
            telephoneItem.Telephone     = XmlWrapperHelper.ResolvePhoneNumber(elem.InnerText);

            if (telephoneItem.GroupName == String.Empty)
            {
                telephoneItem.GroupName = XmlWrapperHelper.ResolvePhoneGroupName(telephoneItem.Telephone);
            }
        }