请问这个VB6.0的代码怎么转换成VB.NET代码?谢谢!
Ifrs70.State=1Thenrs70.Closers70.Open"驱动成品入库where入库单号='"+rs1.Fields("入库单号")+"'",Cnn,a...
If rs70.State = 1 Then rs70.Close
rs70.Open "驱动成品入库 where 入库单号='" + rs1.Fields("入库单号") + "'", Cnn, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs70.RecordCount > 0 Then
If Val(rs70.Fields("审核数量")) = Val(rs70.Fields("入库数量")) Then
If rs6.State = 1 Then rs6.Close
rs6.Open "select * from RDrecord where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs6.RecordCount > 0 Then
CnnU8.Execute ("update RDrecord set cHandler='" + czy + "' ,dVeriDate='" + Str(Date) + "'where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null ")
If rs7.State = 1 Then rs7.Close
rs7.Open "select * from RDrecords where ID='" + rs1.Fields("U8029入ID") + "' order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs7.RecordCount > 0 Then
For p = 1 To rs7.RecordCount
If rs8.State = 1 Then rs8.Close
rs8.Open "select * from CurrentStock where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'order by cInvCode", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs8.RecordCount > 0 Then
CnnU8.Execute ("update CurrentStock set finQuantity='" + Replace(Str(Val(rs8.Fields("finQuantity")) - Val(rs7.Fields("iQuantity"))), " ", "") + "',iQuantity='" + Replace(Str(Val(rs8.Fields("iQuantity")) + Val(rs7.Fields("iQuantity"))), " ", "") + "' where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'")
End If
rs8.Close
rs7.MoveNext
Next p
End If
rs7.Close
MsgBox "自动审核成功!", 48, "成功"
End If
rs6.Close
End If
End If
rs70.Close 展开
rs70.Open "驱动成品入库 where 入库单号='" + rs1.Fields("入库单号") + "'", Cnn, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs70.RecordCount > 0 Then
If Val(rs70.Fields("审核数量")) = Val(rs70.Fields("入库数量")) Then
If rs6.State = 1 Then rs6.Close
rs6.Open "select * from RDrecord where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs6.RecordCount > 0 Then
CnnU8.Execute ("update RDrecord set cHandler='" + czy + "' ,dVeriDate='" + Str(Date) + "'where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null ")
If rs7.State = 1 Then rs7.Close
rs7.Open "select * from RDrecords where ID='" + rs1.Fields("U8029入ID") + "' order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs7.RecordCount > 0 Then
For p = 1 To rs7.RecordCount
If rs8.State = 1 Then rs8.Close
rs8.Open "select * from CurrentStock where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'order by cInvCode", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs8.RecordCount > 0 Then
CnnU8.Execute ("update CurrentStock set finQuantity='" + Replace(Str(Val(rs8.Fields("finQuantity")) - Val(rs7.Fields("iQuantity"))), " ", "") + "',iQuantity='" + Replace(Str(Val(rs8.Fields("iQuantity")) + Val(rs7.Fields("iQuantity"))), " ", "") + "' where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'")
End If
rs8.Close
rs7.MoveNext
Next p
End If
rs7.Close
MsgBox "自动审核成功!", 48, "成功"
End If
rs6.Close
End If
End If
rs70.Close 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询