但更详细的信息中却隐藏了关键信息,拥有相关权限的用户点击联系客服后会显示关键信息,其他普通权限的用户只会以邮件的详细发给设置好的客服索取关键信息;
6. 设置页面
关键信息设置隐藏,基础邮箱配置;
7. 样式使用的操作动图
六、数据库结构
1. 引用:
Chloe.dll ; Chloe.SQLite ; System.Data.SQLite
2. SQLite的数据库常规操作的通用类
public class SqLiteSqlHelper { private readonly string _connectionString; public SqLiteSqlHelper() { _connectionString = DbConfiger.SqLiteConnectionString; } /// <summary> /// 构造函数 /// </summary> /// <param>SQLite数据库文件路径</param> public SqLiteSqlHelper(string dbPath) { _connectionString = "Data Source=" + dbPath; } /// <summary> /// 对SQLite数据库执行增删改操作,返回受影响的行数。 /// </summary> /// <param>要执行的增删改的SQL语句</param> /// parameters 执行增删改语句所需要的参数,参数必须以它们在SQL语句中的顺序为准 public int ExecuteNonQuery(string sql, SQLiteParameter[] parameters) { int affectedRows; using (var connection = new SQLiteConnection(_connectionString)) { connection.Open(); using (DbTransaction transaction = connection.BeginTransaction()) { using (var command = new SQLiteCommand(connection)) { command.CommandText = sql; if (parameters != null) command.Parameters.AddRange(parameters); affectedRows = command.ExecuteNonQuery(); } transaction.Commit(); } } return affectedRows; } /// <summary> /// 执行一个查询语句,返回一个关联的SQLiteDataReader实例 /// </summary> /// <param>要执行的查询语句</param> /// parameters 执行SQL查询语句所需要的参数,参数必须以它们在SQL语句中的顺序为准 public SQLiteDataReader ExecuteReader(string sql,SQLiteParameter[] parameters) { var connection = new SQLiteConnection(_connectionString); var command = new SQLiteCommand(sql, connection); if (parameters != null) { command.Parameters.AddRange(parameters); } connection.Open(); return command.ExecuteReader(CommandBehavior.CloseConnection); } /// <summary> /// 执行一个查询语句,返回一个包含查询结果的DataTable /// </summary> public DataTable ExecuteDataTable(string sql, SQLiteParameter[] parameters) { using (var connection = new SQLiteConnection(_connectionString)) { using (var command = new SQLiteCommand(sql, connection)) { if (parameters != null) command.Parameters.AddRange(parameters); var adapter = new SQLiteDataAdapter(command); var data = new DataTable(); adapter.Fill(data); return data; } } } /// <summary> /// 执行一个查询语句,返回查询结果的第一行第一列 /// </summary> public object ExecuteScalar(string sql, SQLiteParameter[] parameters) { object obj; using (var connection = new SQLiteConnection(_connectionString)) { using (var command = new SQLiteCommand(sql, connection)) { if (parameters != null) command.Parameters.AddRange(parameters); connection.Open(); obj = command.ExecuteScalar(); connection.Close(); } } return obj; } /// <summary> /// 查询数据库中的所有数据类型信息 /// </summary> public DataTable GetSchema() { using (var connection = new SQLiteConnection(_connectionString)) { connection.Open(); var data = connection.GetSchema("TABLES"); connection.Close(); return data; } } }