schangxiang@126.com
2025-08-25 aa383c30e4f1053e97c6a33ccf9a899fca26dd20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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";
        }
    }
}