Exemplo n.º 1
0
 private void TXTDESCRIPCION_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         TXTMONTO.Focus();
     }
 }
Exemplo n.º 2
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();
            }
        }