Exemple #1
0
        static void Main(string[] args)
        {
            InventoryRequest request = GenerateHeader();

            BuildLine(request, "00030291053409", "1");
            ImWrapper     imWrapper = new ImWrapper();
            string        message;
            XmlSerializer x = new XmlSerializer(request.GetType());

            using (StringWriter textWriter = new StringWriter())
            {
                x.Serialize(textWriter, request);
                message = textWriter.ToString();
            }
            imWrapper.Execute(message);
        }
Exemple #2
0
        public void SendToInventory(object obj)
        {
            InventoryMessage inventoryMessage = (InventoryMessage)obj;
            InventoryRequest request          = GenerateHeader(inventoryMessage.BusinessUnit);

            BuildLine(request, inventoryMessage.ProductId, inventoryMessage.Inventoy);
            ImWrapper     imWrapper = new ImWrapper();
            string        message;
            XmlSerializer x = new XmlSerializer(request.GetType());

            using (StringWriter textWriter = new StringWriter())
            {
                x.Serialize(textWriter, request);
                message = textWriter.ToString();
            }
            imWrapper.Execute(message);
        }