using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Xml;
|
|
namespace iWareWebservice.AppDao
|
{
|
public class StockTransferDAO
|
{
|
private static object Lock = new object();
|
|
private static StockTransferDAO Instance = null;
|
|
/// <summary>
|
/// 获取单例的方法
|
/// </summary>
|
/// <returns>单例实体</returns>
|
public static StockTransferDAO GetInstance()
|
{
|
if (Instance == null)
|
{
|
lock (Lock)
|
{
|
if (Instance == null)
|
{
|
Instance = new StockTransferDAO();
|
}
|
}
|
}
|
return Instance;
|
}
|
|
public string RequestSend(string XMLParameters)
|
{
|
try
|
{
|
XmlDocument xml = new XmlDocument();
|
xml.LoadXml(XMLParameters);
|
XmlNode actionNode = xml.SelectSingleNode("/root/Action");
|
if (actionNode.InnerText == "StockTransferRequestItem.Send")
|
{
|
XmlNode dataNode = xml.SelectSingleNode("/root/Data/StockTransferRequestItems");
|
foreach (XmlNode strItemNode in dataNode.ChildNodes)
|
{
|
string strNo = strItemNode.Attributes["StockTransferRequestNo"].Value;
|
string strItemNo = strItemNode.Attributes["StockTransferRequestItemNo"].Value;
|
string sequenceNo = strItemNode.Attributes["SequenceNo"].Value;
|
string materialNo = strItemNode.Attributes["MaterialNo"].Value;
|
string quantity = strItemNode.Attributes["Quantity"].Value;
|
|
XmlNode strItemSubNode = strItemNode.ChildNodes[0];
|
string profileType = strItemSubNode.Attributes["ProfileType"].Value;
|
}
|
}
|
}
|
catch (Exception)
|
{
|
}
|
return "Hello World";
|
}
|
}
|
}
|