Пример #1
0
 private void CMBDOC_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         TXTNUMERO.Focus();
     }
 }
Пример #2
0
 private void ArmazenarNumero()
 {
     try
     {
         numero = Convert.ToInt32(TXTNUMERO.Text);
     }
     catch
     {
         MessageBox.Show("Você pode apenas digitar números reais neste campo, tente novamente");
         TXTNUMERO.Focus();
         return;
     }
 }
Пример #3
0
        private void ArmazenarInformacao()
        {
            try
            {
                numero = Convert.ToInt32(TXTNUMERO.Text);
            }

            catch
            {
                MessageBox.Show("Digite um número real");
                TXTNUMERO.Focus();
                return;
            }
        }
Пример #4
0
        void AGREGAR()
        {
            char documento;

            if (CMBDOC.SelectedIndex == 0)
            {
                documento = 'F';
            }
            else if (CMBDOC.SelectedIndex == 1)
            {
                documento = 'B';
            }
            else if (CMBDOC.SelectedIndex == 2)
            {
                documento = 'R';
            }
            else
            {
                documento = 'T';
            }
            String msje = cj.Registrar_det_cajas(Convert.ToInt32(cmbprov.SelectedValue), Convert.ToInt32(LBLCODIGO.Text), TXTDESCRIPCION.Text,
                                                 documento, Convert.ToDecimal(TXTMONTO.Text), TXTNUMERO.Text);

            MessageBox.Show(this, msje, VariablesGlobales.Titulo, MessageBoxButtons.OK, MessageBoxIcon.Information);
            DGVDATA.DataSource = cj.Devolver_detalle_cajas_id(Convert.ToInt32(LBLCODIGO.Text));
            if (msje == "DETALLE REGISTRADO")
            {
                TXTMONTO.Clear();
                TXTDESCRIPCION.Clear();
                TXTNUMERO.Clear();
                CMBDOC.SelectedIndex  = 0;
                cmbprov.SelectedIndex = 0;
                checkBox1.Checked     = false;
                CONTAR_REGISTROS();
            }
        }