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呢? 今天天气又回升了,真是个养生的城市,以后努力留在这里吧。
posted @ 2018-12-11 13:37  athenalalala  阅读(92)  评论(0编辑  收藏  举报