Beispiel #1
0
        /// <summary>
        /// Allows the class to be copied
        /// </summary>
        /// <remarks>
        /// Performs a 'deep copy' of all the data in the class (and its children)
        /// </remarks>
        public override object Clone()
        {
            DESADV_XSDLib.TransportDetails newObject = new DESADV_XSDLib.TransportDetails(_elementName);
            foreach (DESADV_XSDLib.TransportDetails_Group o in m_TransportDetails_Group)
            {
                newObject.m_TransportDetails_Group.Add((DESADV_XSDLib.TransportDetails_Group)o.Clone());
            }

// ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

// Add Additional clone code here...

// ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

            return(newObject);
        }
Beispiel #2
0
        // Shows a simple example of how the class TransportDetails
        // can be used. This class can be used to load documents whose
        // root (document) element is <TransportDetails>.
        private void SimpleTestTransportDetails(string filename)
        {
            try
            {
                // create an instance of the class to load the XML file into
                DESADV_XSDLib.TransportDetails elm = new DESADV_XSDLib.TransportDetails();

                // load the xml from a file into the object (the root element in the
                // xml document must be <TransportDetails>.
                elm.FromXmlFile(filename);

                // This will open up a viewer, allowing you to navigate the classes
                // that have been generated.
                // Note the viewer can be used to modify properties, and provides a listing of
                // the code required to create the document it is displaying.
                SimpleViewer sv = new SimpleViewer(elm);
                sv.ShowDialog();

                // You can then add code to navigate the data held in the class.
                // When navigating this object model you should refer to the documentation
                // generated in the directory:
                // C:\BTS\XSD\KORUS\DESADV_XSD.xsd.Output\DocumentationCS\.
                // The help should be compiled into a chm before being used, (use build.bat)
                //- HTML Help Workshop is required to perform this,
                // and can be downloaded from Microsoft. The path to the help compiler (hhc.exe)
                // may need adjusting in build.bat

                // ...

                ////////////////////////////////////////////////////////////////////
                // The Xml can be extracted from the class using one of 3 methods //
                ////////////////////////////////////////////////////////////////////

                // This method will extract the xml into a string. The string is always encoded
                // using Unicode, there a number of options allowing the headers,
                // end of line & indenting to be set.
                string strXml = elm.ToXml();
                Console.WriteLine(strXml);

                // This method will extract the xml into a file. This method provides options
                // for changing the encoding (UTF-8, UTF-16) as well as headers,
                // end of line and indenting.
                elm.ToXmlFile(filename + ".testouput.xml");

                // This method will extract the xml into a stream. This method provides options
                // for changing the encoding (UTF-8, UTF-16) as well as headers,
                // end of line and indenting.
                // This method is useful when a specific encoding is required (typically
                // UTF-8), in order to transmit it over an 8-bit connection, smtp etc
                // without the need to write the xml to file first.
                System.IO.Stream stmXml = elm.ToXmlStream();

            }
            catch (Exception e)
            {
                DisplayError(e);
            }
        }
 protected void ClearChoice(string selectedElement)
 {
     m_DespatchAdviceNumber = "";
     m_IsValidDespatchAdviceNumber = false;
     m_DespatchAdviceDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidDespatchAdviceDate = false;
     m_DespatchAdviceTime = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.time);
     m_IsValidDespatchAdviceTime = false;
     m_EstimatedDeliveryDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidEstimatedDeliveryDate = false;
     m_EstimatedDeliveryTime = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.time);
     m_IsValidEstimatedDeliveryTime = false;
     m_DeliveryDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidDeliveryDate = false;
     m_CollectionDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidCollectionDate = false;
     m_DeliveryScheduledDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidDeliveryScheduledDate = false;
     m_BuyerOrderNumber = "";
     m_IsValidBuyerOrderNumber = false;
     m_BuyerOrderDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidBuyerOrderDate = false;
     m_SupplierOrderNumber = "";
     m_IsValidSupplierOrderNumber = false;
     m_SupplierOrderDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidSupplierOrderDate = false;
     m_DespatchNumber = "";
     m_IsValidDespatchNumber = false;
     m_DespatchDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidDespatchDate = false;
     m_InvoiceNumber = "";
     m_IsValidInvoiceNumber = false;
     m_ContractNumber = "";
     m_IsValidContractNumber = false;
     m_ContractDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
     m_IsValidContractDate = false;
     m_PromotionReference = "";
     m_IsValidPromotionReference = false;
     m_DocumentFunctionCode = DESADV_XSDLib.Enumerations.DocumentFunctionCode.O;
     m_IsValidDocumentFunctionCode = false;
     m_Currency = "";
     m_IsValidCurrency = false;
     m_Remarks = "";
     m_IsValidRemarks = false;
     m_TransportDetails = null;
     m_Order_Measurement = null;
     _validElement = selectedElement;
 }
        /// <summary>
        /// Initializes the class
        /// </summary>
        /// <remarks>
        /// This creates all the mandatory fields (populated with the default data) 
        /// All Collection object are created.
        /// However any 1-n relationships (these are represented as collections) are
        /// empty. To comply with the schema these must be populated before the xml
        /// obtained from ToXml is valid against the schema C:\BTS\XSD\KORUS\DESADV_XSD.xsd.
        /// </remarks>
        protected override void Init()
        {
            DESADV_XSDLib.Registration.iRegistrationIndicator = 0; // causes registration to take place
            m_DespatchAdviceNumber = "";
            m_IsValidDespatchAdviceNumber = false;
            m_DespatchAdviceDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidDespatchAdviceDate = false;
            m_DespatchAdviceTime = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.time);
            m_IsValidDespatchAdviceTime = false;
            m_EstimatedDeliveryDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidEstimatedDeliveryDate = false;
            m_EstimatedDeliveryTime = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.time);
            m_IsValidEstimatedDeliveryTime = false;
            m_DeliveryDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidDeliveryDate = false;
            m_CollectionDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidCollectionDate = false;
            m_DeliveryScheduledDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidDeliveryScheduledDate = false;
            m_BuyerOrderNumber = "";
            m_IsValidBuyerOrderNumber = false;
            m_BuyerOrderDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidBuyerOrderDate = false;
            m_SupplierOrderNumber = "";
            m_IsValidSupplierOrderNumber = false;
            m_SupplierOrderDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidSupplierOrderDate = false;
            m_DespatchNumber = "";
            m_IsValidDespatchNumber = false;
            m_DespatchDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidDespatchDate = false;
            m_InvoiceNumber = "";
            m_IsValidInvoiceNumber = false;
            m_ContractNumber = "";
            m_IsValidContractNumber = false;
            m_ContractDate = new LiquidTechnologies.Runtime.Net45.XmlDateTime(LiquidTechnologies.Runtime.Net45.XmlDateTime.DateType.date);
            m_IsValidContractDate = false;
            m_PromotionReference = "";
            m_IsValidPromotionReference = false;
            m_DocumentFunctionCode = DESADV_XSDLib.Enumerations.DocumentFunctionCode.O;
            m_IsValidDocumentFunctionCode = false;
            m_Currency = "";
            m_IsValidCurrency = false;
            m_Remarks = "";
            m_IsValidRemarks = false;
            m_TransportDetails = null;
            m_Order_Measurement = null;

            _validElement = "";
            // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

            // Add Additional initialization code here...

            // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS
        }
Beispiel #5
0
        /// <summary>
        /// Allows the class to be copied
        /// </summary>
        /// <remarks>
        /// Performs a 'deep copy' of all the data in the class (and its children)
        /// </remarks>
        public override object Clone()
        {
            DESADV_XSDLib.TransportDetails newObject = new DESADV_XSDLib.TransportDetails(_elementName);
            foreach (DESADV_XSDLib.TransportDetails_Group o in m_TransportDetails_Group)
                newObject.m_TransportDetails_Group.Add((DESADV_XSDLib.TransportDetails_Group)o.Clone());

            // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

            // Add Additional clone code here...

            // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

            return newObject;
        }