Beispiel #1
0
        private void btnEnviar_Click(object sender, EventArgs e)
        {
            btnEnviar.Enabled   = false;
            txbXmlRecibido.Text = string.Empty;

            #region Definicion del bloque de seguridad
            string       usuario   = string.Empty;
            string       password  = string.Empty;
            string       usuEmail  = string.Empty;
            string       passEmail = string.Empty;
            string       ambiente  = string.Empty;
            SecurityPrvt security  = new SecurityPrvt();
            try
            {
                usuario = security.Decode("fmontoya");
            }
            catch (System.Exception)
            {
                usuario = security.Decode("usuario");
            }
            try
            {
                password = security.Decode("f935cjm9262");
            }
            catch (System.Exception)
            {
                password = security.Decode("password");
            }
            try
            {
                usuEmail = security.Decode("robotcorreo");
            }
            catch (System.Exception)
            {
                usuEmail = security.Decode("usuEmail");
            }
            try
            {
                passEmail = security.Decode("Tys860504882");
            }
            catch (System.Exception)
            {
                passEmail = security.Decode("passEmail");
            }
            try
            {
                ambiente = security.Decode("produccion");
            }
            catch (System.Exception)
            {
                ambiente = security.Decode("desarrollo");
            }
            #endregion fin de la Definicion del bloque de seguridad

            _xml_envio = txbXmlEnviado.Text;
            LogicaWfEnvioUnitario logica = new LogicaWfEnvioUnitario(usuario, password, usuEmail, passEmail, ambiente);

            _xml_recibido = logica.enviarMinisterio(_xml_envio);

            if (_xml_recibido.Length > 10)
            {
                txbXmlRecibido.Text = _xml_recibido;
                actualizar();
                consultar(_llave, false);
            }
            else
            {
                txbXmlRecibido.Text = "No se obtuvo respuesta por parte del servidor del ministerio.";
            }
            btnEnviar.Enabled = true;
            //logica.procesarEnvioMinisterio(_funcion, txbXmlEnviado.Text, xml_recibido, pLogReporteMinisterio);
        }