<%@ page language="C#" masterpagefile="~/MasterPages/Main.master" autoeventwireup="true" inherits="POS_ApproveClaimsATM, App_Web_qdtis3h1" maintainscrollpositiononpostback="false" viewStateEncryptionMode="Always" %>
<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
        <tr align="center">
            <td valign="top">
                <!------------------------------------body St  ---------------------------------------------->
                <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                    <tr>
                        <td>
                            Approve ATM Claims
                        </td>
                    </tr>
                </table>
                <br/>
                <!------------------------------------body End1 ----------------------------------------------->
                <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                    <tr>
                        <td align="center">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                <tr>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                <tr style="display:none">
                                    <td class="tdNormal">
                                        Claim Type
                                    </td>
                                    <td class="tdNormal" colspan=4>
                                        <asp:RadioButton ID="rdATM" AutoPostBack=true Text="ATM" GroupName=1 runat="server" Checked=true 
                                            oncheckedchanged="rdATM_CheckedChanged"/>
                                        <asp:RadioButton ID="rdPOS" AutoPostBack=true Text="POS" GroupName=1 runat="server" 
                                            oncheckedchanged="rdPOS_CheckedChanged" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal">
                                        Claim ID <span style="color:Red">*</span>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtClaimID" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        
                                        SAMA Claim ID <span style="color:Red">*</span>
                                        
                                    </td>
                                    <td class="tdNormal">
                                        
                                        <asp:TextBox ID="txtOrgClaimID" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                        
                                    </td>
                                </tr>
                                <tr runat="server" id="rowATM">
                                    <td class="tdNormal">
                                        Reference Number
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtReference" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Card Number <span style="color:Red">*</span>
                                    </td>
                                    <td class="tdNormal">
                                        <asp:TextBox ID="txtCardNumber" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr runat="server" id="rowATM2">
                                    <td class="tdNormal">
                                        ATM No <span style="color:Red">*</span>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtATMNo" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Claim Event Type</td>
                                    <td class="tdNormal">
                                     <asp:RadioButton ID="rdClaimOnUS" Text="On-Us" GroupName="rd" runat="server" 
                                             AutoPostBack="False" Checked="True" />
                                         <asp:RadioButton ID="rdClaimOffUs" Text="Off-Us " GroupName="rd" runat="server" 
                                             AutoPostBack="False" />
                                     
                                    </td>
                                </tr>
                                <tr runat="server" id="rowPOS">
                                    <td class="tdNormal">
                                        Client Number
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtClientNo" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Terminal ID
                                    </td>
                                    <td class="tdNormal">
                                        <asp:TextBox ID="txtTermID" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr runat="server" id="rowPOS2">
                                    <td class="tdNormal">
                                        Retailer ID
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtRetailerID" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Card Number
                                    </td>
                                    <td class="tdNormal">
                                        <asp:TextBox ID="txtCardPOS" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr runat="server" id="rowPOS3">
                                    <td class="tdNormal">
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Search Type
                                    </td>
                                    <td class="tdNormal">
                                        <asp:RadioButton ID="rdCH" runat="server" GroupName="aaa" Text="Card Holder" 
                                            Checked="True" />
                                        <asp:RadioButton ID="rdMER" runat="server" GroupName="aaa" Text="Merchant" />
                                    </td>
                                </tr> 
                                <tr>
                                    <td class="tdNormal">
                                        Claim Status
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlClaimType" runat="server" DataTextField="CLAIM_STATUS_DESC" 
                                        Width="250px" DataValueField="CL_CODE" class="fieldNormal" AutoPostBack="True" 
                                            onselectedindexchanged="ddlClaimType_SelectedIndexChanged" ></asp:DropDownList>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        
                                        SAMA Status</td>
                                    <td class="tdNormal">
                                        
                                        <asp:DropDownList ID="ddlSamaStatuses" runat="server" DataTextField="status_desc" 
                                        Width="250px" DataValueField="status_code" class="fieldNormal" 
                                            AutoPostBack="False" Enabled="False" ></asp:DropDownList>
                                        
                                    </td>
                                </tr>

                                <tr>
                                    <td class="tdNormal">
                                        Claim Type</td>
                                    <td>
                                        <asp:DropDownList ID="ddlClaimType2" runat="server" Height="16px" Width="246px"
                                        DataTextField="CLAIM_TYPE"
                                        DataValueField="CT_CODE"
                                        class="fieldNormal">
                                        </asp:DropDownList>
                                    </td>
                                    <td class="tdNormal">
                                        &nbsp;</td>
                                    <td class="tdNormal">
                                        
                                     Search Type</td>
                                    <td class="tdNormal">
                                        
                                        <asp:RadioButton ID="rdOnUs" runat="server" GroupName="aa" Text="On Us" Checked="True" 
                                                        Enabled="False" />
                                        <asp:RadioButton ID="rdOther" runat="server" GroupName="aa" Text="Others" 
                                            Enabled="False" />
                                        
                                    </td>
                                </tr>
                                 <tr>
                                    <td class="tdNormal">
                                        Claim From Date&nbsp;
                                    </td>
                                    <td>
                                        <uc1:DatePicker ID="dtTranDateFrom" runat="server" width="250" />
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        Claim To Date 
                                    </td>
                                    <td class="tdNormal">
                                         <uc1:DatePicker ID="dtTranDateTo" runat="server" width="250" />
                                    </td>
                                </tr>

                                <tr>
                                   <td class="tdNormal">
                                        SAMA From Date</td>
                                    <td>
                                        
                                        <uc1:datepicker id="dtSamaFromDate" runat="server" width="250" />
                                        
                                    </td>
                                    
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                        
                                                        Event</td>
                                    <td class="tdNormal">
                                        
                                                    <asp:DropDownList ID="ddlEvents"    Enabled="False" runat="server" DataTextField="evant_name" AutoPostBack="True"
                                                            Width="250px" DataValueField="re_code" class="fieldNormal" onselectedindexchanged="ddlEvents_SelectedIndexChanged" 
                                                             >
                                                    </asp:DropDownList>
                                        
                                    </td>
                                </tr>


                                <tr>
                                    <td class="tdNormal">
                                        
                                                        SAMA to Date</td>
                                    <td>
                                        
                                        <uc1:datepicker id="dtSameToDate" runat="server" width="250" />
                                        
                                    </td>
                                    <td class="tdNormal">
                                        &nbsp;</td>
                                    <td class="tdNormal">
                                        
                                                        ATM Type</td>
                                    <td class="tdNormal">
                                        
                                                    <asp:DropDownList ID="ddlATM_Type" runat="server" Enabled="False" Height="16px" 
                                                        Width="232px" onselectedindexchanged="ddlATM_Type_SelectedIndexChanged">
                                                        <asp:ListItem Value="0">------ All ------</asp:ListItem>
                                                        <asp:ListItem Value="1">Deposit</asp:ListItem>
                                                        <asp:ListItem Value="4">Withdrawal</asp:ListItem>
                                                    </asp:DropDownList>
                                        
                                    </td>
                                </tr>


                                <tr>
                                    <td class="tdNormal">
                                        &nbsp;</td>
                                    <td class="tdNormal">
                                        
                                                        &nbsp;</td>
                                    <td class="tdNormal">
                                        
                                        &nbsp;</td>
                                </tr>


                                <tr>
                                    <td colspan="5" style="text-align: center">
                                        <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="Btn_L_Normal"
                                            OnClientClick="" OnClick="btnSearch_Click" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                     <%--   <asp:Button ID="btnGenReport" runat="server" Text="Generate Report" CssClass="Btn_L_Normal"
                                            OnClientClick="" OnClick="btnGenReport_Click" Width="128px" />--%>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <asp:Label ID="lblError" runat="server" Text="" class="fieldError"></asp:Label>
                            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                <tr>
                                    <td class="tdNormal" colspan="5">
                                        <asp:GridView ID="GridView1" CssClass="gridMaster" Width ="100%" runat="server" AutoGenerateColumns="False"
                                            DataKeyNames="claim_id" AllowPaging="True" AllowSorting="True" CellPadding="4"
                                            ForeColor="#333333" GridLines="None" EmptyDataText="There are no Results" OnRowCommand="GridView1_RowCommand"
                                            OnRowCreated="GridView1_RowCreated"  >
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                            <Columns>
                                                <asp:BoundField DataField="claim_id" HeaderText="Claim ID" />
                                                <asp:BoundField DataField="card_number" HeaderText="Card No" />
                                                <asp:BoundField DataField="tran_date" HeaderText="Tran Date" />
                                                <asp:BoundField DataField="tran_amount" HeaderText="Tran Amount" />
                                                <asp:BoundField DataField="rrn" HeaderText="Reference No" />
                                                <asp:BoundField DataField="claim_status_desc" HeaderText="Status" />
                                                 <asp:BoundField DataField="sama_claim_status" HeaderText="SAMA Status" />
                                                 <asp:BoundField DataField="sama_claim_id" HeaderText="SAMA claim Id" />
                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="a" Text="Approve"
                                                    ImageUrl="~/Images/approve.jpg"></asp:ButtonField>
                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="d" Text="Decline"
                                                    ImageUrl="~/Images/reject.jpg"></asp:ButtonField>
                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="r" Text="Reset"
                                                    ImageUrl="~/Images/AR/update.jpg"></asp:ButtonField>
                                                <asp:BoundField DataField="product" HeaderText="" />
                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="i" Text="Investigate"
                                                    ImageUrl="~/Images/document_view.jpg"></asp:ButtonField>
                                                <%--<asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="s" Text="Send Notification"
                                                    ImageUrl="~/Images/AR/window_split_ver.gif"></asp:ButtonField>--%>
                                                <asp:BoundField DataField="claim_amount" HeaderText="Claim Amount" />
                                                <asp:BoundField DataField="claim_status" HeaderText="claim status" />
                                               
                                            </Columns>
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                            <EditRowStyle BackColor="#999999" />
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                        </asp:GridView>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal" style="width: 20%">
                                        Go To Page:
                                        <asp:DropDownList ID="ddlPages" runat="server" class="fieldNormal" AutoPostBack="True"
                                            Width="50px" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                    <td class="tdNormal">
                                    </td>
                                </tr>
                            </table>
                            <asp:Panel ID="pnlApprove" runat="server" Width="100%" Visible="false">
                                <fieldset id="addItem">
                                    <legend id="addItem">Approve Details</legend>
                                </fieldset>
                                <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Suggested Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                                <asp:TextBox ID="txtSugAmt" Enabled="false" runat="server" class="fieldNormal" Width="80%"></asp:TextBox>
                                        </td>
                                         <td class="tdNormal" style="width: 15%">
                                            <asp:DropDownList ID="ddlGLtype" Enabled="false" runat="server" Width="50%" Visible="false">
                                                <asp:ListItem Value="1">Dr</asp:ListItem>
                                                <asp:ListItem Value="2">Cr</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                     </tr>
                                     <tr>   
                                       
                                        <td class="tdNormal" style="width: 15%">
                                            <asp:Label ID="lblFrom" runat="server" class="fieldNormal" Text="From  (Dr)"></asp:Label> 
                                        </td>
                                        <td class="tdNormal" style="width: 40%">                                       
                                            <asp:DropDownList ID="ddlFromAcct" Enabled="false" runat="server" DataTextField="acct_desc" 
                                                DataValueField="acct" class="fieldNormal"></asp:DropDownList>                                            
                                        </td>
                                         <td class="tdNormal" style="width: 30%">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                       <td class="tdNormal" style="width: 15%">
                                            <asp:Label ID="lblTo" runat="server" class="fieldNormal" Text="To  (Cr)"></asp:Label>    
                                        </td>
                                        <td class="tdNormal" style="width: 40%">                                    
                                            <asp:DropDownList ID="ddlToAcct" Enabled="false" runat="server" DataTextField="acct_desc" 
                                                DataValueField="acct" class="fieldNormal"></asp:DropDownList>
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                        </td>
                                    </tr>
                                   
                                    
                                </table>
                                <%--<table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Suggested Amount
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                                <asp:TextBox ID="txtSugAmt" runat="server" class="fieldNormal" Width="250"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            <asp:Label ID="lblApprove" runat="server" class="fieldNormal" Text="Label"></asp:Label>
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:DropDownList ID="ddlATMAcc" runat="server" DataTextField="acct_desc" 
                                                DataValueField="acct" class="fieldNormal"></asp:DropDownList>
                                            </td>
                                    </tr>
                                </table>--%>
                                <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnCancelPost" runat="server" Text="   Cancel   " class="Btn_M_Normal"
                                                CausesValidation="False" OnClick="btnCancelPost_Click" />
                                            <asp:Button ID="btnSavePost" runat="server" Text="   Save   " class="Btn_M_Normal"
                                                OnClick="btnSavePost_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <!------------------------------------body End2 ----------------------------------------------->
                            <br>
                        </td>
                    </tr>
                </table>
                <!------------------------------------body End2 ----------------------------------------------->
            </td>
        </tr>
    </table>
</asp:Content>