<%@ page language="C#" masterpagefile="~/MasterPages/Main.master" autoeventwireup="true" inherits="Business_GLS1, App_Web_gcmbqb3f" viewStateEncryptionMode="Always" maintainScrollPositionOnPostBack="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <script language ="javascript" type ="text/javascript" >
      function KeyPressFuncIsWholeNumber() {

          if (event.keyCode < 48 || event.keyCode > 58)
          { event.returnValue = false; }
      }
    </script>
</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>
                                        Business Rules</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 />
                                        <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">
                                                        Select Channel
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlChannels" runat="server" DataTextField="channel_name" 
                                                            Width="250px" DataValueField="rc_code" class="fieldNormal" AutoPostBack="True" 
                                                            onselectedindexchanged="ddlChannels_SelectedIndexChanged" >
                                                        </asp:DropDownList>
                                                 </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal">
                                                        Select Event
                                                    </td>
                                                    <td>
                                                    <asp:DropDownList ID="ddlEvents" runat="server" DataTextField="evant_name" 
                                                            Width=250px DataValueField="re_code" class="fieldNormal" 
                                                            AutoPostBack="True" onselectedindexchanged="ddlEvents_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                 </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="text-align:center">
                                                        <asp:Button ID="Button1" runat="server" Text="Search" CssClass="Btn_L_Normal" 
                                                            onclick="Button1_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                        <asp:Panel ID="pnlResult" runat="server" Width="100%" Visible="false">
                                            <fieldset id="addItem">
                                             <legend id="addItem">Business Rules</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"
                                                             DataKeyNames="br_code" AllowPaging="True" AllowSorting="True" 
                                                            CellPadding="4" ForeColor="#333333" GridLines="None" 
                                                            onrowcommand="GridView1_RowCommand" EmptyDataText="There are no Results">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="re_code" HeaderText="Event Code" />
                                                                <asp:BoundField DataField="event_name" HeaderText="Event Name" />
                                                                <asp:BoundField DataField="channel_name" HeaderText="Channel Name" />
                                                                <asp:BoundField DataField="cut_off_start" HeaderText="Cut Off Start" />
                                                                <asp:BoundField DataField="cut_off_end" HeaderText="Cut Off End" />
                                                                <asp:BoundField DataField="slave_table" HeaderText="Slave Table" />
                                                                <asp:BoundField DataField="master_table" HeaderText="Master Table" />
                                                                <asp:BoundField DataField="active" HeaderText="Active" />
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="e" 
                                                                    Text="Edit" ImageUrl="~/Images/edit.jpg" >
                                                                    <ItemStyle Width="30px" />
                                                                </asp:ButtonField>
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="v" 
                                                                    Text="View" ImageUrl="~/Images/document_view.jpg" >
                                                                    <ItemStyle Width="30px" />
                                                                </asp:ButtonField>
                                                            </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="pnlBR" runat="server" Width="80%" Visible="false">
                                                <fieldset id="addItem">
                                                 <legend id="addItem">Business Rule Details</legend>
                                                </fieldset>
                                                <table border="0" width="80%" cellpadding="0" cellspacing="0" class="add_ItemTB1">
                                                    <tr>
                                                        <td class="tdNormal" style="width:15%">Record Date</td>
                                                        <td class="tdNormal" style="width:30%"><asp:Label ID="lblRecordDate" runat="server" Text=""></asp:Label></td>
                                                        <td class="tdNormal" style="width:10%"></td>
                                                        <td class="tdNormal" style="width:15%"></td>
                                                        <td class="tdNormal" style="width:30%"></td>
                                                    </tr>
                                                    <tr runat="server" id="addrow">
                                                        <td class="tdNormal" style="width:15%">
                                                            Channel</td>
                                                        <td class="tdNormal" style="width:30%">
                                                            <asp:DropDownList ID="ddlChannels0" runat="server" class="fieldNormal" 
                                                                DataTextField="channel_name" DataValueField="rc_code">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td class="tdNormal" style="width:10%">
                                                            &nbsp;</td>
                                                        <td class="tdNormal" style="width:15%">
                                                            Event</td>
                                                        <td class="tdNormal" style="width:30%">
                                                            <asp:DropDownList ID="ddlEvents0" runat="server" class="fieldNormal" 
                                                                DataTextField="evant_name" DataValueField="re_code">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Cut off start</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtcos" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="8"></asp:TextBox></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Cut off end</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtcoe" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="8"></asp:TextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Cut off rule</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox1" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Transaction date</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox2" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Transaction time</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox3" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Card number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox4" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Reference number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox5" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Trace ID</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox6" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Local date</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox7" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Local time</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox8" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Currency</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox9" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Transaction amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox10" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Settlement amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox11" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">fee amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox12" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Auth code</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox13" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Message type</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox14" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Acquirer</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox15" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Issuer</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox16" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Terminal ID</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox17" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Account Number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox19" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Master table</td>
                                                        <td class="tdNormal">
                                                            <asp:DropDownList ID="ddlMaster" runat="server" class="fieldNormal"
                                                                DataTextField="table_name" DataValueField="table_name" AutoPostBack="True" 
                                                                onselectedindexchanged="ddlMaster_SelectedIndexChanged" ></asp:DropDownList>
                                                        </td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Slave table</td>
                                                        <td class="tdNormal">
                                                            <asp:DropDownList ID="ddlSlave" runat="server" class="fieldNormal"
                                                                DataTextField="table_name" DataValueField="table_name" ></asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Days before</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtBefore" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()" 
                                                                MaxLength="1"></asp:TextBox></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Days after</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtAfter" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="1"></asp:TextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">
                                                            File name</td>
                                                        <td class="tdNormal">
                                                        <asp:DropDownList ID="ddlFileName" runat="server" class="fieldNormal"
                                                                DataTextField="FILE_NAME" DataValueField="FILE_NAME" ></asp:DropDownList>
                                                            </td>
                                                        <td class="tdNormal">
                                                            &nbsp;</td>
                                                        <td class="tdNormal">
                                                            Active</td>
                                                        <td class="tdNormal">
                                                            <asp:CheckBox ID="CheckBox18" runat="server" class="fieldNormal" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal" colspan="5">
                                                            &nbsp;</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>

