#region 执行参数命令文本(有返回值)
///
/// 执行查询命令文本,并且返回DataSet数据集
///
/// 命令文本
/// 参数对象
/// 数据表名称
///
public DataSet RunProcReturn(string procName, SqlParameter[] prams, string tbName)
{
SqlDataAdapter dap = CreateDataAdaper(procName, prams);
DataSet ds = new DataSet();
dap.Fill(ds, tbName);
this.Close();
//得到执行成功返回值
return ds;
}
public void UpdateInfo(string id, string type)
{
DataSet ds = this.SelectInfo(type, Convert.ToInt32(id));
bool checkState = Convert.ToBoolean(ds.Tables[0].Rows[0][6].ToString());
int i;
if (checkState)
{
i = data.RunProc("UPDATE tb_info SET checkState = 0 WHERE (ID = " + id + ")");
}
else
{
i = data.RunProc("UPDATE tb_info SET checkState = 1 WHERE (ID = " + id + ")");
}
}
#endregion
public DataSet SelectLeaguerInfo(bool All)
{
if (All)
//显示有效收费信息
return data.RunProcReturn("Select * from tb_LeaguerInfo where showday >= getdate() order by date desc", "tb_LeaguerInfo");
else
//显示过期收费信息
return data.RunProcReturn("select * from tb_LeaguerInfo where showday<getdate() order by date desc", "tb_LeaguerInfo");
}
数据库 sql 表tb_info
id 信息编号
type 信息类型
title 信息标题
info 信息内容
linkman 联系人
tel 联系电话
checkstate 审核状态
date 信息发布日期
我想问一下public DataSet SelectLeaguerInfo(bool All)
这里为何是bool all 啊?这个all是什么意思??
我在这个程序所有的类里边没发现一个定义返回值为all的
all是对dataset的列的所有列比较吗?还是什麼?怎麽比较的?我想知道!到底这个all是什麽意思?
|