zoukankan
html css js c++ java
SQL语句
private
string
GetSQL()
{
string
strSQL;
//
strSQL = "select UID,MobileNum,DateTime,PayFlag,grade from SMS_Log where ";
strSQL
=
"
select UID,MobileNum,DateTime,PayFlag=case PayFlag when 0 then '未处理' when 1 then '成功扣费' when 2 then '扣费失败' end,grade=case grade when 0 then '未获奖' when 1 then '一等奖' when 2 then '二等奖' when 3 then '三等奖' end from SMS_Log where
"
;
strSQL
+=
"
1=1
"
;
//
什么都不选的情况
if
(tbUID.Text
!=
""
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
UID=N'
"
+
tbUID.Text.Trim()
+
"
'
"
;
//
选择用户ID的情况
}
if
(tbBeginTime.Value
!=
""
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
DateTime>'
"
+
tbBeginTime.Value
+
"
'
"
;
//
选择起始时间的情况,格式2005-4-27 17:33:04
}
if
(tbEndTime.Value
!=
""
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
DateTime<'
"
+
tbEndTime.Value
+
"
'
"
;
//
选择结束时间的情况
}
if
(cblSelect.SelectedIndex
==
0
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
PayFlag=1
"
;
//
选择成功扣费的情况,单选
}
if
(cblSelect.SelectedIndex
==
1
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
PayFlag=2
"
;
//
选择扣费失败的情况,单选
}
if
(cblSelect.SelectedIndex
==
2
)
{
strSQL
+=
"
and
"
;
strSQL
+=
"
PayFlag=0
"
;
//
选择未处理的情况,单选
}
return
strSQL;
}
查看全文
相关阅读:
html 6 border border-width border-style border-color CSS三角形
html 5 marign top right bottom left
html 布局
python学习——生成列表并修改其元素
python学习——读取染色体长度(七:for循环对染色体序列进行反向互补)
python学习——读取染色体长度(七:读取fasta文件)
python学习——读取染色体长度(六:读取含有染色体长度的文件)
python学习——读取染色体长度(五:从命令行输入染色体长度)
python学习——读取染色体长度(四:获取最长染色体的编号)
python学习——读取染色体长度(三、用循环或者函数求总长并获取最长染色体长度)
原文地址:https://www.cnblogs.com/xiaodi/p/148228.html
最新文章
iOS开发之常用正则表达式
UIButton按钮图片和文字的自动调整
内存管理原则
什么是runtime?
怎样将图片1、图片2合成一张新的图片
测试耗时时间的方法
如何使用cocoapods
建模
前景监测
解决ubuntu输入正确用户密码重新跳到无法登录
热门文章
Java中Thread类的start()和run()的区别
java中String、StringBuffer、StringBuilder的区别
MyEclipse 安装activiti designer
Request.Params用法
html 12 行 快 转换 段落 文字
html 11 内联(行内)
html 10 margin 重叠
html 9 css居中
html 8 盒子的background 颜色的面积
html 7 圣诞树 浮动 相对位置
Copyright © 2011-2022 走看看