增加一个函数,比如checked,代码Dim e As RequestEventArgs = args(0)
If DataTables("订单").SQLCompute("count(订单编号)","订单编号='" & e.PlainText & "' and 数量 >1000") > 0 Then
e.WriteString("1")
else
e.WriteString("0")End If
httpRequest事件代码:
Select Case e.Path
Case "list.htm"
Functions.Execute("List",e) '分页显示
Case "edit.htm"
If e.PostValues.Count > 0 Then
Functions.Execute("Save",e) '保存表单数据
End If
Functions.Execute("Edit",e) '生成订单编辑页面
Case "checked.htm"
Functions.Execute("checked",e)
End Select
js
function del(){
var result = sendAjaxText(table1.primarykey,"checked.htm","",false);
if (result == "0") {
location="list.htm?page=" + table1.pagenumber + "&deloid=" + table1.primarykey;
}
else{
alert("数量超过1000不能删除");
}
}