Esempio n. 1
0
        private void btnnuevoAlumno_Click( object sender, EventArgs e )
        {
            frm_Registers regAlum = new frm_Registers( this._data );

            this._openMain = false;

            regAlum.Show();

            this.Close();
        }
Esempio n. 2
0
        private void dgvSearch_CellDoubleClick( object sender, DataGridViewCellEventArgs e )
        {
            frm_Registers regAlum = new frm_Registers( this._data );

            regAlum.CodigoAlumno = Convert.ToInt32( this.dgvSearch.Rows[e.RowIndex].Cells[0].Value );
            regAlum.keyAlumno = this.dgvSearch.CurrentRow.Cells[1].Value.ToString();

            regAlum.ToActualize = true;

            this._openMain = false;
            regAlum.Show();

            this.Close();
        }
Esempio n. 3
0
        private void dgvSearch_CellDoubleClick( object sender, DataGridViewCellEventArgs e )
        {
            frm_Registers regAlum = new frm_Registers( this._data );

            regAlum.CodigoAlumno = Convert.ToInt32( this.dgvListado.CurrentRow.Cells[0].Value );
            regAlum.keyAlumno = this.dgvListado.CurrentRow.Cells[1].Value.ToString();

            regAlum.ToActualize = true;

            regAlum.Owner = this.ParentForm;
            regAlum.ShowDialog( this.ParentForm );

            this.Close();
        }
Esempio n. 4
0
        private void dgvSearch_KeyDown( object sender, KeyEventArgs e )
        {
            if ( e.KeyData == Keys.Delete )
            {
                int idAlumno		= Convert.ToInt32( dgvListado.CurrentRow.Cells[0].Value );
                string nombreAlumno = dgvListado.CurrentRow.Cells[2].Value.ToString();

                DialogResult question = MetroMessageBox.Show(
                            this,
                            "Realmente deseas eliminar Al Alumno: " + nombreAlumno + "?",
                            "Advertencia!",
                            MessageBoxButtons.YesNo,
                            MessageBoxIcon.Question
                );

                if ( question == DialogResult.Yes )
                {
                    if ( alumnos.DeleteStudent( idAlumno ) )
                        this.dgvListado.Rows.Remove( this.dgvListado.CurrentRow );
                }
            }
            else if ( e.KeyData == Keys.Enter )
            {
                frm_Registers regAlum = new frm_Registers( this._data );
                regAlum.CodigoAlumno = Convert.ToInt32( this.dgvListado.CurrentRow.Cells[0].Value );
                regAlum.ToActualize = true;

                this._openMain = false;

                regAlum.Show();
                this.Close();
            }
        }
Esempio n. 5
0
 private void datosGeneralesToolStripMenuItem_Click( object sender, EventArgs e )
 {
     Layouts.regAlumno.frm_Registers reg = new Layouts.regAlumno.frm_Registers( this._data );
     reg.Owner = this;
     reg.ShowDialog( this );
 }