30 lines
723 B
C#
30 lines
723 B
C#
|
|
using System.Configuration;
|
|
|
|
namespace Mtxfw.Utility
|
|
{
|
|
public class DbConnection
|
|
{
|
|
public static bool Encrypt { get; set; }
|
|
public DbConnection(bool encrypt)
|
|
{
|
|
Encrypt = encrypt;
|
|
}
|
|
public static string connectionString
|
|
{
|
|
get
|
|
{
|
|
string connection = ConfigurationManager.AppSettings["ConnStr"].ToString(); //ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString;
|
|
if (Encrypt == true)
|
|
{
|
|
return connection;
|
|
}
|
|
else
|
|
{
|
|
return connection;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|