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

<%@ 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>New Internal Payment Request</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;
    }
    
    .clsLink
    {
        FONT-SIZE:8.5pt;
        FONT-FAMILY:Tahoma;
        TEXT-DECORATION:underline;
        COLOR: black;
    }        
    </style>

    <script language="javascript" src="./scriptsw.js" type="text/javascript"></script>

    <script type="text/javascript">
        function checkCancel(e)
        {
            // routine to confirm cancel
        	e.processOnServer = false; 
            if (confirm("Are you sure you wish to Cancel ?")) 
            {
                e.processOnServer = true;
                btnCancel.autoPostBack = true;
            }
        }       
        
        function prepareViewDetailInfo(pkid)
        {
            // routine to prepare a line for editing - click
            document.forms[0].rowId.value = pkid;
            document.forms[0].submit();
        }
                
        function viewDetailInfo()
        {
            // routine to popup Detail Information Dialog
            var url = 'NewIntPaymentRequestDetail.aspx?guidId=' + document.forms[0].guidId.value + '&rowId=' + document.forms[0].rowId.value;
            document.forms[0].rowId.value = '';
            var returnValue = openDialog(url,635,760,'Internal Payment Request - Detail Information', processViewDetail);
            if (returnValue != 'NOTIE')
                processViewDetail(returnValue);
        }
        
        function processViewDetail(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
               document.forms[0].submit();
            }
        }        
    </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: 87%;">
            <tr>
                <td id="mainview" style="vertical-align: top; width: 100%; height: 100%;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="viewTable">
                        <tr style="vertical-align: top; background-color: #666666; font-weight: bold; color: White;
                            font-family: Tahoma;">
                            <td id="viewheader" style="width: 840px; height: 30px; background-color: #ffcc00;
                                font-size: 10pt;">
                                New Internal Payment Request
                                <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: 840px; vertical-align: top;">
                                <fieldset style="margin-left: 3px">
                                    <legend style="font-weight: bold; font-size: 8pt; color: Black; font-family: Arial">
                                        Request Details</legend>
                                    <table id="HeaderTable" border="0" cellpadding="1" cellspacing="3" style="width: 100%;">
                                        <tr>
                                            <td style="width: 109px;" class="clsLabel">
                                                Requestor:
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtRequestor" runat="server" Width="419px" CssClass="clsInput"></asp:TextBox></td>
                                            <td style="width: 65px;" class="clsLabel">
                                                Notes:
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 109px;" class="clsLabel">
                                                Status:
                                            </td>
                                            <td style="width: 591px;">
                                                <asp:Label ID="lblStatus" runat="server" Text="New Request" CssClass="clsInput"></asp:Label></td>
                                            <td rowspan="1">
                                                <asp:TextBox ID="memNotes" runat="server" Height="61px" TextMode="MultiLine" Width="353px"
                                                    CssClass="clsInput"></asp:TextBox></td>
                                        </tr>
                                    </table>
                                </fieldset>
                                <fieldset style="margin-left: 3px;">
                                    <legend style="font-weight: bold; font-size: 8pt; color: black; font-family: Arial">
                                        Detail Information</legend>
                                    <table id="detailTable" border="0" cellpadding="1" cellspacing="0" style="width: 92%;">
                                        <tr>
                                            <td style="width: 943px">
                                                <dxwdc:ASPxButton ID="btnAdd" runat="server" TabIndex="0" Text="Add Entry" OnClick="btnAdd_Click">
                                                </dxwdc:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 943px">
                                                <asp:DataGrid ID="aspGridDetailList" 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="aspGridDetailList_ItemDataBound"
                                                    Width="859px" BorderColor="Black" BorderWidth="1px" ShowFooter="True">
                                                    <HeaderStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                                                    <Columns>
                                                        <asp:BoundColumn DataField="Description" HeaderText="Description" ReadOnly="True">
                                                            <HeaderStyle Width="120px" />
                                                        </asp:BoundColumn>
                                                        <asp:TemplateColumn HeaderText="Debit Prog/Project">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" Text=''></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle Width="200px" />
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="DebitActivityDesc" HeaderText="Debit Activity" ReadOnly="True">
                                                            <HeaderStyle Width="150px" />
                                                        </asp:BoundColumn>
                                                        <asp:TemplateColumn HeaderText="Credit Prog/Project">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle Width="200px" />
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="CreditActivityDesc" HeaderText="Credit Activity" FooterText="Totals:" ReadOnly="True">
                                                            <FooterStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Width="150px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="USDRate" DataFormatString="{0:N2}" HeaderText="Amount"
                                                            ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Right" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Right" />
                                                            <FooterStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="DebitProgrammeDesc" HeaderText="DebitProgrammeDesc" ReadOnly="True"
                                                            Visible="False"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="DebitProjectDesc" HeaderText="DebitProjectDesc" ReadOnly="True"
                                                            Visible="False"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="CreditProgrammeDesc" HeaderText="CreditProgrammeDesc"
                                                            ReadOnly="True" Visible="False"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="CreditProjectDesc" HeaderText="CreditProjectDesc" ReadOnly="True"
                                                            Visible="False"></asp:BoundColumn>
                                                    </Columns>
                                                    <SelectedItemStyle BackColor="Green" />
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 943px">
                                                <table border="0" cellpadding="0" cellspacing="1">
                                                    <tr>
                                                        <td style="width: 87px; height: 22px">
                                                            <dxwdc:ASPxButton ID="btnOK" runat="server" TabIndex="0" Text="OK" Width="98px" OnClick="btnOK_Click">
                                                                <ClientSideEvents>
                                                                    <Click>
                                                                        function(source,e){ e.processOnServer = true; }</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                        <td style="width: 85px; height: 22px;">
                                                            <dxwdc:ASPxButton ID="btnCancel" runat="server" TabIndex="0" Text="Cancel" Width="98px"
                                                                Default="True" OnClick="btnCancel_Click" AutoPostBack="False">
                                                                <ClientSideEvents>
                                                                    <Click>
                                                                        function(source,e){checkCancel(e);}</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                        <td>
                                                        <dxwdc:ASPxButton ID="btnSave" runat="server" TabIndex="0" Text="Save to Drafts" Width="98px"
                                                                Default="True" ToolTip="click here to Save Entry to Drafts for Use Later" OnClick="btnSave_Click">
                                                </dxwdc:ASPxButton>

                                                        </td>
                                                    </tr>
                                                </table>
                                                </td>
                                        </tr>
                                    </table>
                                </fieldset>
                                <asp:HiddenField ID="guidId" runat="server" EnableViewState="False" />
                                <asp:HiddenField ID="rowId" runat="server" EnableViewState="False" />
                            </td>
                        </tr>
                    </table>
    </form>
</body>
</html>
