Exemple #1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            EdicionLector frm = new EdicionLector();

            frm.ShowDialog();
            CargarDatos();
        }
Exemple #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            EdicionLector frm = new EdicionLector(true);

            frm.txtIDLector.Text       = dtgRegistros.CurrentRow.Cells["IDLector"].Value.ToString();
            frm.txtUsuario.Text        = dtgRegistros.CurrentRow.Cells["Usuario"].Value.ToString();
            frm.txtNombres.Text        = dtgRegistros.CurrentRow.Cells["Nombres"].Value.ToString();
            frm.txtApellidos.Text      = dtgRegistros.CurrentRow.Cells["Apellidos"].Value.ToString();
            frm.dtFecha.Text           = dtgRegistros.CurrentRow.Cells["FechaNacimiento"].Value.ToString();
            frm.cmbGenero.SelectedItem = dtgRegistros.CurrentRow.Cells["Genero"].Value.ToString();
            frm.dtpFechaInicio.Text    = dtgRegistros.CurrentRow.Cells["Fecha_Inicio"].Value.ToString();
            frm.txtMaxPrestamo.Text    = dtgRegistros.CurrentRow.Cells["MaxPrestamo"].Value.ToString();
            frm.txtMaxTiempo.Text      = dtgRegistros.CurrentRow.Cells["MaxTiempoPrestamo"].Value.ToString();
            frm.txtCredibilidad.Text   = dtgRegistros.CurrentRow.Cells["Credibilidad"].Value.ToString();

            DataGridViewRow row  = dtgRegistros.CurrentRow;
            DataRowView     rows = row.DataBoundItem as DataRowView;

            frm.pbxFoto.Image = Functions.Class1.ByteArrayToImage((byte[])rows["Foto"]);
            frm.ShowDialog();
            CargarDatos();
        }