Exemple #1
0
        private void txt_Importe_TextChanged(object sender, EventArgs e)
        {
            ClaseMultiusos cm = new ClaseMultiusos();

            if (txt_Importe.Text != "")
            {
                int saldo   = System.Convert.ToInt32(cm.ExtraerCodigo("saldo", "tbl_cuenta", "id_cuenta", txt_Cuenta.Text));
                int importe = System.Convert.ToInt32(txt_Importe.Text);
                int saldo_2 = System.Convert.ToInt32(cm.ExtraerCodigo("saldo", "tbl_cuenta", "id_cuenta", txt_CuentaOrg.Text));
                LogicaPagoAOrganizaciones loe = new LogicaPagoAOrganizaciones();
                if (saldo <= importe)
                {
                    verificacionImporte = false;
                }
                else
                {
                    verificacionImporte = true;
                    newSaldo            = loe.calculoDeNuevoSaldo_1(importe.ToString(), saldo.ToString());
                    newSaldo2           = loe.calculoDeNuevoSaldo_2(importe.ToString(), saldo_2.ToString());
                }
            }
            else if (txt_Importe.Text == "")
            {
                txt_Importe.Text = "0";
            }
            if (txt_Importe.Text == "0")
            {
                verificacionImporte = false;
            }
            else
            {
                verificacionImporte = true;
            }
            verificacionBotones();
        }
Exemple #2
0
 private void cbo_idCuenta_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbo_idCuenta.Text != "" && cbo_idCuenta.Text != "System.Data.DataRowView")
     {
         string[] datos = new string[5];
         LogicaPagoAOrganizaciones lgp = new LogicaPagoAOrganizaciones();
         datos               = lgp.cargarTxt_1(cbo_idCuenta.Text);
         txt_numero.Text     = datos[1];
         txt_tipo.Text       = datos[2];
         txt_moneda.Text     = datos[3];
         btn_aceptar.Enabled = true;
     }
     else if (cbo_idCuenta.Text == "")
     {
         txt_numero.Text     = "";
         txt_tipo.Text       = "";
         txt_moneda.Text     = "";
         btn_aceptar.Enabled = false;
     }
 }