예제 #1
0
        public void Add()
        {
            // Web Service of the Entity to be used
            Sync.WMS.WMSDataImportWS.DocRequest wsEntity = new DocRequest();

            //Required Fields
            wsEntity.DocSeries     = "VGR";
            wsEntity.DocNum        = 52;
            wsEntity.WarehouseCode = "A1";
            wsEntity.ERPCompany    = "DEMOWMS510";
            wsEntity.EntityCode    = "0280";

            //This field is essential. Eye Peak wil search for the document by the following fields
            wsEntity.ERPDocID = wsEntity.DocSeries + wsEntity.DocNum.ToString();

            //Linhas do documento
            DocDetail[] docLines = new DocDetail[1];
            docLines[0]                = new WMSDataImportWS.DocDetail();
            docLines[0].SKU            = "2000000027";
            docLines[0].Qty            = 10;
            docLines[0].DocLineNum     = 1;
            docLines[0].Warehouse      = "A1";
            docLines[0].ERPProductCode = "ERPProductCode";

            docLines[0].PreparationDate = DateTime.Now;
            docLines[0].ContainerQty    = 1;

            //Set the lines to the document
            wsEntity.DocLines = docLines;

            //Saving
            object result;

            result = m_WSClient.SaveDoc(wsEntity);
        }
예제 #2
0
        public void Change()
        {
            // Web Service of the Entity to be used
            Sync.WMS.WMSDataImportWS.DocRequest wsEntity = new DocRequest();

            //This field is essential. Eye Peak wil search for the document by the following fields
            wsEntity.ERPDocID   = "VGT/2018" + "70";
            wsEntity.ERPCompany = "DEMOWMS510";

            //Required Fields
            wsEntity.DocSeries     = "VGT/2018";
            wsEntity.DocNum        = 70;
            wsEntity.WarehouseCode = "A1";
            wsEntity.ERPCompany    = "DEMOWMS";
            wsEntity.EntityCode    = "F0001";
            wsEntity.Active        = true;

            //Documetn Lines
            DocDetail[] docLines = new DocDetail[1];
            docLines[0]            = new WMSDataImportWS.DocDetail();
            docLines[0].SKU        = "A0001";
            docLines[0].Qty        = 20;
            docLines[0].DocLineNum = 1;
            docLines[0].Warehouse  = "A1";

            docLines[0].PreparationDate = DateTime.Now;
            docLines[0].ContainerQty    = 1;

            //This field is essential. Eye Peak will search the lines by this field
            docLines[0].ERPDocDetailID = wsEntity.ERPDocID + "1";

            //Set the lines to the document
            wsEntity.DocLines = docLines;

            //Saving
            object result;

            result = m_WSClient.SaveDoc(wsEntity);
        }