Esempio n. 1
0
 /// <summary>
 /// Checks that the box isn't empty or null, then tries to convert its content to Double-type and sets the cotizacion of Peso, Otherwise sets the cotization in 1.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtBoxPeso_MouseLeave(object sender, EventArgs e)
 {
     if (!String.IsNullOrWhiteSpace(txtBoxPeso.Text) && Double.TryParse(txtBoxPeso.Text, out double equivalentPeso))
     {
         Peso.SetCotizacion(equivalentPeso);
     }
     else
     {
         txtBoxPeso.Focus();
         MessageError("Monto en Pesos Invalido", "Error");
     }
 }
Esempio n. 2
0
        private void txtCotizacionPesos_Leave(object sender, EventArgs e)
        {
            double cotiz;

            if (double.TryParse(txtCotizPesos.Text, out cotiz))
            {
                Peso.SetCotizacion(cotiz);
            }
            else
            {
                txtCotizPesos.Focus();
            }
        }
Esempio n. 3
0
        private void txtCorizacionPeso_Leave(object sender, EventArgs e)
        {
            double aux;

            if (double.TryParse(txtCotizacionPeso.Text, out aux))
            {
                Peso.SetCotizacion(aux);
            }
            else
            {
                txtCotizacionPeso.Focus();
            }
        }
Esempio n. 4
0
        private void txtCotizacionPeso_leave(object sender, EventArgs e)
        {
            double aux;

            if (double.TryParse(txtCotizacionPeso.Text, out aux))
            {
                Peso.SetCotizacion(aux);
            }
            else
            {
                MessageBox.Show("Ingrese datos Validos!");
                txtCotizacionPeso.Focus();
            }
        }
Esempio n. 5
0
        private void btnCandado_Click(object sender, EventArgs e)
        {
            if (btnCandado.ImageIndex == 1)
            {
                btnCandado.ImageIndex = 0;
                Peso.SetCotizacion((double.Parse)(txtCotizacionPeso.Text));
                Euro.SetCotizacion((double.Parse)(txtCotizacionEuro.Text));
                Dolar.SetCotizacion((double.Parse)(txtCotizacionDolar.Text));
                txtCotizacionEuro.Enabled  = false;
                txtCotizacionDolar.Enabled = false;
                txtCotizacionPeso.Enabled  = false;
            }
            else
            {
                btnCandado.ImageIndex      = 1;
                txtCotizacionEuro.Enabled  = true;
                txtCotizacionDolar.Enabled = true;
                txtCotizacionPeso.Enabled  = true;
            }

            ;
        }