.NET Framework 版本:4.0.30319.18063
Foxtable 版本:2019.11.3.1
错误所在事件:
详细错误信息:
由于其 Required 属性设置为真(True),字段 '~TMPCLPCPB._Identify' 不能包含 Null 值。在此字段中输入一个数值。
Select Case e.Path
Case ""
Dim sb As New StringBuilder
' sb.AppendLine("增加订单成功! <br/><br/>")
sb.AppendLine("<a href='AddNew.htm'>继续增加</a>")
e.WriteString(sb.ToString)
Case "AddNew.htm"
If e.PostValues.Count = 0 Then
Dim sb As New StringBuilder
sb.AppendLine("<form action='AddNew.htm' enctype='multipart/form-data' method='post' id='form1' name='form1'>")
sb.AppendLine("产品: <input name='cp' id='cp'><br/><br/>")
sb.AppendLine("客户: <input name='kh' id='kh'><br/><br/>")
sb.AppendLine("雇员: <input name='gy' id='gy'><br/><br/>")
sb.AppendLine("单价: <input type='number' name='dj' id='dj'><br/><br/>")
sb.AppendLine("折扣: <input type='number' name='zk' id='zk' min='0' max='0.15' step='0.01'><br/><br/>")
sb.AppendLine("数量: <input type='number' name='sl' id='sl'><br/><br/>")
sb.AppendLine("日期: <input type='date' name='rq' id='rq'><br/><br/>")
sb.AppendLine("<input Type='submit' name='Sumbit' id='Sumbit' value='确定'>")
sb.AppendLine("</form>")
e.WriteString(sb.ToString)
Else
Dim dr As DataRow = DataTables("订单").SQLAddNew()
Dim inms() As String = {"cp","kh","gy","dj","zk","sl","rq"} '输入框名称数组
Dim cnms() As String = {"产品","客户","雇员","单价","折扣","数量","日期"} '列名数组,注意列名和输入框必须一一对应,位置不能错乱
For i As Integer = 0 To inms.Length -1
dr(cnms(i)) = e.PostValues(Inms(i))
Next
dr.Save() '用SQLAddNew增加的行,必须保存一下,否则会被丢弃.
Dim sb As New StringBuilder
sb.AppendLine("增加订单成功! <br/><br/>")
sb.AppendLine("<a href='AddNew.htm'>继续增加</a>")
e.WriteString(sb.ToString)
End If
End Select
此主题相关图片如下:无标题.png
[此贴子已经被作者于2019/11/29 11:34:24编辑过]