Beispiel #1
0
 private void habilitarBotones()
 {
     if (hayContext)
     {
         BT_Nueva.Enabled = false;
         BT_NuevaConCondiciones.Enabled = false;
         BT_Editar.Enabled         = false;
         BT_Ver.Enabled            = false;
         BT_Duplicar.Enabled       = false;
         BT_Eliminar.Enabled       = false;
         BT_AplicarAUnPlan.Enabled = true;
         BT_CompararPlanes.Enabled = true;
         BT_AplicarPorLote.Enabled = false;
     }
     else
     {
         BT_CompararPlanes.Enabled = false;
         Metodos.habilitarBoton(editaPlantilla, BT_Nueva);
         Metodos.habilitarBoton(editaPlantilla, BT_NuevaConCondiciones);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count == 1 && editaPlantilla, BT_Editar);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count == 1 && editaPlantilla, BT_Duplicar);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count == 1, BT_Ver);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count > 0 && editaPlantilla, BT_Eliminar);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count == 1 && !((Plantilla)LB_Plantillas.SelectedItems[0]).esParaExtraccion, BT_AplicarAUnPlan);
         Metodos.habilitarBoton(LB_Plantillas.SelectedItems.Count == 1, BT_AplicarPorLote);
         Metodos.habilitarBoton(editaPlantilla, BT_Configuracion);
     }
 }
Beispiel #2
0
 private void actualizarBotones(object sender, EventArgs e)
 {
     Metodos.habilitarBoton(LB_listaRestricciones.SelectedItems.Count > 0, BT_EliminarRestriccion);
     Metodos.habilitarBoton(LB_listaRestricciones.SelectedItems.Count == 1, BT_EditarRestriccion);
     Metodos.habilitarBoton(estaParaGrabarRestriccion(), BT_AgregarALista);
     Metodos.habilitarBoton(!string.IsNullOrEmpty(TB_NombrePlantilla.Text) && LB_listaRestricciones.Items.Count > 0, BT_GuardarPlantilla);
     Metodos.habilitarBoton(LB_listaRestricciones.SelectedItems.Count == 1 && LB_listaRestricciones.SelectedIndex != 0, BT_RestriccionArriba);
     Metodos.habilitarBoton(LB_listaRestricciones.SelectedItems.Count == 1 && LB_listaRestricciones.SelectedIndex != LB_listaRestricciones.Items.Count - 1, BT_RestriccionAbajo);
 }
Beispiel #3
0
 private void DGV_Análisis_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
 {
     BT_GuardarPaciente.Enabled = true;
     Metodos.habilitarBoton(DGV_Análisis.ColumnCount > 1, BT_Exportar);
 }
Beispiel #4
0
 private void DGV_Estructuras_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     Metodos.habilitarBoton(LB_Planes.SelectedItems.Count == 1 && DGV_Estructuras.RowCount > 0, BT_Analizar);
 }
Beispiel #5
0
 private void LB_Planes_SelectedIndexChanged(object sender, EventArgs e)
 {
     Metodos.habilitarBoton(LB_Planes.SelectedItems.Count == 1, BT_SeleccionarPlan);
 }
Beispiel #6
0
 private void TB_ID_TextChanged(object sender, EventArgs e)
 {
     Metodos.habilitarBoton(!string.IsNullOrEmpty(TB_ID.Text), BT_AbrirPaciente);
 }
Beispiel #7
0
 private void DGV_Análisis_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     Metodos.habilitarBoton(DGV_Análisis.Rows.Count > 0, BT_GuardarReporte);
     Metodos.habilitarBoton(DGV_Análisis.Rows.Count > 0, BT_Imprimir);
 }
Beispiel #8
0
 private void TB_Llenar_TextChanged(object sender, EventArgs e)
 {
     Metodos.habilitarBoton(!string.IsNullOrEmpty(TB_Llenar.Text), BT_Aceptar);
 }