In This Topic
���using System;
using System.Xml;
namespace SimpleHierarchyLib
{
/// <summary>
/// This class represents the Element Invoice
/// </summary>
[LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence,
LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element,
"Invoice", "", true, false, false)]
public partial class Invoice : SimpleHierarchyLib.XmlCommonBase
{
#region Constructors
public Invoice()
{
_elementName = "Invoice";
Init();
}
public Invoice(string elementName)
{
_elementName = elementName;
Init();
}
#endregion
#region Initialization methods for the class
protected override void Init()
{
SimpleHierarchyLib.Registration.iRegistrationIndicator = 0;
m_InvoiceNo = 0;
m_DeliveryAddress = new SimpleHierarchyLib.AddressType("DeliveryAddress");
m_BillingAddress = null;
m_Item = new SimpleHierarchyLib.XmlObjectCollection<SimpleHierarchyLib.ItemType>("Item", "", 1, -1, false);
m_Payment = new SimpleHierarchyLib.Payment("Payment");
}
#endregion
#region ICloneable Interface
public override object Clone()
{
SimpleHierarchyLib.Invoice newObject = new SimpleHierarchyLib.Invoice(_elementName);
newObject.m_InvoiceNo = m_InvoiceNo;
newObject.m_DeliveryAddress = null;
if (m_DeliveryAddress != null)
newObject.m_DeliveryAddress = (SimpleHierarchyLib.AddressType)m_DeliveryAddress.Clone();
newObject.m_BillingAddress = null;
if (m_BillingAddress != null)
newObject.m_BillingAddress = (SimpleHierarchyLib.AddressType)m_BillingAddress.Clone();
foreach (SimpleHierarchyLib.ItemType o in m_Item)
newObject.m_Item.Add((SimpleHierarchyLib.ItemType)o.Clone());
newObject.m_Payment = null;
if (m_Payment != null)
newObject.m_Payment = (SimpleHierarchyLib.Payment)m_Payment.Clone();
return newObject;
}
#endregion
#region Member variables
protected override string TargetNamespace
{
get { return ""; }
}
#region Attribute - InvoiceNo
[LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("InvoiceNo", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_ui4, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)]
public uint InvoiceNo
{
get
{
return m_InvoiceNo;
}
set
{
m_InvoiceNo = value;
}
}
protected uint m_InvoiceNo;
#endregion
#region Attribute - DeliveryAddress
[LiquidTechnologies.Runtime.ElementInfoSeqClsMnd("DeliveryAddress", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(SimpleHierarchyLib.AddressType), true)]
public SimpleHierarchyLib.AddressType DeliveryAddress
{
get
{
return m_DeliveryAddress;
}
set
{
Throw_IfPropertyIsNull(value, "DeliveryAddress");
if (value != null)
SetElementName(value, "DeliveryAddress");
m_DeliveryAddress = value;
}
}
protected SimpleHierarchyLib.AddressType m_DeliveryAddress;
#endregion
#region Attribute - BillingAddress
[LiquidTechnologies.Runtime.ElementInfoSeqClsOpt("BillingAddress", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(SimpleHierarchyLib.AddressType))]
public SimpleHierarchyLib.AddressType BillingAddress
{
get
{
return m_BillingAddress;
}
set
{
if (value == null)
m_BillingAddress = null;
else
{
SetElementName(value, "BillingAddress");
m_BillingAddress = value;
}
}
}
protected SimpleHierarchyLib.AddressType m_BillingAddress;
#endregion
#region Attribute - Item
[LiquidTechnologies.Runtime.ElementInfoSeqClsCol("Item", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element)]
public SimpleHierarchyLib.XmlObjectCollection<SimpleHierarchyLib.ItemType> Item
{
get { return m_Item; }
}
protected SimpleHierarchyLib.XmlObjectCollection<SimpleHierarchyLib.ItemType> m_Item;
#endregion
#region Attribute - Payment
[LiquidTechnologies.Runtime.ElementInfoSeqClsMnd("Payment", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(SimpleHierarchyLib.Payment), true)]
public SimpleHierarchyLib.Payment Payment
{
get
{
return m_Payment;
}
set
{
Throw_IfPropertyIsNull(value, "Payment");
if (value != null)
SetElementName(value, "Payment");
m_Payment = value;
}
}
protected SimpleHierarchyLib.Payment m_Payment;
#endregion
#region Attribute - Namespace
public override string Namespace
{
get { return ""; }
}
#endregion
#region Attribute - GetBase
public override LiquidTechnologies.Runtime.XmlObjectBase GetBase()
{
return this;
}
#endregion
#endregion
}
}