Example #1
0
        public string SendInformationWS(string xml, string cia)
        {
            try
            {
                string xmlSend;
                wsSIESA.WSUNOEESoap ws = new wsSIESA.WSUNOEESoapClient(wsSIESA.WSUNOEESoapClient.EndpointConfiguration.WSUNOEESoap);

                wsSIESA.ImportarXMLRequest request = new wsSIESA.ImportarXMLRequest();


                xmlSend  = "<Importar>";
                xmlSend += "<NombreConexion>UnoEE</NombreConexion>";
                xmlSend += $"<IdCia>{cia}</IdCia>";
                xmlSend += "<Usuario>easy.sales</Usuario>";
                xmlSend += "<Clave>34s12020</Clave>";
                xmlSend += "<Datos>";
                xmlSend += xml;
                xmlSend += "</Datos>";
                xmlSend += "</Importar>";

                request.printTipoError = 0;
                request.pvstrDatos     = xmlSend;


                var result = ws.ImportarXMLAsync(request).Result;

                if (result.printTipoError == 0)
                {
                    return("Importacion Exitosa");
                }
                else
                {
                    return(result.ImportarXMLResult.Nodes[1].ToString());
                }
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Example #2
0
 public System.Threading.Tasks.Task <wsSIESA.ImportarXMLResponse> ImportarXMLAsync(wsSIESA.ImportarXMLRequest request)
 {
     return(base.Channel.ImportarXMLAsync(request));
 }