<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="GLSetup.aspx.cs" Inherits="Business_GLSetup"  %>

<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>
                                        GL Setup</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>
                                                    <td class="tdNormal">
                                                        Search Type
                                                    </td>
                                                    <td colspan=4>
                                                        <asp:RadioButton ID="rdEvent" runat="server" GroupName="aa" Text="Events" 
                                                            Checked="True" AutoPostBack="True" oncheckedchanged="rdEvent_CheckedChanged" />
                                                        <asp:RadioButton ID="rdChannel" runat="server" GroupName="aa" Text="Channels" 
                                                            AutoPostBack="True" oncheckedchanged="rdChannel_CheckedChanged" />
                                                        <asp:RadioButton ID="rdPOS1" runat="server" GroupName="aa" Text="POS Settlement" 
                                                            AutoPostBack="True" oncheckedchanged="rdPOS1_CheckedChanged" />
                                                        <%--<asp:RadioButton ID="rdPOS2" runat="server" GroupName="aa" Text="POS Rental" 
                                                            AutoPostBack="True" oncheckedchanged="rdPOS2_CheckedChanged" />--%>
                                                 </td>
                                                </tr>
                                                <tr runat="server" id="eventsRow">
                                                    <td class="tdNormal" style="width:15%">
                                                        Event
                                                    </td>
                                                    <td class="tdNormal" colspan="2">
                                                        <asp:DropDownList ID="ddlEvents" runat="server" DataTextField="evant_name" 
                                                            Width="250px" DataValueField="re_code" class="fieldNormal">
                                                        </asp:DropDownList>
                                                 </td>
                                                 <td class="tdNormal" style="width:15%">Type</td>
                                                 <td class="tdNormal" style="width:30%">
                                                    <asp:DropDownList ID="ddlType" runat="server" DataTextField="type_nm" 
                                                            Width="250px" DataValueField="type_cd" class="fieldNormal">
                                                        </asp:DropDownList>
                                                 </td>
                                                </tr>
                                                <tr runat="server" id="channelsRow">
                                                    <td class="tdNormal">
                                                        Channel
                                                    </td>
                                                    <td colspan=4>
                                                    <asp:DropDownList ID="ddlChannels" runat="server" DataTextField="channel_name" 
                                                            Width=250px DataValueField="rc_code" class="fieldNormal">
                                                    </asp:DropDownList>
                                                 </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="5" style="text-align:center">
                                                        <asp:Button ID="Button1" runat="server" Text="Search" CssClass="Btn_L_Normal" 
                                                            onclick="Button1_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                        <br />
                                        <asp:Label ID="lblError" runat="server" Text="" class="fieldError"></asp:Label>
                                        <asp:Panel ID="pnlResult" runat="server" Width="100%" Visible="false">
                                            <fieldset id="addItem">
                                             <legend id="addItem">GL Setup Search Results</legend>
                                            </fieldset>
                                            <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"
                                                             AllowPaging="True" AllowSorting="True" CellPadding="4" 
                                                            ForeColor="#333333" GridLines="None" EmptyDataText="There are no Results" 
                                                            DataKeyNames="ga_code" onrowcommand="GridView1_RowCommand" 
                                                            onrowcreated="GridView1_RowCreated" 
                                            onselectedindexchanged="GridView1_SelectedIndexChanged">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="rc_code" HeaderText="" />
                                                                <asp:BoundField DataField="re_code" HeaderText="" />
                                                                <asp:BoundField DataField="acct_type" HeaderText="" />
                                                                <asp:BoundField DataField="acct_name" HeaderText="Account Name" />
                                                                <asp:BoundField DataField="channel" HeaderText="Channel" />
                                                                <asp:BoundField DataField="event" HeaderText="Event" />
                                                                <asp:BoundField DataField="acct_number" HeaderText="Account Number" />
                                                                <asp:BoundField DataField="re_match_result" HeaderText="Match Result" />
                                                                <asp:BoundField DataField="match_result" HeaderText="Match Result" />
                                                                <asp:BoundField DataField="gl_posting_req" HeaderText="Posting Required" />
                                                                <asp:BoundField DataField="CHANNEL_TYPE" HeaderText="Channel Type" />
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="a" 
                                                                    Text="Posting Required" ImageUrl="~/Images/icon_approve.png" >
                                                                </asp:ButtonField>
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="r" 
                                                                    Text="Posting Not Required" ImageUrl="~/Images/reject.jpg" >
                                                                </asp:ButtonField>
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="e" 
                                                                    Text="Edit" ImageUrl="~/Images/edit.jpg" >
                                                                </asp:ButtonField>
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="d" 
                                                                    Text="Delete" ImageUrl="~/Images/delete.jpg" >
                                                                </asp:ButtonField>
                                                                <asp:BoundField DataField="GL_CHANNEL_TYPE" HeaderText="" />
                                                            </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>
                                            <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgForm">
                                                <tr>
                                                    <td>
                                                        <asp:Button ID="btnAdd" runat="server" Text="     Add     " 
                                                            class="Btn_M_Normal" onclick="btnAdd_Click"/>
                                                </tr>
                                            </table>
                                        </asp:Panel>    
                                        <asp:Panel ID="pnlControls" runat="server" Width="100%" Visible="false">
                                            <fieldset id="addItem">
                                                <legend id="addItem">GL Account Details</legend>
                                            </fieldset>
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr runat="server" id="row1">
                                                    <td class="tdNormal">
                                                        Search Type
                                                    </td>
                                                    <td colspan=4>
                                                        <asp:RadioButton ID="rdEvents1" runat="server" GroupName="a" Text="Events" 
                                                            Checked="True" AutoPostBack="True" oncheckedchanged="rdEvents1_CheckedChanged" />
                                                        <asp:RadioButton ID="rdChannels1" runat="server" GroupName="a" Text="Channels" 
                                                            AutoPostBack="True" oncheckedchanged="rdChannels1_CheckedChanged" />
                                                        <asp:RadioButton ID="rdPOS11" runat="server" GroupName="a" Text="POS Settlement" 
                                                            AutoPostBack="True" oncheckedchanged="rdPOS11_CheckedChanged" />
                                                        <asp:RadioButton ID="rdPOS22" runat="server" GroupName="a" Text="POS Rental" 
                                                            AutoPostBack="True" oncheckedchanged="rdPOS22_CheckedChanged" />
                                                 </td>
                                                </tr>
                                                <tr runat="server" id="eventsRow1">
                                                    <td class="tdNormal">
                                                        Event 
                                                    </td>
                                                    <td class="tdNormal">
                                                        <asp:DropDownList ID="DropDownList1" runat="server" DataTextField="evant_name" 
                                                            Width="200px" DataValueField="re_code" class="fieldNormal">
                                                        </asp:DropDownList>
                                                    </td>
                                                 <td class="tdNormal">Type <asp:DropDownList ID="ddlType2" runat="server" DataTextField="type_nm" 
                                                            Width="200px" DataValueField="type_cd" class="fieldNormal" 
                                                         AutoPostBack="True" onselectedindexchanged="ddlType2_SelectedIndexChanged">
                                                        </asp:DropDownList></td>
                                                 <td class="tdNormal" colspan="2">
                                                    Match Result <asp:DropDownList ID="ddlMatchResult" runat="server" class="fieldNormal" Width="200px" DataTextField="matching" DataValueField="match_code">
                                                        </asp:DropDownList>
                                                 </td>
                                                </tr>
                                                <tr runat="server" id="channelsRow1">
                                                    <td class="tdNormal" style="width:15%">
                                                        Channel
                                                    </td>
                                                    <td class="tdNormal" colspan="2">
                                                        <asp:DropDownList ID="DropDownList2" runat="server" DataTextField="channel_name" 
                                                            Width=250px DataValueField="rc_code" class="fieldNormal">
                                                    </asp:DropDownList></td>
                                                    <td class="tdNormal" style="width:15%">
                                                        &nbsp;</td>
                                                    <td class="tdNormal" style="width:30%">
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:15%">
                                                        Account
                                                    </td>
                                                    <td class="tdNormal" style="width:30%">
                                                        <asp:TextBox ID="txtAccount" runat="server" class="fieldNormal"></asp:TextBox>
                                                    </td>
                                                    <td class="tdNormal" style="width:10%">
                                                        </td>
                                                    <td class="tdNormal" style="width:15%">
                                                        Account Name
                                                    </td>
                                                    <td class="tdNormal" style="width:30%">
                                                        <asp:TextBox ID="txtAccountName" runat="server" class="fieldNormal"></asp:TextBox>
                                                        </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:15%">
                                                        
                                                    </td>
                                                    <td class="tdNormal" style="width:30%">
                                                        
                                                    </td>
                                                    <td class="tdNormal" style="width:10%">
                                                        </td>
                                                    <td class="tdNormal" style="width:15%">
                                                    </td>
                                                    <td class="tdNormal" style="width:30%">
                                                        </td>
                                                </tr>
                                            </table>
                                            <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                                <tr>
                                                    <td>
                                                        <asp:Button ID="btnCancel" runat="server" Text="   Cancel   " 
                                                            class="Btn_M_Normal" CausesValidation="False" onclick="btnCancel_Click" />
                                                        <asp:Button ID="btnSave" runat="server" Text="   Save   "
                                                            class="Btn_M_Normal" onclick="btnSave_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:Panel>                                    
                                        <!------------------------------------body End2 ----------------------------------------------->
                                        <br>
                                    </td>
                                </tr>
                            </table>
                            <!------------------------------------body End2 ----------------------------------------------->
                        </td>
                    </tr>
                </table>
</asp:Content>

