Exemple #1
0
        private void Frm_Conexiones_Load(object sender, EventArgs e)
        {
            CargarIconos();
            MSRegistro RegOut = new MSRegistro();
            Crypto     DesencriptarTexto = new Crypto();
            string     valServer, valDB, valLogin, valPass;

            try
            {
                valServer = DesencriptarTexto.Desencriptar(RegOut.GetSetting("ConexionSQL", "ServerR"));
                valDB     = DesencriptarTexto.Desencriptar(RegOut.GetSetting("ConexionSQL", "DBaseR"));
                valLogin  = DesencriptarTexto.Desencriptar(RegOut.GetSetting("ConexionSQL", "UserR"));
                valPass   = DesencriptarTexto.Desencriptar(RegOut.GetSetting("ConexionSQL", "PasswordR"));
            }
            catch
            {
                valServer = string.Empty;
                valDB     = string.Empty;
                valLogin  = string.Empty;
                valPass   = string.Empty;
            }



            if (valServer != null && valDB != null && valLogin != null & valPass != null)
            {
                txtServer.Text   = valServer;
                txtDB.Text       = valDB;
                txtLogin.Text    = valLogin;
                txtPassword.Text = valPass;
                using (SqlConnection conn = new SqlConnection(String.Format("Data Source={0};Initial Catalog={1};Persist Security Info=True;User ID={2};Password={3}", txtServer.Text, txtDB.Text, txtLogin.Text, txtPassword.Text)))
                {
                    try
                    {
                        conn.Open();
                    }
                    catch
                    {
                        XtraMessageBox.Show("No se Han Configurado datos Correctos para la conexion a la base de datos Local");
                    }
                }
            }
            else
            {
                txtServer.Text   = string.Empty;
                txtDB.Text       = string.Empty;
                txtLogin.Text    = string.Empty;
                txtPassword.Text = string.Empty;
            }
        }
Exemple #2
0
        private void Frm_Login_Shown(object sender, EventArgs e)
        {
            txtUser.Focus();
            MSRegistro RegOut = new MSRegistro();

            SkinForm.LookAndFeel.SetSkinStyle(RegOut.GetSetting("ConexionSQL", "Sking"));
        }
Exemple #3
0
        private void Frm_Principal_Load(object sender, EventArgs e)
        {
            MSRegistro RegOut = new MSRegistro();

            SkinForm.LookAndFeel.SetSkinStyle(RegOut.GetSetting("ConexionSQL", "Sking"));
            OcultarBotones();
            if (UsuariosClase == 'S')
            {
                accesosuperusuario();
            }
            else
            {
                revisaopciones();
            }
            CLS_AppConfig con = new CLS_AppConfig();

            con.ConnectionStrings("SES_Reportes_Connection");
        }