Subversion Repositories DevTools

Rev

Rev 5177 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5177 Rev 5178
Line 51... Line 51...
51
Dim a, b, c, d, pkgversion, errormsg, ChangeASource, ChangeAUpdate, ChangeBSource, ChangeBUpdate, pvCollectionA, pvCollectionB
51
Dim a, b, c, d, pkgversion, errormsg, ChangeASource, ChangeAUpdate, ChangeBSource, ChangeBUpdate, pvCollectionA, pvCollectionB
52
Dim source_change, scFlag
52
Dim source_change, scFlag
53
Dim changeType
53
Dim changeType
54
Dim pendingAdditions
54
Dim pendingAdditions
55
Dim isaSdk                  ' Target is an SDK based package
55
Dim isaSdk                  ' Target is an SDK based package
-
 
56
Dim isMergable              ' Target package can be modified
56
 
57
 
57
'------------ Constants Declaration -----------
58
'------------ Constants Declaration -----------
58
Const LIMG_UPDATED = "<img src='images/i_updated.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Updated'>"
59
Const LIMG_UPDATED = "<img src='images/i_updated.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Updated'>"
59
Const LIMG_RIPPLED = "<img src='images/i_rippled.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Rippled'>"
60
Const LIMG_RIPPLED = "<img src='images/i_rippled.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Rippled'>"
60
Const LIMG_ADDED = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Added'>"
61
Const LIMG_ADDED = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Added'>"
Line 473... Line 474...
473
        Is_Pending_Sub = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'S'" )
474
        Is_Pending_Sub = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'S'" )
474
    End If
475
    End If
475
End Function
476
End Function
476
 
477
 
477
'--------------------------------------------------------------------------------------------------------------------------
478
'--------------------------------------------------------------------------------------------------------------------------
478
Sub MergePackages (releaseMode)
479
Sub MergePackages ()
479
    Dim aFullList, aAddPkgList, aRemovePkgList, dAddPkgList, dRemovePkgList, PvId
480
    Dim aFullList, aAddPkgList, aRemovePkgList, dAddPkgList, dRemovePkgList, PvId
480
    Dim OraParameter
481
    Dim OraParameter
481
    Dim rc
482
    Dim rc
482
 
483
 
483
    ' Business Rules restricting the use of the merge feature...
-
 
484
    ' Bypass merge if the destination release is in closed or archive mode, or if user does not have
-
 
485
    ' merge permissions
-
 
486
    If    releaseMode <> enumDB_RELEASE_IN_CLOSED_MODE  _
-
 
487
      AND releaseMode <> enumDB_RELEASE_IN_PRESERVE_MODE _
-
 
488
      AND releaseMode <> enumDB_RELEASE_IN_ARCHIVE_MODE _
-
 
489
      AND (canActionControlInProject("MergeRelease")) THEN
-
 
490
 
-
 
491
        Set dAddPkgList = CreateObject("Scripting.Dictionary")
484
    Set dAddPkgList = CreateObject("Scripting.Dictionary")
492
        Set dRemovePkgList = CreateObject("Scripting.Dictionary")
485
    Set dRemovePkgList = CreateObject("Scripting.Dictionary")
493
 
-
 
494
        '--- Get Add Packages ---
-
 
495
        ' Get full list of "addpkg" parameter
-
 
496
        aFullList = Split ( Replace( Request("addpkg"), " ", "" ), "," )
-
 
497
 
-
 
498
        ' Clean empty parameters
-
 
499
        For Each PvId In aFullList
-
 
500
            If PvId <> "" Then
-
 
501
                dAddPkgList.Add CStr( PvId ), Empty
-
 
502
            End If
-
 
503
        Next
-
 
504
 
486
 
-
 
487
    '--- Get Add Packages ---
-
 
488
    ' Get full list of "addpkg" parameter
-
 
489
    aFullList = Split ( Replace( Request("addpkg"), " ", "" ), "," )
-
 
490
 
-
 
491
    ' Clean empty parameters
-
 
492
    For Each PvId In aFullList
505
        aFullList = NULL
493
        If PvId <> "" Then
506
        aAddPkgList = dAddPkgList.Keys
494
            dAddPkgList.Add CStr( PvId ), Empty
-
 
495
        End If
-
 
496
    Next
507
 
497
 
508
        '--- Get Remove Packages ---
-
 
509
        ' Get full list of "removepkg" parameter
-
 
510
        aFullList = Split ( Replace( Request("removepkg"), " ", "" ), "," )
-
 
511
 
-
 
512
        ' Clean empty parameters
498
    aFullList = NULL
513
        For Each PvId In aFullList
499
    aAddPkgList = dAddPkgList.Keys
514
            If PvId <> "" Then
-
 
515
                dRemovePkgList.Add CStr( PvId ), Empty
-
 
516
            End If
-
 
517
        Next
-
 
518
 
500
 
-
 
501
    '--- Get Remove Packages ---
-
 
502
    ' Get full list of "removepkg" parameter
-
 
503
    aFullList = Split ( Replace( Request("removepkg"), " ", "" ), "," )
-
 
504
 
-
 
505
    ' Clean empty parameters
-
 
506
    For Each PvId In aFullList
519
        aFullList = NULL
507
        If PvId <> "" Then
520
        aRemovePkgList = dRemovePkgList.Keys
508
            dRemovePkgList.Add CStr( PvId ), Empty
-
 
509
        End If
-
 
510
    Next
521
 
511
 
522
        '-- Add package List to release --
512
    aFullList = NULL
523
        OraDatabase.Parameters.Add "PV_ID",     NULL, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
524
        OraDatabase.Parameters.Add "VIEW_ID",  NULL, ORAPARM_BOTH, ORATYPE_NUMBER
-
 
525
        OraDatabase.Parameters.Add "RTAG_A",    Request("rtagA"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
526
        OraDatabase.Parameters.Add "RTAG_B",    Request("rtagB"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
527
        OraDatabase.Parameters.Add "PROJB",     objRelCollectorB.Item("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
528
        OraDatabase.Parameters.Add "COMMENTS", "Merging from "& objRelCollectorA.Item("location") &" to "& objRelCollectorB.Item("location"), ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
529
        OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
530
        OraDatabase.Parameters.Add "OPERATION",NULL, ORAPARM_INPUT, ORATYPE_CHAR
513
    aRemovePkgList = dRemovePkgList.Keys
531
 
514
 
532
        Set OraParameter = OraDatabase.Parameters
515
    '-- Add package List to release --
-
 
516
    OraDatabase.Parameters.Add "PV_ID",     NULL, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
517
    OraDatabase.Parameters.Add "VIEW_ID",  NULL, ORAPARM_BOTH, ORATYPE_NUMBER
-
 
518
    OraDatabase.Parameters.Add "RTAG_A",    Request("rtagA"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
519
    OraDatabase.Parameters.Add "RTAG_B",    Request("rtagB"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
520
    OraDatabase.Parameters.Add "PROJB",     objRelCollectorB.Item("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
521
    OraDatabase.Parameters.Add "COMMENTS", "Merging from "& objRelCollectorA.Item("location") &" to "& objRelCollectorB.Item("location"), ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
522
    OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
523
    OraDatabase.Parameters.Add "OPERATION",NULL, ORAPARM_INPUT, ORATYPE_CHAR
533
 
524
 
-
 
525
    Set OraParameter = OraDatabase.Parameters
534
 
526
 
535
        On Error Resume Next
-
 
536
 
527
 
-
 
528
    On Error Resume Next
537
 
529
 
538
        ' Begin Database entry
-
 
539
        objEH.TryORA ( OraSession )
-
 
540
 
530
 
541
        '-- Add Packages --
531
    ' Begin Database entry
542
        OraParameter("OPERATION").Value = "A"
-
 
543
        For Each PvId In aAddPkgList
-
 
544
            OraParameter("PV_ID").Value = PvId
-
 
545
            ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
-
 
546
            If Err.Number = 0 Then
-
 
547
                OraDatabase.ExecuteSQL _
-
 
548
                "BEGIN  "&_
532
    objEH.TryORA ( OraSession )
549
                "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_A ); "&_
-
 
550
                "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
-
 
551
                "END;"
-
 
552
            End If
-
 
553
        Next
-
 
554
 
533
 
555
        '-- Remove Packages --
534
    '-- Add Packages --
-
 
535
    OraParameter("OPERATION").Value = "A"
-
 
536
    For Each PvId In aAddPkgList
-
 
537
        OraParameter("PV_ID").Value = PvId
-
 
538
        ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
556
        If Err.Number = 0 Then
539
        If Err.Number = 0 Then
557
            OraParameter("OPERATION").Value = "S"
-
 
558
            For Each PvId In aRemovePkgList
-
 
559
                OraParameter("PV_ID").Value = PvId
-
 
560
 
-
 
561
                If Err.Number = 0 Then
-
 
562
                    ' Does this PV_ID exist in the destination release's planned table?
-
 
563
                    rc = Get_Record_Count ("PLANNED pl WHERE pl.pv_id = " & PvId & " AND pl.rtag_id = " & Request("rtagB") )
-
 
564
                    If  rc > 0 Then
-
 
565
                        ' Given that merging now merges into pending, the merge page may be used to remove items that have
-
 
566
                        ' previously been merged but have not yet been committed to the destination release. For these,
-
 
567
                        ' we cannot call PK_RELEASE.GET_PACKAGE_VIEW(). We have to call PK_PLANNED.GET_PACKAGE_VIEW() instead.
-
 
568
                        OraDatabase.ExecuteSQL _
540
            OraDatabase.ExecuteSQL _
569
                        "BEGIN  "&_
541
            "BEGIN  "&_
570
                        "  :VIEW_ID := PK_PLANNED.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
542
            "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_A ); "&_
571
                        "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
543
            "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
572
                        "END;"
544
            "END;"
573
                    Else
545
        End If
574
                        ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
-
 
575
                        OraDatabase.ExecuteSQL _
546
    Next
-
 
547
 
576
                        "BEGIN  "&_
548
    '-- Remove Packages --
577
                        "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
-
 
578
                        "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
-
 
579
                        "END;"
549
    If Err.Number = 0 Then
580
                    End If
550
        OraParameter("OPERATION").Value = "S"
581
                End If
551
        For Each PvId In aRemovePkgList
582
            Next
552
            OraParameter("PV_ID").Value = PvId
583
 
553
 
584
            '-- Log Project Merge Action
-
 
585
            If Err.Number = 0 Then
554
            If Err.Number = 0 Then
-
 
555
                ' Does this PV_ID exist in the destination release's planned table?
-
 
556
                rc = Get_Record_Count ("PLANNED pl WHERE pl.pv_id = " & PvId & " AND pl.rtag_id = " & Request("rtagB") )
-
 
557
                If  rc > 0 Then
-
 
558
                    ' Given that merging now merges into pending, the merge page may be used to remove items that have
-
 
559
                    ' previously been merged but have not yet been committed to the destination release. For these,
-
 
560
                    ' we cannot call PK_RELEASE.GET_PACKAGE_VIEW(). We have to call PK_PLANNED.GET_PACKAGE_VIEW() instead.
586
                OraDatabase.ExecuteSQL _
561
                    OraDatabase.ExecuteSQL _
-
 
562
                    "BEGIN  "&_
-
 
563
                    "  :VIEW_ID := PK_PLANNED.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
-
 
564
                    "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
-
 
565
                    "END;"
-
 
566
                Else
-
 
567
                    ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
-
 
568
                    OraDatabase.ExecuteSQL _
-
 
569
                    "BEGIN  "&_
-
 
570
                    "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
587
                "BEGIN  LOG_PROJECT_ACTION ( :PROJB, 'merge_release', :USER_ID, :COMMENTS, :RTAG_B );  END;"
571
                    "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
-
 
572
                    "END;"
-
 
573
                End If
588
            End If
574
            End If
-
 
575
        Next
589
 
576
 
-
 
577
        '-- Log Project Merge Action
-
 
578
        If Err.Number = 0 Then
-
 
579
            OraDatabase.ExecuteSQL _
-
 
580
            "BEGIN  LOG_PROJECT_ACTION ( :PROJB, 'merge_release', :USER_ID, :COMMENTS, :RTAG_B );  END;"
590
        End If
581
        End If
591
 
582
 
592
        objEH.CatchORA ( OraSession )     ' sets up LastOraFailed as appropriate
583
    End If
593
 
584
 
594
        ' NOTE, The Touch_Release stored procedure does a commit itself, so we should not do it unless all the ExecuteSQL's we
-
 
595
        ' have just performed, were successful
-
 
596
        If objEH.LastOraFailed = FALSE Then
-
 
597
            '-- Force package state recalculate
-
 
598
            objEH.TryORA ( OraSession )
-
 
599
            OraDatabase.ExecuteSQL _
-
 
600
                "BEGIN  "&_
-
 
601
                "  TOUCH_RELEASE ( :RTAG_B );  "&_
-
 
602
                "END;"
-
 
603
            objEH.CatchORA ( OraSession )
585
    objEH.CatchORA ( OraSession )     ' sets up LastOraFailed as appropriate
604
        End If
-
 
605
 
586
 
-
 
587
    ' NOTE, The Touch_Release stored procedure does a commit itself, so we should not do it unless all the ExecuteSQL's we
606
        Set OraParameter = Nothing
588
    ' have just performed, were successful
607
        OraDatabase.Parameters.Remove "PV_ID"
589
    If objEH.LastOraFailed = FALSE Then
608
        OraDatabase.Parameters.Remove "VIEW_ID"
590
        '-- Force package state recalculate
609
        OraDatabase.Parameters.Remove "RTAG_A"
591
        objEH.TryORA ( OraSession )
610
        OraDatabase.Parameters.Remove "RTAG_B"
592
        OraDatabase.ExecuteSQL _
611
        OraDatabase.Parameters.Remove "USER_ID"
593
            "BEGIN  "&_
612
        OraDatabase.Parameters.Remove "PROJB"
594
            "  TOUCH_RELEASE ( :RTAG_B );  "&_
613
        OraDatabase.Parameters.Remove "COMMENTS"
595
            "END;"
614
        OraDatabase.Parameters.Remove "OPERATION"
596
        objEH.CatchORA ( OraSession )
615
        'Response.write "<br>"& sAddPkgList &"-"& dAddPkgList.Count &"-"& UBound( aFullList )
-
 
616
    End If
597
    End If
-
 
598
 
-
 
599
    Set OraParameter = Nothing
-
 
600
    OraDatabase.Parameters.Remove "PV_ID"
-
 
601
    OraDatabase.Parameters.Remove "VIEW_ID"
-
 
602
    OraDatabase.Parameters.Remove "RTAG_A"
-
 
603
    OraDatabase.Parameters.Remove "RTAG_B"
-
 
604
    OraDatabase.Parameters.Remove "USER_ID"
-
 
605
    OraDatabase.Parameters.Remove "PROJB"
-
 
606
    OraDatabase.Parameters.Remove "COMMENTS"
-
 
607
    OraDatabase.Parameters.Remove "OPERATION"
-
 
608
    'Response.write "<br>"& sAddPkgList &"-"& dAddPkgList.Count &"-"& UBound( aFullList )
617
End Sub
609
End Sub
618
'--------------------------------------------------------------------------------------------------------------------------
610
'--------------------------------------------------------------------------------------------------------------------------
619
Function AddTrailingZeros(byval n, byval count)
611
Function AddTrailingZeros(byval n, byval count)
620
    if len(n) >= count then
612
    if len(n) >= count then
621
        AddTrailingZeros = n
613
        AddTrailingZeros = n
Line 640... Line 632...
640
 
632
 
641
' Get release details
633
' Get release details
642
Call GetFormDetails ( parRtagA, objRelCollectorA )
634
Call GetFormDetails ( parRtagA, objRelCollectorA )
643
Call GetFormDetails ( parRtagB, objRelCollectorB )
635
Call GetFormDetails ( parRtagB, objRelCollectorB )
644
setActiveProject (objRelCollectorB.Item("proj_id"))
636
setActiveProject (objRelCollectorB.Item("proj_id"))
-
 
637
isMergable = releaseIsMergable(objRelCollectorB.Item("official"))
645
 
638
 
646
If (Request("btn") = "Merge") Then
639
If (Request("btn") = "Merge") AND isMergable Then
647
    Call MergePackages ( objRelCollectorB.Item("official") )
640
    Call MergePackages ()
648
End If
641
End If
649
 
642
 
650
If Request("btn") = "Swap Compare" Then
643
If Request("btn") = "Swap Compare" Then
651
    Call OpenInWindow ( ScriptName &"?rtagA="& parRtagB &"&rtagB="& parRtagA )
644
    Call OpenInWindow ( ScriptName &"?rtagA="& parRtagB &"&rtagB="& parRtagA )
652
End If
645
End If
Line 944... Line 937...
944
                                                </td>
937
                                                </td>
945
                                                <td width="1" align="right" bgcolor="#DAD7C8" nowrap>
938
                                                <td width="1" align="right" bgcolor="#DAD7C8" nowrap>
946
                                                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
939
                                                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
947
                                                        <tr>
940
                                                        <tr>
948
                                                            <td>
941
                                                            <td>
949
                                                                <%If (objRelCollectorB.Item("official") <> "Y" AND objRelCollectorB.Item("official") <> "C" ) AND (canActionControlInProject("MergeRelease")) Then%>
-
 
950
                                                                    <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
-
 
951
                                                                <%End If%>
942
                                                                <%If isMergable Then%>
952
                                                            </td>
-
 
953
                                                            <td>
-
 
954
                                                                <%If (objRelCollectorB.Item("official") = "C" ) AND (canActionControlInProject("MergeReleaseForCCB")) Then%>
-
 
955
                                                                    <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
943
                                                                    <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
956
                                                                <%End If%>
944
                                                                <%End If%>
957
                                                            </td>
945
                                                            </td>
958
                                                            <td>
946
                                                            <td>
959
                                                                <input type="submit" name="btn" value="Exit" class="form_btn_comp">
947
                                                                <input type="submit" name="btn" value="Exit" class="form_btn_comp">
Line 1211... Line 1199...
1211
                                                                    <input type="hidden" id="UNDOCOLORA_<%=rowId%>" value="<%=colorA%>">
1199
                                                                    <input type="hidden" id="UNDOCOLORA_<%=rowId%>" value="<%=colorA%>">
1212
                                                                </td>
1200
                                                                </td>
1213
 
1201
 
1214
                                                                <%
1202
                                                                <%
1215
                                                                Dim pkgADisplayControl
1203
                                                                Dim pkgADisplayControl
1216
                                                                pkgADisplayControl = objRelCollectorB.Item("official") <> "Y"
1204
                                                                pkgADisplayControl = isMergable
1217
                                                                If IsNull( changeType ) OR (changeType = "A")  OR (changeType = "0") Then pkgADisplayControl = FALSE
1205
                                                                If IsNull( changeType ) OR (changeType = "A")  OR (changeType = "0") Then pkgADisplayControl = FALSE
1218
                                                                If isaSdk Then pkgADisplayControl = FALSE
1206
                                                                If isaSdk Then pkgADisplayControl = FALSE
1219
                                                                %>
1207
                                                                %>
1220
                                                                <td bgcolor="#F5F5F5">
1208
                                                                <td bgcolor="#F5F5F5">
1221
                                                                    <%If pkgADisplayControl Then%>
1209
                                                                    <%If pkgADisplayControl Then%>
Line 1228... Line 1216...
1228
                                                                    <input type="hidden" id="CHANGETYPE_<%=rowId%>" value="<%=changeType%>">
1216
                                                                    <input type="hidden" id="CHANGETYPE_<%=rowId%>" value="<%=changeType%>">
1229
                                                                </td>
1217
                                                                </td>
1230
 
1218
 
1231
                                                                <%
1219
                                                                <%
1232
                                                                Dim pkgBDisplayControl
1220
                                                                Dim pkgBDisplayControl
1233
                                                                pkgBDisplayControl = objRelCollectorB.Item("official") <> "Y"
1221
                                                                pkgBDisplayControl = isMergable
1234
                                                                If changeType = "R" Then pkgBDisplayControl = FALSE
1222
                                                                If changeType = "R" Then pkgBDisplayControl = FALSE
1235
                                                                If isaSdk Then pkgBDisplayControl = FALSE
1223
                                                                If isaSdk Then pkgBDisplayControl = FALSE
1236
                                                                %>
1224
                                                                %>
1237
                                                                <td bgcolor="#F5F5F5">
1225
                                                                <td bgcolor="#F5F5F5">
1238
                                                                    <%If pkgBDisplayControl Then%>
1226
                                                                    <%If pkgBDisplayControl Then%>