예제 #1
0
 public void DevuelveParametros(ref Boolean blR_AceptoInfo, ref ClasX_DBInfo Obj_BaseDeDatos)
 {
     // Devuelve los parametros
     try
     {
         //
         blR_AceptoInfo = blPr_AceptoInformacion;
         // Devuelve el objeto con la informacion de la base de datos.
         Obj_BaseDeDatos = ObjPr_InfoBD;
         //
     }
     catch (System.AccessViolationException ex_0)
     {
         ///////////////////////////////////////////////////////////////
         // Manejo de log
         ///////////////////////////////////////////////////////////////
         ClasX_EventLog objL_Log = new ClasX_EventLog(stPr_UsuarioAPP, stPr_ArchivoLog, false, true, true);
         //
         objL_Log.outMensajError("StrailSAS_C_ProgReg.Dll", "FrmInfoBdFenix", "DevuelveParametros. System.AccessViolationException", "", ex_0.Message.ToString(), "", "");
         ///////////////////////////////////////////////////////////////
         // Fin Manejo de log
         ///////////////////////////////////////////////////////////////
     }
     catch (Exception ex)
     {
         ///////////////////////////////////////////////////////////////
         // Manejo de log
         ///////////////////////////////////////////////////////////////
         ClasX_EventLog objL_Log = new ClasX_EventLog(stPr_UsuarioAPP, stPr_ArchivoLog, false, true, true);
         //
         objL_Log.outMensajError("StrailSAS_C_ProgReg.Dll", "FrmInfoBdFenix", "DevuelveParametros", "", ex.Message.ToString(), "", "");
         ///////////////////////////////////////////////////////////////
         // Fin Manejo de log
         ///////////////////////////////////////////////////////////////
     }
 }
예제 #2
0
        public void TomaParametros(String st_Titulo, String st_UsuarioAPP, String st_ArchivoLog, String st_ArchivoConfigApp, String st_Nombre_App, String st_Version, String st_NombreEmpresa, String st_Archivo_InfoBds, String st_NombreBd_XTrabajo, ref ClasX_DBInfo Obj_BaseDeDatos)
        {
            // Toma los parametros.
            String stL_Aux = "";

            try
            {
                // Guarda textos originales.
                stPr_Servidor_Ori = cmbServidores.Text;
                stPr_Bd_Ori       = TxtBD.Text;
                stPr_Usuario_Ori  = TxtUsuario.Text;
                stPr_Clave_Ori    = TxtClave.Text;
                //
                LblMensaje.Text = "";
                //
                this.Text             = st_Titulo;
                stPr_UsuarioAPP       = st_UsuarioAPP;
                stPr_ArchivoLog       = st_ArchivoLog;
                stPr_ArchivoConfigApp = st_ArchivoConfigApp;
                stPr_Archivo_InfoBds  = st_Archivo_InfoBds;
                //
                stPr_NombreBd_XTrabajo = st_NombreBd_XTrabajo;
                //
                stPr_Nombre_App        = st_Nombre_App;
                stPr_Version_App       = st_Version;
                stPr_NombreEmpresa_App = st_NombreEmpresa;
                // Coloca aplicacion y version
                this.LblModuloVersion.Text = stPr_Nombre_App + " " + stPr_Version_App;
                this.LblNombreCia.Text     = stPr_NombreEmpresa_App;
                //
                // Crea instancia para la clase que maneja las configuraciones
                ObjPr_Conf = new ClasX_Config(stPr_ArchivoConfigApp, stPr_UsuarioAPP, stPr_ArchivoLog);
                //
                ObjPr_Utils = new ClasX_Utils(stPr_UsuarioAPP, stPr_ArchivoLog);
                // Lee el esquema de color
                stL_Aux = "";
                stL_Aux = ObjPr_Conf.LeeLlave_Seccion(ClasX_Constans.SECCION_ID_APP, "Color");
                if (stL_Aux.Length == 0)
                {
                    stL_Aux = "0";
                }
                PrIn_EsquemaColor = (ClasX_Constans.inEsquema_Colores)Convert.ToInt32(stL_Aux);
                //
                // La informacion de la base de datos para manejar la conexion con la base de datos.
                ObjPr_InfoBD = new ClasX_DBInfo();
                ObjPr_InfoBD = Obj_BaseDeDatos;
                /////////////////////////////////////////////////////////
                // Dependiendo de tipo de conenexion habilita los controles de la forma
                /////////////////////////////////////////////////////////
                CmdAceptar.Enabled = false;
                ObjPr_Utils.setColor_Boton_DesHabilitado(CmdAceptar, PrIn_EsquemaColor);
                //
                CmdProbar.Enabled = true;
                ObjPr_Utils.setColor_Boton_Habilitado(CmdProbar, PrIn_EsquemaColor);
                //
                if (st_NombreBd_XTrabajo.Length > 0)
                {
                    TxtBD.Text    = st_NombreBd_XTrabajo;
                    TxtBD.Enabled = false;
                }
                HabilitaBotones();
                ObjPr_Utils.setColor_Panel_PPal(PanelPpal, PrIn_EsquemaColor);
                ObjPr_Utils.setColor_Label_Error(LblMensaje, PrIn_EsquemaColor);
                //
            }
            catch (System.AccessViolationException ex_0)
            {
                CmdCancelar.Enabled = true;
                ObjPr_Utils.setColor_Boton_XEstado(CmdCancelar, PrIn_EsquemaColor);
                ///////////////////////////////////////////////////////////////
                // Manejo de log
                ///////////////////////////////////////////////////////////////
                ClasX_EventLog objL_Log = new ClasX_EventLog(stPr_UsuarioAPP, stPr_ArchivoLog, false, true, true);
                //
                objL_Log.outMensajError("StrailSAS_C_ProgReg.Dll", "FrmInfoBdFenix", "TomaParametros. System.AccessViolationException", "", ex_0.Message.ToString(), "", "");
                ///////////////////////////////////////////////////////////////
                // Fin Manejo de log
                ///////////////////////////////////////////////////////////////
            }
            catch (Exception ex)
            {
                CmdCancelar.Enabled = true;
                ObjPr_Utils.setColor_Boton_XEstado(CmdCancelar, PrIn_EsquemaColor);
                ///////////////////////////////////////////////////////////////
                // Manejo de log
                ///////////////////////////////////////////////////////////////
                ClasX_EventLog objL_Log = new ClasX_EventLog(stPr_UsuarioAPP, stPr_ArchivoLog, false, true, true);
                //
                objL_Log.outMensajError("StrailSAS_C_ProgReg.Dll", "FrmInfoBdFenix", "TomaParametros", "", ex.Message.ToString(), "", "");
                ///////////////////////////////////////////////////////////////
                // Fin Manejo de log
                ///////////////////////////////////////////////////////////////
            }
        }