/// <summary> /// El programa se ejecuta en dos modos: automático y manual, el parametro de configuración se encuentra en el archivo CONFIGURACION.xml /// </summary> private void FrmRegistro_Load(object sender, EventArgs e) { try { Logger.Info("Se inició programa MRS"); if (!Extensor.CargarConfiguraciones()) { Application.Exit(); } cargarConfiguracionApp(); if (Extensor.Configuracion.CONEXION_SAP.EjecucionAutomatica == "Y") { btnConsultar.PerformClick(); btnRegistrar.PerformClick(); Application.Exit(); } } catch (Exception ex) { Logger.Error("Error al cargar configuraciones: {0}", ex.Message); } }
private void FrmActivaciones_Load(object sender, EventArgs e) { try { if (!Extensor.CargarConfiguraciones()) { Application.Exit(); } else { ObtenerDatosConfig(); CargarMunicipios(); grpDatosAfiliado.Enabled = false; //ConectarAddon(); } } catch (Exception ex) { MessageBox.Show("Error Activaciones: " + ex.Message, "Activaciones SAP", MessageBoxButtons.OK, MessageBoxIcon.Error); } }