Пример #1
0
        private void Facturacion_KeyDown(object sender, KeyEventArgs e)
        {
            // da igual mayúsculas que minúsculas
            switch (e.KeyCode)
            {
            case Keys.F9:
                grabar();
                break;

            case Keys.F7:
                RNC doForm = new RNC();
                if (doForm.ShowDialog() == DialogResult.OK)
                {
                    RNC.Text    = doForm.rn.Text.Trim();
                    RNC.Visible = true;
                    CONSUMIDOR_FINAL.Visible = true;
                    VALIDO.Visible           = true;
                    //txttipo.Visible = true;
                    //MessageBox.Show("paso por aqui");
                    CONSUMIDOR_FINAL.Text = doForm.nom.Text;
                    VALIDO.Text           = doForm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                    txttipo.Text          = "0";
                    txttipo.Text         += Convert.ToString(doForm.dataGridView1.CurrentRow.Cells[0].Value.ToString());
                    if (doForm.dataGridView1.CurrentRow.Cells[0].Value.ToString() == "14" || doForm.dataGridView1.CurrentRow.Cells[0].Value.ToString() == "15")
                    {
                        txttipo.Text = Convert.ToString(doForm.dataGridView1.CurrentRow.Cells[0].Value.ToString());
                    }
                    SendKeys.Send("{enter}");
                }
                break;
            }
        }
Пример #2
0
        private void Facturacion_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.KeyValue)
            {
            case (char)Keys.F9:
                Desglose obj = new Desglose();
                obj.Show();
                break;

            case (char)Keys.F7:
                RNC doForm = new RNC();
                if (doForm.ShowDialog() == DialogResult.OK)
                {
                    cliente.Text = doForm.rn.Text.Trim();
                    RNC.Visible  = true;

                    // NOMBREDE.Text = doForm.nom.Text;
                    //VALIDO.Text = doForm.rn.Text;
                    SendKeys.Send("{enter}");
                }
                break;

            case (char)Keys.F2:
                reimprimir();
                break;
            }
        }
Пример #3
0
        private void Facturacion_KeyPress(object sender, KeyPressEventArgs e)
        {
            switch (e.KeyChar)
            {
            case (char)Keys.F9:     // mayúsculas
                //cliente.Text += "\nTecla W en el formulario";
                Desglose obj = new Desglose();
                obj.Show();
                // textBox3.Text += "\r\nTecla W en el formulario (KeyPress)";
                break;

            case (char)Keys.F7:
                RNC obj2 = new RNC();
                obj2.Show();
                break;
            }
        }