<%@ page language="C#" autoeventwireup="true" inherits="PastelExport, App_Web_j58pc9zj" enableEventValidation="false" %>

<%@ Register Assembly="DevExpress.Web.ASPxGrid.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxGrid" TagPrefix="dxwg" %>
<%@ Register Assembly="DevExpress.Web.ASPxDataControls.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxDataControls" TagPrefix="dxwdc" %>
<% @Outputcache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head runat="server">
    <title>Pastel Export</title>
    <base target="_self" />
    <style type="text/css">
    .clsLabel
    {
        FONT-SIZE: 8.5pt;
        FONT-FAMILY:Tahoma;
       FONT-WEIGHT: Bold;
    }
    .clsInput
    {
       FONT-SIZE:8.5pt;
       FONT-FAMILY:Tahoma;
    } 
        #Button1
        {
            width: 146px;
        }
        #btnSelectAll
        {
            width: 108px;
        }
    </style>
    <script language="javascript" src="./scriptsw.js" type="text/javascript"></script>
    <script type="text/javascript">
        function viewRequestInfo(pkid, type)
        {
            // routine to popup Detail Information Dialog
            if (type == '1')
            {
                var url = 'PaymentRequest.aspx?reqId=' + pkid;
                var returnValue = openDialog(url,920,600,'Payment Request Information', processViewRequest);
                if (returnValue != 'NOTIE')
                    processViewRequest(returnValue);
            }
            if (type == '2')
            {
                var url = 'IntPaymentRequest.aspx?reqId=' + pkid;
                var returnValue = openDialog(url,920,600,'Internal Payment Request Information', processViewRequest);
                if (returnValue != 'NOTIE')
                    processViewRequest(returnValue);
            }
        }
        
        function processViewRequest(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
        }
        function selectAll(button) 
        {
            var text = button.value; 
            var newText = 'UnSelect All';
            var flag = true;           
            if (text == newText)
            {
                newText = 'Select All';
                flag = false;
            }
            button.value = newText;
	        var i;
	        for (i=0; i < document.forms[0].elements.length; i++) 
	        {
	            if (document.forms[0].elements[i].type == 'checkbox')
		        {
			        document.forms[0].elements[i].checked = flag;
		        }
	        }
	    }
    </script>
</head>
<body style="margin: 0; padding: 0; border: 0;" scroll="auto" onload="if(opener){opener.blockEvents();}" onunload="if(opener){opener.unblockEvents();}">
    <form id="form1" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 700px">
            <tr>
                <td id="mainview" style="vertical-align: top; width: 700px; height: 681px;">
                    <table border="0" cellpadding="0" cellspacing="0" id="viewTable" style="width: 100%">
                        <tr style="vertical-align: top; background-color: #666666; font-weight: bold; color: White;
                            font-family: Tahoma;">
                            <td id="viewheader" style="width: 400px; height: 30px; background-color: #339966;
                                font-size: 10pt;" class="clsLabel">
                                Pastel Exports
                                <dxwdc:ASPxLookAndFeelController ID="ASPxLookAndFeelController1" runat="server" AutoFormatName="Office2003 Silver">
                                    <LookAndFeel Kind="Office2003">
                                        <ElementsSettings DropDownButtonWidth="17px" ScrollBarBackColor="240, 242, 246" ScrollBarMargin="1"
                                            ScrollBarSize="17px" />
                                        <PopupStyle BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt">
                                        </PopupStyle>
                                        <ButtonStyle BackColor="#9997B6" BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt"
                                            ForeColor="Black" Margin="1" UseHotTrackStyle="True" UsePressedStyle="True" Wrap="False">
                                            <PressedStyle BackColor="#FFCA86" BorderColor="Navy" ForeColor="Black">
                                                <Filters>
                                                    <dxwdc:LookAndFeelStyleGradientFilter EndColor="255, 202, 134" StartColor="254, 148, 80" />
                                                </Filters>
                                            </PressedStyle>
                                            <Filters>
                                                <dxwdc:LookAndFeelStyleGradientFilter EndColor="153, 151, 182" StartColor="242, 243, 249" />
                                            </Filters>
                                            <HotTrackStyle BackColor="#FFD599" BorderColor="Navy" ForeColor="Black">
                                                <Filters>
                                                    <dxwdc:LookAndFeelStyleGradientFilter EndColor="255, 213, 153" StartColor="255, 243, 202" />
                                                </Filters>
                                            </HotTrackStyle>
                                        </ButtonStyle>
                                        <LabelStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" />
                                        <EditorStyle BackColor="White" BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt"
                                            ForeColor="Black">
                                        </EditorStyle>
                                        <ScrollBarButtonStyle>
                                            <Filters>
                                                <dxwdc:LookAndFeelStyleGradientFilter EndColor="153, 151, 182" GradientMode="Horizontal"
                                                    StartColor="242, 243, 249" />
                                            </Filters>
                                        </ScrollBarButtonStyle>
                                    </LookAndFeel>
                                </dxwdc:ASPxLookAndFeelController>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 700px; height: 527px; vertical-align: top;">
                                <fieldset>
                                    <legend style="font-weight: bold; font-size: 8pt; color: black; font-family: Arial">
                                        Pastel Exports</legend>
                                    <table id="HeaderTable" border="0" cellpadding="1" cellspacing="0" style="width: 700px">
                                        <tr>
                                            <td style="height: 21px;" class="clsLabel">
                                            <div style="overflow:scroll; height:270px">
                                            <asp:DataGrid ID="aspGrid" runat="server" AutoGenerateColumns="False" Font-Bold="False"
                                                    Font-Italic="False" Font-Names="Tahoma" Font-Overline="False" Font-Size="8pt"
                                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" OnItemDataBound="aspGrid_ItemDataBound"
                                                    Width="700px" BorderColor="Black" BorderWidth="1px">
                                                    <HeaderStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                                                    <Columns>
                                                        <asp:TemplateColumn HeaderText="Generate">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkGenerate" runat="Server" />
                                                            </ItemTemplate>
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Center" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Center" Width="20px" />
                                                        </asp:TemplateColumn> 
                                                        <asp:BoundColumn DataField="DocumentId" HeaderText="Reference" ReadOnly="True">
                                                            <HeaderStyle Width="40px" Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" />
                                                        </asp:BoundColumn>
                                                        <asp:TemplateColumn HeaderText="Type">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle Width="200px" />
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="InfoDesc" HeaderText="Addtional Information" ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" Width="200px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ProgrammeDesc" HeaderText="Programme" ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" Width="100px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ProjectDesc" HeaderText="Project" ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" Width="100px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="FileName" HeaderText="File Name"
                                                            ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Left" Width="100px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="DocumentType" HeaderText="DocumentType" Visible="False">
                                                        </asp:BoundColumn>
                                                    </Columns>
                                                </asp:DataGrid>
                                                </div>
                                                </td>
                                        </tr>
                        <tr>
                            <td colspan="4" style="height: 28px">
                                <table border="0" cellpadding="0" cellspacing="1">
                                    <tr>
                                        <td style="width: 85px; height: 22px;">
                                            <input id="btnSelectAll" type="button" value="Select All" onclick="selectAll(this);"/></td>                            
                                        <td style="width: 3956px">
                                            &nbsp;</td>
                                        <td style="width: 87px; height: 22px">
                                            <dxwdc:ASPxButton ID="btnOK" runat="server" TabIndex="0" Text="OK" Width="98px" OnClick="btnOK_Click">
                                            </dxwdc:ASPxButton>
                                        </td>
                                        <td style="width: 85px; height: 22px;">
                                            <dxwdc:ASPxButton ID="btnCancel" runat="server" TabIndex="0" Text="Cancel" Width="98px" Default="True" AutoPostBack="False">
                                                <ClientSideEvents>
                                                    <Click>
                                                        function(source,e){e.processOnServer = false;window.close(); }</Click>
                                                </ClientSideEvents>
                                            </dxwdc:ASPxButton>
                                        </td>
                                    </tr>
                                </table>
                                </td>
                        </tr>
                    </table>
                    </fieldset>
                </td>
            </tr>
            </table> </td> </tr>
        </table>
    </form>
</body>
</html>
