protected void btnSend_Click(object sender, EventArgs e) { PurchaseOrderXMLReader xmlReader = new PurchaseOrderXMLReader(); String purchaseOrder = xmlReader.getXmlFile(ddlPurchaseOrder.SelectedValue); PurchseOrderXMLManager xmlManager = new PurchseOrderXMLManager(purchaseOrder, ddlPurchaseOrder.SelectedValue); xmlManager.sendPurchaseOrderToSupplier(); xmlManager.moveXMLDocToArchive(); loadDdlPurchasOrder(); getXmlData(ddlPurchaseOrder.SelectedValue); lblMsg.Text = "Message sent and purchase order moved to archive directory."; }
private void getXmlData(String xmlFile) { PurchaseOrderXMLReader xmlReader = new PurchaseOrderXMLReader(); if (xmlFile != null || xmlFile != "") { XmlDataSource1.DataFile = xmlReader.getXmlFile(xmlFile); XmlDocument doc = XmlDataSource1.GetXmlDocument(); XmlNodeList manufacturerName = doc.GetElementsByTagName("name"); lblCompanyName.Text = manufacturerName[0].InnerXml; XmlDataSource1.XPath = "/PurchaseOrder/items/PurchaseOrderItem"; XmlDataSource1.DataBind(); } }