private void Modifcar()
 {
     if (Estado == 1)
     {
         if (oHorario != null)
         {
             TabGeneral.SelectTab(tabRegistro);
             setHorario(3);
         }
     }
 }
        private void Nuevo()
        {
            if (Estado == 1)
            {
                oHorario = new HorarioBE();
                Limpiar();

                TabGeneral.SelectTab(tabRegistro);
                setHorario(2);
            }
        }
 private void dataGridView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (Estado == 1 && dgvHorarios.CurrentRow != null)
         {
             CargarHorario((int)(dgvHorarios.CurrentRow.Cells[gcIdHorario.Index].Value));
             TabGeneral.SelectTab(tabRegistro);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("No se pudo cargar los datos correctamente." + Environment.NewLine + ex.ToString(), "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }