会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
且行且歌
http://www.cnblogs.com
关于switch
关于switch和strSql 查询条件
/**/
/*
* <asp:RadioButtonList ID="rblState" RepeatDirection="horizontal" runat="server">
<asp:ListItem Text="所有" Selected="true" Value="所有"></asp:ListItem>
<asp:ListItem Text="已完成核销" Value="已完成核销"></asp:ListItem>
<asp:ListItem Text="未完成核销" Value="未完成核销"></asp:ListItem>
</asp:RadioButtonList>
*
*
*
*/
switch
(rblState.SelectedIndex.ToString())
{
case
"
1
"
:
strSql
+=
"
and dbo.INV_MAIN.AMOUNT_WHX=0
"
;
break
;
case
"
2
"
:
strSql
+=
"
and dbo.INV_MAIN.AMOUNT_WHX!=0
"
;
break
;
default
:
break
;
}
<asp:ListItem>的索引从零开始,默认
<asp:ListItem Text="所有" Selected="true" Value="所有"></asp:ListItem>
是选中的,default就不需要加进strSql任何内容。
posted on
2007-08-14 19:10
simhare
阅读(
148
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
导航
博客园
首页
新随笔
联系
订阅
管理
公告