using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Song.Entities;
namespace Song.ServiceInterfaces
{
///
/// 系统参数管理
///
public interface ISystemPara : WeiSha.Common.IBusinessInterface, System.Collections.IEnumerable
{
///
/// 添加
///
/// 业务实体
void Add(SystemPara entity);
///
/// 修改,且立即刷新全局参数
///
/// 参数键
/// 参数值
void Save(string key, string value);
///
/// 修改,且是否直接刷新全局参数
///
///
///
///
void Save(string key, string value, bool isRefresh);
///
/// 修改
///
/// 参数键
/// 参数值
/// 参数的单位
void Save(string key, string value, string unit);
///
/// 用实例保存
///
///
void Save(SystemPara entity);
///
/// 当前参数是否存在(通过参数名判断)
///
///
/// 如果已经存在,则返回true
bool IsExists(SystemPara entity);
///
/// 刷新全局参数
///
List Refresh();
///
/// 删除
///
/// 业务实体
void Delete(SystemPara entity);
///
/// 删除,按主键ID;
///
/// 实体的主键
void Delete(int identify);
///
/// 删除,按键值
///
///
void Delete(string key);
///
/// 根据键,获取值
///
///
///
string GetValue(string key);
///
/// 根据键,获取值
///
/// 键值
///
WeiSha.Common.Param.Method.ConvertToAnyValue this[string key] { get;}
///
/// 获取单个实例
///
///
///
SystemPara GetSingle(int id);
///
/// 获取单个实例,通过键值获取
///
///
///
SystemPara GetSingle(string key);
///
/// 获取所有参数
///
///
DataTable GetAll();
///
/// 查询获取参数
///
/// 键名
/// 参数说明
///
DataTable GetAll(string searKey, string searIntro);
///
/// 生成流水号
///
///
string Serial();
///
/// 测试是否完成授权
///
bool IsLicense();
///
/// 数据库完整性测试
///
/// 返回缺少的表与字段
List DatabaseCompleteTest();
///
/// 数据库链接测试
///
/// 链接正确为true,否则为false
bool DatabaseLinkTest();
///
/// 执行sql语句,返回影响的行数
///
///
/// 返回影响的行数
int ExecuteSql(string sql);
///
/// 执行sql语句,返回第一行第一列的数据
///
///
/// 返回第一行第一列的数据
object ScalarSql(string sql);
///
/// 执行sql语句,返回第一行
///
///
///
///
T ScalarSql(string sql) where T : WeiSha.Data.Entity;
///
/// 执行sql语句
///
///
/// 返回数据集
List ForSql(string sql) where T : WeiSha.Data.Entity;
///
/// 返回指定的数据集
///
///
///
DataTable ForSql(string sql);
}
}