public bool Call_X3WS(X3WSUtils.TipoImport tipo, string nomeFile) { /* * Language CODE ITA * Pool alias WSSAUROTEST * Public Name YIMP_CYBER * * XML: * <PARAM> * <FLD NAME="TIPO">OPR</FLD> * <FLD NAME="IMPFILE">OPR_task471_191114_042559.TXT</FLD> * </PARAM> */ _logger.Debug(this.GetType().Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + " tipo=" + tipo.ToString() + " nomefile=" + nomeFile + " start..."); CAdxResultXml XMLresult = new CAdxResultXml(); List <string[]> KeyValue = new List <string[]>(); KeyValue.Add(new string[2] { "TIPO", ((int)tipo).ToString() }); KeyValue.Add(new string[2] { "IMPFILE", nomeFile }); //KeyValue.Add(new string[2] { "TIMESTAMP", timestamp }); //KeyValue.Add(new string[2] { "MSGERR", "000"}); /* * <PARAM> * <FLD NAME="IMPFILE">opr_aaaaa.txt</FLD> * <FLD NAME="TIMESTAMP">20000909</FLD> * --<FLD NAME="MSGERR">””</FLD> * </PARAM> */ string XMLRequest = X3WSUtils.XMLBuildReq("PARAM", "FLD", KeyValue); _logger.Debug(this.GetType().Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + " X3webservice pubName:" + X3WSUtils.X3WS_PublicName_ImportSubProgram + "XMlrequest=" + XMLRequest + " start..."); XMLresult = RunSubprog(X3WSUtils.X3WS_PublicName_ImportSubProgram, XMLRequest); //status //1 chiamata eseguita int _chk = XMLresult.status; if (XMLresult.status == 0) { //cause possibili sperimentate finora //- non esiste chiamata //- modello import non esistente //- errori nel codice (tipo incompatibile) _logger.Error("XMLresult.status=0, controllare log"); } else { _logger.Info("XMLresult.status=" + XMLresult.status + " [0=errore, 1 ok]"); } //trascrivo sul file di log i messaggi di log (ECR_TRACE from GESECRAN) impostati sul sorgente YIMPOPR if (XMLresult.messages != null && XMLresult.messages.Length > 0) { foreach (var msg in XMLresult.messages) { _logger.Info("WS message: " + msg.message); } } string QryResponse = XMLresult.resultXml; //Dal flusso di ritorno estrapolo le info che mi servono // ...... GetOrdNum_ByRifOrdCli(SoapQryResponse, "FLD", "NRORD"); string MSGERR = X3WSUtils.GetStringValueFromXML(QryResponse, "FLD", "MSGERR"); _logger.Debug(this.GetType().Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + " ending"); if (MSGERR == "Imported") { return(true); } else { return(false); } }
//protected string DEM_C_ORDER_CODE; //protected string DEM_C_CORDER_CODE; //protected string DEM_C_ITEM_CODE; //protected string DEM_C_ITEM_PLANT; //protected int DEM_C_OPNUM; //protected int DEM_C_NSEQ; //protected int DEM_task_number; //protected decimal DEM_C_QTY; //protected decimal DEM_C_WDW_QTY; //protected string DEM_C_MRP_TYPE; //protected int DEM_C_STATUS; //protected string DEM_C_REF_CORDER_CODE; //protected DateTime? DEM_C_DUEDATE; public ExpOrder(string file_prefix, X3WSUtils.TipoImport tipo) : base(file_prefix, tipo) { }
public bool ImportFile(X3WSUtils.TipoImport tipo, string nomeFile) { return(Call_X3WS(tipo, nomeFile)); }
public ExportItem(string file_prefix, X3WSUtils.TipoImport tipo) { _file_prefix = file_prefix; Tipo = tipo; _db = DBHelper2.getCyberDBHelper(); }