Пример #1
0
 private void btCancelar_Click(object sender, EventArgs e)
 {
     if (xComprobantes != null)
     {
         xComprobantes.TangoLogoff();
         xComprobantes = null;
     }
     Close();
 }
Пример #2
0
        /// <summary>
        /// Autentica en Tango
        /// Crea xComprobantes si no existe
        /// </summary>
        private void logueoATango()
        {
            if (xComprobantes == null)
            {
                xComprobantes = new xTangoComprobantes();
            }
            ;

            if (xComprobantes.tangoLogOn != null)
            {
                xComprobantes.TangoLogoff();
                changeStates();
            }
            try {
                xComprobantes.TangoLogin(TxtKeyNumber.Text, TxtUser.Text, TxtPswd.Text, TxtCompany.Text);
                changeStates();
            }
            catch (XTangoException ex) {
                MessageBox.Show("Ocurrio el error: " + ex.Message, "Facturacion",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }