Dim d1 As String = e.Form.Controls("机房名称").Text
Dim t11 As String = e.Form.Controls("设备名称").Text
Dim t12 As String = e.Form.Controls("设备型号").Text
Dim t13 As String = e.Form.Controls("设备编号").Text
Dim c1 As String = e.Form.Controls("板件槽位1").Text
Dim t1 As String = e.Form.Controls("板件型号1").Text
Dim nd2 As DataRow
If d1 = "" Then
nd2 = DataTables("机房设备板件表").Find("设备名称 = '" & t11 & "' and 设备型号 = '" & t12 & "' and 设备编号 = '" & t13 & "' and 板件槽位 = '" & c1 & "' and 板件型号 = '" & t1 & "'")
Else If t11 = "" Then
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备型号 = '" & t12 & "' and 设备编号 = '" & t13 & "' and 板件槽位 = '" & c1 & "' and 板件型号 = '" & t1 & "'")
Else If t12 = "" Then
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备名称 = '" & t11 & "' and 设备编号 = '" & t13 & "' and 板件槽位 = '" & c1 & "' and 板件型号 = '" & t1 & "'")
Else If t13 = "" Then
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备名称 = '" & t11 & "' and 设备型号 = '" & t12 & "' and 板件槽位 = '" & c1 & "' and 板件型号 = '" & t1 & "'")
Else If c1 = "" Then
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备名称 = '" & t11 & "' and 设备型号 = '" & t12 & "' and 设备编号 = '" & t13 & "' and 板件型号 = '" & t1 & "'")
Else If t1 = "" Then
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备名称 = '" & t11 & "' and 设备型号 = '" & t12 & "' and 设备编号 = '" & t13 & "' and 板件槽位 = '" & c1 & "'")
Else
nd2 = DataTables("机房设备板件表").Find("机房名称 = '" & d1 & "' and 设备名称 = '" & t11 & "' and 设备型号 = '" & t12 & "' and 设备编号 = '" & t13 & "' and 板件槽位 = '" & c1 & "'and 板件型号 = '" & t1 & "'")
End If
If nd2 Is Nothing Then
nd2 = DataTables("机房设备板件表").AddNew()
nd2("机房名称") = d1
nd2("设备名称") = t11
nd2("设备型号") = t12
nd2("设备编号") = t13
nd2("板件槽位") = c1
nd2("板件型号") = t1
End If