private void button1_Click(object sender, EventArgs e)
        {
            Clientes cli = new Clientes();

            cli.ShowDialog();

            if (cli.DialogResult == DialogResult.OK)
            {
                txtcliente.Text   = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[1].Value.ToString();
                txtRNC.Text       = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[2].Value.ToString();
                txtdireccion.Text = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[3].Value.ToString();
                txttelefono.Text  = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[4].Value.ToString();
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Clientes cli = new Clientes();

            cli.ShowDialog();

            if (cli.DialogResult == DialogResult.OK)
            {
                try
                {
                    txtcliente.Text   = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[1].Value.ToString();
                    txtRNC.Text       = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[2].Value.ToString();
                    txtdireccion.Text = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[3].Value.ToString();
                    txttelefono.Text  = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[4].Value.ToString();
                }
                catch (Exception lope)
                {
                    MessageBox.Show("Algo Va Mal..." + lope);
                }
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Clientes cli = new Clientes();

            cli.ShowDialog();

            if (cli.DialogResult == DialogResult.OK)
            {
                try
                {
                    txtid.Text     = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[0].Value.ToString();
                    txtnombre.Text = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[1].Value.ToString();
                    txtrnc.Text    = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[2].Value.ToString();
                    txtdirecc.Text = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[3].Value.ToString();
                    txttel.Text    = cli.dgv.Rows[cli.dgv.CurrentRow.Index].Cells[4].Value.ToString();
                }

                catch (Exception llll)
                {
                    MessageBox.Show("Algo va Mal..." + llll);
                }
            }
        }
Exemplo n.º 4
0
        //Llama ventana clientes
        private void button1_Click(object sender, EventArgs e)
        {
            Clientes clientes = new Clientes();

            clientes.ShowDialog();
        }