示例#1
0
 private void btnRegistro_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <RegistrarRetiroAnticipado>().Count() == 0)
     {
         RegistrarRetiroAnticipado abrir = new RegistrarRetiroAnticipado();
         abrir.cmbCurso.SelectedValue = cmbCurso.SelectedValue;
         abrir.txtCiclo.Text          = txtCiclo.Text;
         abrir.dtpFecha.Text          = dtpFecha.Text;
         abrir.txtHora.Text           = txtHora.Text;
         abrir.Show();
     }
     else
     {
         Application.OpenForms["RegistrarRetiroAnticipado"].BringToFront();
     }
 }
示例#2
0
        private void btnRegistro_Click(object sender, EventArgs e)
        {
            if (cmbConput.Text == "")
            {
                Error.SetError(cmbConput, "Ingrese un tipo de retiro anticipado");
                cmbConput.Focus();
                return;
            }
            Error.SetError(cmbConput, "");
            if (!txtHora.MaskCompleted)
            {
                Error.SetError(txtHora, "Ingrese un horario de retiro");
                txtHora.Focus();
                return;
            }
            Error.SetError(txtHora, "");
            if (dtgListado.SelectedRows.Count == 0)
            {
                Error.SetError(dtgListado, "Seleccione un alumno");
                dtgListado.Focus();
                return;
            }
            Error.SetError(dtgListado, "");
            if (Application.OpenForms.OfType <RegistrarRetiroAnticipado>().Count() == 0)
            {
                RegistrarRetiroAnticipado abrir = new RegistrarRetiroAnticipado();
                DataGridViewRow           datos = dtgListado.CurrentRow;
                abrir.txtId.Text             = datos.Cells["idAlumno"].Value.ToString();
                abrir.txtNombre.Text         = datos.Cells["nombre"].Value.ToString();
                abrir.txtNombre.Enabled      = false;
                abrir.txtApellido.Text       = datos.Cells["apellido"].Value.ToString();
                abrir.txtApellido.Enabled    = false;
                abrir.txtDocument.Text       = datos.Cells["idSeguimiento"].Value.ToString();
                abrir.cmbCurso.SelectedValue = cmbCurso.SelectedValue;
                abrir.cmbCurso.Enabled       = false;
                abrir.txtHora.Text           = txtHora.Text;

                abrir.Show();
            }
            else
            {
                Application.OpenForms["RegistrarRetiroAnticipado"].BringToFront();
            }
        }
示例#3
0
 private void btn_registrarretirosantes_Click(object sender, EventArgs e)
 {
     if (System.Windows.Forms.Application.OpenForms.OfType <RegistrarRetiroAnticipado>().Count() == 0)
     {
         RegistrarRetiroAnticipado abrir = new RegistrarRetiroAnticipado();
         DataGridViewRow           datos = dgvLis.CurrentRow;
         abrir.txtId.Text       = datos.Cells["Id"].Value.ToString();
         abrir.txtNombre.Text   = datos.Cells["Nombre"].Value.ToString();
         abrir.txtApellido.Text = datos.Cells["Apellido"].Value.ToString();
         abrir.txtDocument.Text = datos.Cells["Documento"].Value.ToString();
         //abrir.txtCiclo.Text = datos.Cells["Ciclo"].Value.ToString();
         abrir.cmbCurso.Text = datos.Cells["Cursos"].Value.ToString();
         abrir.Show();
     }
     else
     {
         System.Windows.Forms.Application.OpenForms["RegistrarRetiroAnticipado"].BringToFront();
     }
 }