コード例 #1
0
        private void btnAgregarSocio_Click(object sender, EventArgs e)
        {
            FormMantenimientoSocioDeportivo form = new FormMantenimientoSocioDeportivo();

            form.ShowDialog();
            ListarSociosDeportivos();
        }
コード例 #2
0
        private void btnAgregarSocDep_Click(object sender, EventArgs e)
        {
            if (tablaSocio.SelectedRows.Count > 0)
            {
                DateTime fechanac;
                DateTime.TryParse(tablaSocio.CurrentRow.Cells[6].Value.ToString(), out fechanac);
                FormMantenimientoSocioDeportivo form = new FormMantenimientoSocioDeportivo();
                form.invalidarTextbox();
                form.txtBoxIdSocio.Text       = tablaSocio.CurrentRow.Cells[0].Value.ToString();
                form.txtBoxNombre.Text        = tablaSocio.CurrentRow.Cells[2].Value.ToString();
                form.txtBoxApellido.Text      = tablaSocio.CurrentRow.Cells[3].Value.ToString();
                form.comboBoxSexo.Text        = tablaSocio.CurrentRow.Cells[4].Value.ToString();
                form.txtBoxDni.Text           = tablaSocio.CurrentRow.Cells[5].Value.ToString();
                form.datePickerFechaNac.Value = fechanac;
                form.txtBoxNacionalidad.Text  = tablaSocio.CurrentRow.Cells[7].Value.ToString();
                form.comboBoxEstcivil.Text    = tablaSocio.CurrentRow.Cells[8].Value.ToString();
                form.txtBoxDireccion.Text     = tablaSocio.CurrentRow.Cells[9].Value.ToString();
                form.txtBoxTelefono.Text      = tablaSocio.CurrentRow.Cells[10].Value.ToString();
                form.txtBoxEmail.Text         = tablaSocio.CurrentRow.Cells[11].Value.ToString();
                form.comboBoxPago.Text        = tablaSocio.CurrentRow.Cells[12].Value.ToString();

                form.ShowDialog();
            }
        }