on line for a question!! thirsty!!

sure_java 2004-10-18 02:34:35
有这样一个问题:我的表中有下列几行
姓名,单位,发放时间
如果我想过滤:第一次过滤条件:显示某单位的所有信息,第二次过滤条件:显示满足发放时间的数据(前提条件是:在第一次过滤出的信息中显示)代码?/
string str,str1,year,month

//判断输入项是否为空
str1=trim(ddlb_1.text)
month=trim(ddlb_2.text)
year=trim(sle_1.text)
if str1="" or isnull(str1) then
messagebox("提示","请选择单位!")
ddlb_1.setfocus()
return
end if

//按条件过滤

dw_1.setfilter("szdw ='"+ str1 +"'")
dw_1.filter()

if year="" or isnull(year) then
messagebox("提示","请输入年份!")
sle_1.setfocus()
return
end if
if month="" or isnull(month) then
messagebox("提示","请选择月份!")
ddlb_2.setfocus()
return
end if

str=year + month
//按条件过滤
string dw
dw=mid(dw_1.getitemstring(1, "szdw"),1,40)
if str1=trim(dw) then
dw_1.setfilter("FFSJ ='"+ str +"'")
dw_1.filter()
dw_1.retrieve()

elseif str1<>trim(dw) then
Messagebox("提示","没有符合条件的数据")
return
end if

...全文
80 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
pbtech 2004-10-19
  • 打赏
  • 举报
回复
有什么问题呢
sure_java 2004-10-19
  • 打赏
  • 举报
回复
已经得到解决!!

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧