新人再问一个问题。。。。
时间:2011-12-23
来源:互联网
cs:
public List<string> Selected
{
get
{
List<string> l = new List<string>();
foreach (RepeaterItem item in rpShopCardList.Items)
{
CheckBox cb = item.FindControl("chkChoose") as CheckBox;
if (cb != null && cb.Checked)
{
HiddenField fld = item.FindControl("CheckBoxID") as HiddenField;
if (fld != null)
{
string id = Convert.ToString(fld.Value);
l.Add(id);
}
}
}
return l;
}
}
如何筛选数据库表中islock=0的数据,谢谢。。。。
public List<string> Selected
{
get
{
List<string> l = new List<string>();
foreach (RepeaterItem item in rpShopCardList.Items)
{
CheckBox cb = item.FindControl("chkChoose") as CheckBox;
if (cb != null && cb.Checked)
{
HiddenField fld = item.FindControl("CheckBoxID") as HiddenField;
if (fld != null)
{
string id = Convert.ToString(fld.Value);
l.Add(id);
}
}
}
return l;
}
}
如何筛选数据库表中islock=0的数据,谢谢。。。。
作者: ahcj1030 发布时间: 2011-12-23
用sql语句直接帅选啊
select * from 表名 where islock=0 取出所有等于0的
select * from 表名 where islock!=0 取出所有不等于0的
不知道你想要什么
select * from 表名 where islock=0 取出所有等于0的
select * from 表名 where islock!=0 取出所有不等于0的
不知道你想要什么
作者: feng1366259807 发布时间: 2011-12-23
sql语句插入到哪个地方,具体怎么写,谢谢 本人小白
作者: ahcj1030 发布时间: 2011-12-23
泛型里参数改为实体类可以吗
作者: jayinIT 发布时间: 2011-12-23
string id = Convert.ToString(fld.Value);
strsql="select islock from xxx where islock=0 and id='"+id+"'"; //ID应该是关键字吧。
if(查到)
l.Add(id);
end if
看你所需要的。
strsql="select islock from xxx where islock=0 and id='"+id+"'"; //ID应该是关键字吧。
if(查到)
l.Add(id);
end if
看你所需要的。
作者: szjarvis 发布时间: 2011-12-23
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28