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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
	<!-- DataTables -->
	<link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
	<section class="content-header">
	  <div class="container-fluid">
		<div class="row mb-2">
		  <div class="col-sm-6">
			<h1>Card Scheme Events</h1>
		  </div>
		  <div class="col-sm-6">
			<ol class="breadcrumb float-sm-right">
			  <li class="breadcrumb-item"><a href="#">Home</a></li>
			  <li class="breadcrumb-item active">Configurations</li>
			  <li class="breadcrumb-item active">Card Scheme Events</li>
			</ol>
		  </div>
		</div>
	  </div><!-- /.container-fluid -->
	</section>
		<!-- /.content-header -->
		<!-- Main content -->
	<section class="content">
	    <div class="container-fluid">
        <div class="card card-warning">
              <%--<div class="card-header">
                <h3 class="card-title">Search Filters</h3>
              </div>--%>
              <!-- /.card-header -->
              <div class="card-body">
                  <div class="row">
                    <div class="col-sm-3">
                      <!-- text input -->
                      <div class="form-group">
                        <label>Event Name</label>
                        <asp:TextBox ID="txtSerachEventName" runat="server" class="form-control" ></asp:TextBox>
                        <asp:Label ID="lbTermNotFoundlError" runat="server" Style="color: #FF0000"></asp:Label>
                      </div>
                    </div>
                    <div class="col-sm-3">
                      <!-- text input -->
                      <div class="form-group">
                        <label>Narrative</label>
                        <asp:TextBox ID="txtnarrative" runat="server" class="form-control" ></asp:TextBox>
                        <asp:Label ID="lblnarrativeError" runat="server" Style="color: #FF0000"></asp:Label>
                      </div>
                    </div>
                    <div class="col-sm-3">
                      <div class="form-group">
                        <label>From Account</label>
                        <asp:TextBox ID="txtSearchFromAccount" MaxLength="20" runat="server" class="form-control" ></asp:TextBox>
                      </div>
                    </div>
                    <div class="col-sm-3">
                      <div class="form-group">
                        <label>To Account</label>
                        <asp:TextBox ID="txtSearchToAccount" MaxLength="20" runat="server" class="form-control" ></asp:TextBox>
                      </div>
                    </div>

                  </div>
                  <div class="row">
			        <div class="col-12">
                    <asp:Button ID="btnSearch" runat="server" Text="     Search     " OnClick="btnSearch_Click" CssClass="btn btn-primary btn-l" />
			        </div>
                    </div>
              </div>
              <!-- /.card-body -->
            </div>
		<!-- Default box -->
		<div class="card card-info color-palette-box">
			<div class="card-header">
				<h3 class="card-title">
                    <i class="fas fa-tag"></i>
                    <!-- Search Results --> Update CS Events
                </h3>

				<div class="card-tools">
					<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
						<i class="fas fa-minus"></i>
					</button>
					</div>
			</div>
			<div class="card-body" style="min-height: 100px; width: 100%; display: inline-block;vertical-align: top; overflow-x: auto;">
                <asp:GridView ID="GridView1" class="table table-striped table-bordered" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="CS_EVNT_CODE" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated" EmptyDataText="There are no results">
                    <Columns>
                        <asp:BoundField DataField="CS_EVNT_CODE" HeaderText="Event&nbsp;ID" />
                        <asp:BoundField DataField="EVENT_NAME" HeaderText="Event&nbsp;Name" />
                        <asp:BoundField DataField="NARRATIVE" HeaderText="Narrative" />
                        <asp:BoundField DataField="FROM_ACCOUNT" HeaderText="From&nbsp;Account" />
                        <asp:BoundField DataField="TO_ACCOUNT" HeaderText="To&nbsp;Account" />
                        <asp:BoundField DataField="From_Acct_Crncy" HeaderText="From&nbsp;A/C&nbsp;Currency" />
                        <asp:BoundField DataField="To_Acct_Crncy" HeaderText="To&nbsp;A/C&nbsp;Currency" />
                        <asp:TemplateField HeaderText="Actions" Visible="true">
                            <ItemTemplate>
                                <button type="button" class="btn btn-default btn-block btn-xs dropdown-toggle" data-toggle="dropdown">
                                    Action
                                </button>
                                <div class="dropdown-menu">
                                    <a class="dropdown-item" href="#">
                                        <asp:Button ID="Button5" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Update" CommandName="u" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <div class="row" style="margin-left:1%; margin-top:1%; margin-bottom:1%">
                    Go To Page&nbsp;: &nbsp;<asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width="100px" Height="30px" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
                </div>
			
			</div>
					
			<!-- /.card-body -->
		</div>

        
        <!-- /.card -->
		<div class="row">
			<div class="modal fade" id="modal-xl">
		   
				<div class="modal-dialog modal-xl" style="max-width: max-content;">
					<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Parameter Details</h4>
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
						</button>
					</div>
					<div class="modal-body">
							
						<div class="card-body">
							<table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB1">
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            From Account
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtUpdateFromAccount" runat="server" class="form-control" MaxLength="20"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            To Account
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtUpdateToAccount" runat="server" class="form-control" MaxLength="20"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            From Account Currency
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:DropDownList ID="ddlFromCurrency" runat="server" DataTextField="currency" DataValueField="currency" class="form-control select"></asp:DropDownList>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            To Account Currency
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:DropDownList ID="ddlToCurrency" runat="server" DataTextField="currency" DataValueField="currency" class="form-control select"></asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Event Name
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtUpdateEventName" runat="server" class="form-control"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal" style="width: 10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Narrative
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtUpdateNarrative" runat="server" class="form-control" MaxLength="60"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txtHiddeneEvenCode" runat="server" class="form-control" Visible="false"></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    
                   
                    <%--<tr>
                        <td class="tdNormal" style="width: 15%">
                            Denomination
                        </td>
                        <td class="tdNormal" style="width: 30%">
                            <asp:Label ID="lblDenom" runat="server" Text="Label" Font-Bold="True"></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>
                        <td class="tdNormal" style="width: 15%">
                            EDC status
                        </td>
                        <td class="tdNormal" colspan="4">
                            <asp:GridView ID="GridView2" CssClass="gridMaster" Width="100%" runat="server" AutoGenerateColumns="False"
                                CellPadding="4" ForeColor="#333333" GridLines="None" EmptyDataText="There are no status messages">
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <Columns>
                                    <asp:BoundField DataField="status" HeaderText="status" />
                                    <asp:BoundField DataField="stat_desc" HeaderText="Description" />
                                    <asp:BoundField DataField="TERM_TRACE" HeaderText="Trace" />
                                    <asp:BoundField DataField="TXN_PREV_TRACE" HeaderText="Prev. Trace" />
                                </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>--%>
                </table>
                            <%--<table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                            <tr>
                                                <td>
                                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" class="btn btn-primary" CausesValidation="False" />
                                                    <asp:Button ID="btnSave"  runat="server" Text="Save" OnClick="btnSave_Click" class="btn btn-primary" />
                                                </td>
                                            </tr>
                                        </table>--%>
								  
						</div>
						<!-- /.card-body -->

							  
					</div>
					<div class="modal-footer justify-content-between">
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <asp:Button ID="btnSave" runat="server" Text="Save changes" OnClick="btnSave_Click" class="btn btn-primary" />
					</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			  
				</div>
                
				<!-- /.modal -->
		</div>
	</div><!-- /.container-fluid -->
	</section>
		<!-- /.content -->
	</div>
	<!-- Toastr -->
	<!-- jQuery -->
	<script src="../plugins/jquery/jquery.min.js"></script>
	<!-- Bootstrap 4 -->
	<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
	<!-- SweetAlert2 -->
	<script src="../plugins/sweetalert2/sweetalert2.min.js"></script>
	<!-- Toastr -->
	<script src="../plugins/toastr/toastr.min.js"></script>
	<!-- AdminLTE App -->
	<script src=".../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
	<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
	<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
	<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
	<script src="../plugins/jszip/jszip.min.js"></script>
	<script src="../plugins/pdfmake/pdfmake.min.js"></script>
	<script src="../plugins/pdfmake/vfs_fonts.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.print.min.js"></script>
	<script src="../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
    <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
	<!-- AdminLTE App -->
	<script src="../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../dist/js/demo.js"></script>
    <script src="../plugins/select2/js/select2.full.min.js"></script>
    <!-- Bootstrap4 Duallistbox -->
    <script src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
    <!-- InputMask -->
    <script src="../plugins/moment/moment.min.js"></script>
    <script src="../plugins/inputmask/jquery.inputmask.min.js"></script>
    <!-- date-range-picker -->
    <script src="../plugins/daterangepicker/daterangepicker.js"></script>
    <!-- bootstrap color picker -->
    <script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
    <!-- Tempusdominus Bootstrap 4 -->
    <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
    <!-- Bootstrap Switch -->
    <script src="../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
    <!-- BS-Stepper -->
    <script src="../plugins/bs-stepper/js/bs-stepper.min.js"></script>
    <!-- dropzonejs -->
    <script src="../plugins/dropzone/min/dropzone.min.js"></script>
    <!-- AdminLTE App -->
	<script>

	    $(function () {

	        $('#ContentPlaceHolder1_GridView1').DataTable({
	            "responsive": true, "lengthChange": false, "autoWidth": false,
	            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //Date picker
	        $('#reservationdate').daterangepicker();
//	        $('#ctl00_ContentPlaceHolder1_reservation').daterangepicker()({
//	            format: 'DD/MM/YYYY - DD/MM/YYYY'
//	        });
	        $('#ctl00_ContentPlaceHolder1_txtDate').daterangepicker({
	            locale: {
	                format: 'DD/MM/YYYY'
	            }
	        })
	        
	        //		    $('#reservationdate').datetimepicker({
	        //		        format: 'DD/MM/YYYY'
	        //		    });

	        //        $('#ContentPlaceHolder1_GridView1').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //        $('#ContentPlaceHolder1_gvChannel').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

	        //        $('#ContentPlaceHolder1_gvEJ').DataTable({
	        //            "responsive": true, "lengthChange": false, "autoWidth": false,
	        //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
	        //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
	    });
    </script>
</asp:Content>
