Subversion Repositories DevTools

Rev

Rev 6883 | Rev 6886 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6883 Rev 6884
Line 31... Line 31...
31
'   Operations can add data
31
'   Operations can add data
32
'   Default data will be added at the end
32
'   Default data will be added at the end
33
Dim oJSON :Set oJSON = New aspJSON
33
Dim oJSON :Set oJSON = New aspJSON
34
Dim newitem
34
Dim newitem
35
 
35
 
-
 
36
' Filter Results and Reason
-
 
37
Dim sResult : sResult = ""
-
 
38
joiner = ""
-
 
39
If parResult <> "CEO" Then
-
 
40
    If InStr(parResult, "C") <> 0 Then sResult = sResult & "'C'" : joiner = ","
-
 
41
    If InStr(parResult, "E") <> 0 Then sResult = sResult & joiner & "'E'" : joiner = ","
-
 
42
    If InStr(parResult, "O") <> 0 Then sResult = sResult & joiner & "'B'," & "'S'"
-
 
43
    If sResult <> "" Then
-
 
44
        sResult = " AND bi.state in (" & sResult & ")"
-
 
45
    End If
-
 
46
End If
-
 
47
 
-
 
48
Dim sReason : sReason = ""
-
 
49
joiner = ""
-
 
50
If parReason <> "NRTP" Then
-
 
51
    If InStr(parReason, "N") <> 0 Then sReason = sReason & joiner & "'N'" : joiner = ","
-
 
52
    If InStr(parReason, "R") <> 0 Then sReason = sReason & joiner & "'R'" : joiner = ","
-
 
53
    If InStr(parReason, "T") <> 0 Then sReason = sReason & joiner & "'T'" : joiner = ","
-
 
54
    If InStr(parReason, "P") <> 0 Then sReason = sReason & joiner & "'P'" : joiner = ","
-
 
55
    'If InStr(parReason, "O") <> 0 Then sReason = sReason & joiner & "'B'," & "'S'"
-
 
56
    If sReason <> "" Then
-
 
57
        sReason = " AND bi.reason in (" & sReason & ")"
-
 
58
    End If
-
 
59
End If
-
 
60
 
-
 
61
 
36
'
62
'
37
' Determine the size of the record set
63
' Determine the size of the record set
38
'   Gives bad results when searching
64
'   Gives bad results when searching
39
Dim MaxCount : MaxCount = 0
65
Dim MaxCount : MaxCount = 0
40
 
66
 
41
SqlQry = "select count(*) as count from BUILD_INSTANCES bi WHERE bi.state is not null "
67
SqlQry = "select count(*) as count from BUILD_INSTANCES bi WHERE bi.state is not null " & sResult & sReason
42
If parRtagId <> "" Then
68
If parRtagId <> "" Then
43
    SqlQry = SqlQry + " AND rtag_id = " &  parRtagId
69
    SqlQry = SqlQry + " AND rtag_id = " &  parRtagId
44
End If
70
End If
45
 
71
 
46
On Error Resume Next
72
On Error Resume Next
Line 126... Line 152...
126
Dim whereString
152
Dim whereString
127
If parRtagId <> "" Then
153
If parRtagId <> "" Then
128
    whereString = " AND bi.rtag_id = " &  parRtagId
154
    whereString = " AND bi.rtag_id = " &  parRtagId
129
End If
155
End If
130
 
156
 
131
' Filter Results and Reason
-
 
132
Dim sResult : sResult = ""
-
 
133
joiner = ""
-
 
134
If parResult <> "CEO" Then
-
 
135
    If InStr(parResult, "C") <> 0 Then sResult = sResult & "'C'" : joiner = ","
-
 
136
    If InStr(parResult, "E") <> 0 Then sResult = sResult & joiner & "'E'" : joiner = ","
-
 
137
    If InStr(parResult, "O") <> 0 Then sResult = sResult & joiner & "'B'," & "'S'"
-
 
138
    If sResult <> "" Then
-
 
139
        sResult = " AND bi.state in (" & sResult & ")"
-
 
140
    End If
-
 
141
End If
-
 
142
 
-
 
143
Dim sReason : sReason = ""
-
 
144
joiner = ""
-
 
145
If parReason <> "NRTP" Then
-
 
146
    If InStr(parReason, "N") <> 0 Then sReason = sReason & joiner & "'N'" : joiner = ","
-
 
147
    If InStr(parReason, "R") <> 0 Then sReason = sReason & joiner & "'R'" : joiner = ","
-
 
148
    If InStr(parReason, "T") <> 0 Then sReason = sReason & joiner & "'T'" : joiner = ","
-
 
149
    If InStr(parReason, "P") <> 0 Then sReason = sReason & joiner & "'P'" : joiner = ","
-
 
150
    'If InStr(parReason, "O") <> 0 Then sReason = sReason & joiner & "'B'," & "'S'"
-
 
151
    If sReason <> "" Then
-
 
152
        sReason = " AND bi.reason in (" & sReason & ")"
-
 
153
    End If
-
 
154
End If
-
 
155
 
-
 
156
Dim BasicSql
157
Dim BasicSql
157
BasicSql =  "SELECT bi.PV_ID, " &_
158
BasicSql =  "SELECT bi.PV_ID, " &_
158
            "  bi.RTAG_ID, " &_
159
            "  bi.RTAG_ID, " &_
159
            "  pv.pkg_id, " &_
160
            "  pv.pkg_id, " &_
160
            "  pj.PROJ_NAME, " &_
161
            "  pj.PROJ_NAME, " &_