MIS-TASK2 C#初遇&Dropdownlist

我都忘了是什么任务了 当时只有两天时间,熟悉系统之后,在贵人的帮助下提前完成了任务。 主要应该是增加“全部”和“在职”人员的筛选。 aspx页面修改如下: 請選擇全部在職離職 对应的cs代码,增加对数据库的筛选语句 if (ddlfilter.SelectedIndex != 1) { if (ddlfilter.SelectedIndex == 2) status = "3"; else if (ddlfilter.SelectedIndex == 3) status = "0"; str += " circle,times+1,instance,addition " + " from specialworker s,asmuser.dbo.employee e where s.badge=e.badge and dept " + cd(ddldept) + " and plcstn " + cd(ddlplcstn) + " and cardtype" + cd(ddlcardtype) + " and e.status='" + status + "' and s.comp_code='" + this.ddl_compCode.SelectedValue.Trim() + "' and s.badge " + cm(txtbadge.Text) + " "; } else if (ddlfilter.SelectedIndex == 1) { status = "('0','3')"; str += " circle,times+1,instance,addition " + " from specialworker s,asmuser.dbo.employee e where s.badge=e.badge and dept " + cd(ddldept) + " and plcstn " + cd(ddlplcstn) + " and cardtype" + cd(ddlcardtype) + " and e.status in " + status + " and s.comp_code='" + this.ddl_compCode.SelectedValue.Trim() + "' and s.badge " + cm(txtbadge.Text) + " "; } status="3"是在职,“0”是离职。" circle,times+1,instance,addition "这是个什么我也不是很清楚。 我之前还没发现,他很喜欢用if 和else if,else呢? 今天天气又回升了,真是个养生的城市,以后努力留在这里吧。

转载于:https://www.cnblogs.com/athenalalala/p/10098457.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值