<%@ page language="C#" autoeventwireup="true" inherits="IntPaymentRequestDetail, 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>Internal Request Detail Information</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 addAttachment()
        {
            // routine to popup Attachment Dialog
            var url = 'IntPaymentRequestAttach.aspx';
            var returnValue = openDialog(url,540,215,'Internal Payment Request - Add Attachment', processAddAttachment);
            if (returnValue != 'NOTIE')
                processAddAttachment(returnValue);
        }
        
        function processAddAttachment(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
               document.forms[0].submit();
            }
        }
         
        function deleteAttachment(attachLine)
        {
           if (confirm("Are you sure you wish to remove this attachment ?"))
           {
               // update the update variables
               document.forms[0].updateType.value = 'deleteAttach|' + attachLine;
               document.forms[0].submit();
           }            
        }
        
        function checkDelete(e)
        {
        	e.processOnServer = false; 
            if (confirm("Are you sure you wish to remove this line Item ?")) 
            {
                e.processOnServer = true;
                btnDelete.autoPostBack = true;
            }
        }         
    </script>

</head>
<body style="margin: 0; padding: 0; border: 0;" scroll="no" onload="if(opener){opener.blockEvents();}"
    onunload="if(opener){opener.unblockEvents();}">
    <form id="form1" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 520px">
            <tr>
                <td id="mainview" style="vertical-align: top; width: 500px; height: 681px;">
                    <table border="0" cellpadding="0" cellspacing="0" id="viewTable" style="width: 630px">
                        <tr style="vertical-align: top; background-color: #666666; font-weight: bold; color: White;
                            font-family: Tahoma;">
                            <td id="viewheader" style="height: 30px; width:630px;background-color: #ffcc00; font-size: 10pt;" class="clsLabel">
                                Internal Request Detail Information
                                <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: 500px; height: 600px; vertical-align: top;">
                                <fieldset style="width: 500px">
                                    <legend style="font-weight: bold; font-size: 8pt; color: black; font-family: Arial">
                                        Internal Payment Request Detail Information</legend>
                                    <table id="HeaderTable" border="0" cellpadding="1" cellspacing="0" style="width: 100px">
                                        <tr>
                                            <td class="clsLabel" style="height: 11px">
                                                Request Date:
                                            </td>
                                            <td style="width: 294px; height: 11px;" colspan="3">
                                                <dxwdc:ASPxDateEdit ID="dtRequestDate" runat="server" TabIndex="0" VisibleDate="2007-01-14"
                                                    Width="370px">
                                                    <EditorProperties DaysPadding="0" ShowSeparator="False">
                                                        <FooterStyle BackColor="#D7D7E5">
                                                            <BorderTop Color="149, 149, 170" Style="solid" Width="1px" />
                                                        </FooterStyle>
                                                        <HeaderStyle BorderStyle="None" Font-Bold="True" />
                                                        <DayStyle BorderColor="#F3F4FA" BorderStyle="Solid" BorderWidth="1px" />
                                                        <DayHeaderStyle BackColor="#D7D7E5" Font-Bold="True">
                                                            <BorderTop Color="149, 149, 170" Style="solid" Width="1px" />
                                                            <BorderBottom Color="149, 149, 170" Style="solid" Width="1px" />
                                                        </DayHeaderStyle>
                                                        <SelectedStyle BackColor="#B2B4BF" BorderColor="#9595AA" ForeColor="White">
                                                        </SelectedStyle>
                                                        <FooterButtonStyle BackColor="#D7D7E5">
                                                        </FooterButtonStyle>
                                                        <CalendarStyle BackColor="#F3F4FA">
                                                        </CalendarStyle>
                                                        <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>
                                                    </EditorProperties>
                                                </dxwdc:ASPxDateEdit>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="clsLabel">
                                                Description:
                                            </td>
                                            <td style="width: 294px; height: 10px;" colspan="3">
                                                <asp:TextBox ID="txtDescription" runat="server" Width="516px" CssClass="clsInput" MaxLength="35"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 30px" class="clsLabel">
                                                DR Activity:
                                            </td>
                                            <td style="width: 294px; height: 30px" colspan="3">
                                                <asp:DropDownList ID="debitActivity" runat="server" Width="516px" CssClass="clsInput" AutoPostBack="True">
                                                    <asp:ListItem>[Please select Debit Activity]</asp:ListItem>
                                                </asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 30px" class="clsLabel">
                                                DR Account Allocation:
                                            </td>
                                            <td style="width: 294px; height: 30px" colspan="3">
                                                <asp:DropDownList ID="debitSubActivity" runat="server" Width="516px" CssClass="clsInput" Enabled="False">
                                                    <asp:ListItem>[Please select Debit Account Allocation]</asp:ListItem>
                                                </asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td class="clsLabel">
                                                CR Programme:
                                            </td>
                                            <td style="width: 294px; height: 43px" colspan="3">
                                                <asp:DropDownList ID="creditProgramme" runat="server" Width="516px" CssClass="clsInput"
                                                    AutoPostBack="True" OnSelectedIndexChanged="creditProgramme_SelectedIndexChanged">
                                                    <asp:ListItem>Documentation</asp:ListItem>
                                                    <asp:ListItem>Test</asp:ListItem>
                                                </asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td class="clsLabel">
                                                CR Project:
                                            </td>
                                            <td style="width: 294px; height: 43px;" colspan="3">
                                                <asp:DropDownList ID="creditProject" runat="server" Width="516px" CssClass="clsInput"
                                                    AutoPostBack="True" Enabled="False" OnSelectedIndexChanged="creditProject_SelectedIndexChanged">
                                                    <asp:ListItem Value="0">[Please select Credit Project]</asp:ListItem>
                                                    <asp:ListItem>Project1</asp:ListItem>
                                                    <asp:ListItem>Project2</asp:ListItem>
                                                </asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td class="clsLabel">
                                                CR Activity:
                                            </td>
                                            <td style="width: 294px; height: 30px" colspan="3">
                                                <asp:DropDownList ID="creditActivity" runat="server" Width="516px" CssClass="clsInput"
                                                    Enabled="False" AutoPostBack="True" OnSelectedIndexChanged="creditActivity_SelectedIndexChanged">
                                                    <asp:ListItem Value="0">[Please select Credit Activity]</asp:ListItem>
                                                    <asp:ListItem>Documentation</asp:ListItem>
                                                    <asp:ListItem>Test</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 30px" class="clsLabel">
                                                CR Account Allocation:
                                            </td>
                                            <td style="width: 294px; height: 30px" colspan="3">
                                                <asp:DropDownList ID="creditSubActivity" runat="server" Width="516px" CssClass="clsInput"
                                                    Enabled="False">
                                                    <asp:ListItem Value="0">[Please select Credit Account Allocation]</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="clsLabel">
                                                Amount:
                                            </td>
                                            <td colspan="3" style="width: 294px; height: 30px">
                                                <asp:TextBox ID="txtAmount" runat="server" Width="516px" CssClass="clsInput"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 79px;" class="clsLabel">
                                                Notes:
                                            </td>
                                            <td style="width: 294px; height: 79px" colspan="3">
                                                <asp:TextBox ID="memNotes" runat="server" Height="57px" TextMode="MultiLine" Width="519px"
                                                    CssClass="clsInput"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <table id="attachmentTable" border="0" cellpadding="1" cellspacing="0" style="width: 500px;">
                                                    <tr>
                                                        <td>
                                                            <dxwdc:ASPxButton ID="btnAdd" runat="server" TabIndex="0" Text="Add Attachment" AutoPostBack="False">
                                                                <ClientSideEvents>
                                                                    <Click>
                                                                        function(source,e){ addAttachment(); e.processOnServer = false; }</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:GridView ID="attachGrid" 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" BorderColor="Black"
                                                                BorderWidth="1px" Width="599px">
                                                                <HeaderStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                                                                <Columns>
                                                                    <asp:BoundField DataField="Description" HeaderText="Description" ReadOnly="True" />
                                                                    <asp:HyperLinkField DataNavigateUrlFields="Hyperlink" DataTextField="HyperDesc" DataNavigateUrlFormatString="{0}"
                                                                        Target="_blank">
                                                                        <ItemStyle Width="100px" HorizontalAlign="Center"/>
                                                                        <ControlStyle CssClass="clsLink" />
                                                                    </asp:HyperLinkField>
                                                                    <asp:BoundField DataField="DeleteLink" HtmlEncode="False">
                                                                        <ItemStyle HorizontalAlign="Center" Width="100px"/>
                                                                        <ControlStyle CssClass="clsLink" />
                                                                    </asp:BoundField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </td>
                                                    </tr>
                                                                                            <tr>
                                            <td colspan="4">
                                                <table border="0" cellpadding="0" cellspacing="1">
                                                    <tr>
                                                    <td colspan="4" style="width: 75%">
                                                            &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; if (opener){opener.dialogWin.returnedValue = 'undefined';} else
                                                                        {window.returnValue = 'undefined';} window.close(); }</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                        <td style="width: 87px; height: 22px">
                                                            <dxwdc:ASPxButton ID="btnDelete" runat="server" TabIndex="0" Text="Delete" Width="98px" OnClick="btnDelete_Click"
                                                                Font-Bold="False" AutoPostBack="False" ToolTip="click here to Delete this Line Item">
                                                                <ClientSideEvents>
                                                                    <Click>
                                                                        function(source,e) { checkDelete(e); }</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

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