예제 #1
0
 private static void WriteWholesale(WholesaleCustomer customer, XmlWriter xmlOut)
 {
     xmlOut.WriteStartElement("Customer");
     xmlOut.WriteElementString("Type", "Wholesale");
     xmlOut.WriteElementString("FirstName", customer.FirstName);
     xmlOut.WriteElementString("LastName", customer.LastName);
     xmlOut.WriteElementString("Email", customer.Email);
     xmlOut.WriteElementString("Company", customer.Company);
     xmlOut.WriteEndElement();
 }
예제 #2
0
 private static WholesaleCustomer ReadWholesale(XmlReader xmlIn)
 {
     WholesaleCustomer customer = new WholesaleCustomer();
     customer.FirstName = xmlIn.ReadElementContentAsString();
     customer.LastName = xmlIn.ReadElementContentAsString();
     customer.Email = xmlIn.ReadElementContentAsString();
     customer.Company = xmlIn.ReadElementContentAsString();
     return customer;
 }