Select Case e.DataCol.Name
Case "预定_休闲大床房_间数","时间段","类型"
If e.DataRow.IsNull(e.DataCol.Name) Then
e.DataRow("预定_休闲大床房_单价") = Nothing
e.DataRow("预定_休闲大床房_房价") = Nothing
Else
Dim dr As DataRow = DataTables("房价明细表").Find("房型='休闲大床房'")
If dr IsNot Nothing Then
e.DataRow("预定_休闲大床房_单价") = dr(e.DataRow("时间段") & "_" & e.DataRow("类型"))
e.DataRow("预定_休闲大床房_房价") = dr(e.DataRow("时间段") & "_" & e.DataRow("类型")) * e.DataRow("预定_休闲大床房_间数")
End If
End If
End Select
Select Case e.DataCol.Name
Case "预定_休闲双标房_间数","时间段","类型"
If e.DataRow.IsNull(e.DataCol.Name) Then
e.DataRow("预定_休闲双标房_单价") = Nothing
e.DataRow("预定_休闲双标房_房价") = Nothing
Else
Dim dr As DataRow = DataTables("房价明细表").Find("房型='休闲双标房'")
If dr IsNot Nothing Then
e.DataRow("预定_休闲双标房_单价") = dr(e.DataRow("时间段") & "_" & e.DataRow("类型"))
e.DataRow("预定_休闲双标房_房价") = dr(e.DataRow("时间段") & "_" & e.DataRow("类型")) * e.DataRow("预定_休闲双标房_间数")
End If
End If
End Select
理由:
http://www.foxtable.com/help/topics/2242.htm