/// <summary>
    /// Connection String
    /// </summary>
    public void InitilizeConnectionString()
    {
        try
        {
            connectionString = ConfigurationManager.AppSettings.Get("ConnectionString").ToString();
            connectionString = RidjindalEncryption.Decrypt(connectionString);

            commandTimeout = ConfigurationManager.AppSettings.Get("CommandTimeout").ToString();
        }
        catch (Exception exp)
        {
            throw new Exception("Config File Issue: Please check if the DB Connection String is defined correclty in the web.config file. System Error: " + exp.ToString());
        }
    }
Esempio n. 2
0
 /// <summary>
 /// this event is used to Dencrypt data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtDecrypt_Click(object sender, EventArgs e)
 {
     txtDecryptedText.Text = RidjindalEncryption.Decrypt(txtEncryptedText.Text);
 }
Esempio n. 3
0
 /// <summary>
 /// this event is used to encrypt data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEncrypt_Click(object sender, EventArgs e)
 {
     txtEncryptedText.Text = RidjindalEncryption.Encrypt(txtPlainText.Text);
 }