摘要: SQL 查询数据时按某列排序后增加排名列,需排名的列值相等时排名相同,即如需排名列数组为:9,9,8,7,7,6 添加的排名列数组需要显示为两种: 第一种:1,1,3,4,4,6 (这种排名方法应该是最普遍的排名方法啦) 或者 第二种:1,1,2,3,3,4 (某些特殊情况需要)--现在假设测试数据:创建临时表 #score 并插入数据create table #score(id int, points float) --id 为学号和points为成绩 insert #score select 1, 90union all select 2, 85union all selec... 阅读全文
posted @ 2013-11-18 23:34 Alanblog 阅读(447) 评论(0) 推荐(0)
摘要: 网上很多关于文本框只能输入数字的,今天又找了一遍,发现以前的写法居然有点问题!onkeypress="if (event.keyCode57) event.returnValue=false;"这样写如果用户打汉字,依然可以通过!现在找到了两种写法:拒绝. / ? = + ` ~ 以及汉字(目前测了下,貌似真的只能输入汉字)onkeyup='value=value.replace(/[^\d]/g,"") ' onbeforepaste="clipboardData.setData('text',clipboar 阅读全文
posted @ 2013-11-18 22:45 Alanblog 阅读(363) 评论(0) 推荐(0)
摘要: 网上查了这样的代码 虽然是可以用。但是会点击多次会出现”“ dropdownList不能选多个值的问题“ private void initdroplistitemlirun(string c_Business) { if (this.Dplirun.Items.FindByText(c_Business) != null) { for (int i = 0; i < this.Dplirun.Items.Count; i++) { t... 阅读全文
posted @ 2013-11-18 22:37 Alanblog 阅读(596) 评论(0) 推荐(0)