以下这段代码,我想在点击同意的时候,当前数据 gpr(“审批状态“) = “通过”,点击不同意时, gpr(“审批状态“) = “不通过”,请问应该如何写,研究了好久还是不行;
Case "qglist.htm"
Dim PrimaryKey As Integer = e.GetValues("key")
Dim qgr As DataRow = DataTables("O_QGuoSQ").SQLFind("[_Identify]=" & PrimaryKey)
If qgr IsNot Nothing Then
wb.AddForm("","form1","qlist.htm")
With wb.AddInputGroup("form1","ipg1","请购信息")
With .AddInput("请购单号","请购单号:","text")
.Value = qgr("请购单号")
.Readonly= True
End With
With .AddInput("申请日期","申请日期:","text")
.Value = qgr("申请日期")
.Readonly= True
End With
With .AddInput("区域","区域:","text")
.Value = qgr("区域")
.Readonly= True
End With
With .AddInput("部门","部门:","text")
.Value = qgr("部门")
.Readonly= True
End With
With .AddInput("请购人","请购人:","text")
.Value = qgr("请购人")
.Readonly= True
End With
End With
Dim wls As List(Of DataRow)
wls = DataTables("O_QGouSQList").SQLSelect("请购单号 = '"& qgr("请购单号") &"'")
Dim i As Integer = 2
Dim nms() As String = {"品牌","规格","等级","物品序号","申请数量","单位","用途"}
For Each wl As DataRow In wls
i = i + 1
With wb.AddInputGroup("form1","ipg" & i,wl("物料编号") & " " & wl("物料名称"))
For c As Integer = 0 To nms.length -1
With .AddInput("物料清单" & c,nms(c) & ":","text")
.Value = wl(nms(c))
.Readonly= True
End With
Next
End With
Next
With wb.AddInputGroup("form1","ipg50","审批意见")
With wb.AddButtonGroup("form1","btngrp1",False)
.Add("btn1", "同意", "submit").Value = "Btn1"
.Add("btn2", "不同意", "submit").Value = "Btn2"
End With
End With
e.WriteString(wb.Build)
End If