Exemplo n.º 1
0
        public void GetIdValues(XElement src)
        {
            TenantCustRecord tcr = new TenantCustRecord();
            foreach (XElement sub in src.Descendants("CustomRecords"))
            {

                if (sub.Descendants("Record") != null)
                {
                    GetCustomRecord(sub, tcr);
                }
            }

            IdValues = tcr;
        }
Exemplo n.º 2
0
 private void GetCustomRecord(XElement sub, TenantCustRecord tcr)
 {
     foreach (XElement cr in sub.Descendants("Record"))
     {
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Other 1")
         {
             tcr.Other1Name = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.Other1Val = cr.Element("Value").Value;
         }
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Other 2")
         {
             tcr.Other2Name = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.Other2Val = cr.Element("Value").Value;
         }
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Other 3")
         {
             tcr.Other3Name = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.Other3Val = cr.Element("Value").Value;
         }
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Other 4")
         {
             tcr.Other4Name = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.Other4Val = cr.Element("Value").Value;
         }
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Employer")
         {
             tcr.EmployerName = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.EmployerNameVal = cr.Element("Value").Value;
         }
         if (cr.Element("Name") != null && cr.Element("Name").Value == "Work Phone")
         {
             tcr.EmployerPhone = cr.Element("Name").Value;
             if (cr.Element("Value") != null)
                 tcr.EmployerPhoneVal = cr.Element("Value").Value;
         }
     }
 }
Exemplo n.º 3
0
 public TenantCustoms()
 {
     IdValues = new TenantCustRecord();
 }