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

<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>Manage Parameters</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">System Parameters</li>
			</ol>
		  </div>
		</div>
	  </div><!-- /.container-fluid -->
	</section>
		<!-- /.content-header -->
		<!-- Main content -->
	<section class="content">
	    <div class="container-fluid">
		<!-- Default box -->
		<div class="card card-info color-palette-box">
			<div class="card-header">
				<h3 class="card-title">
                    <i class="fas fa-tag"></i>
                    Parameters List
                </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><asp:Label ID="lblError" runat="server" Text="Label"></asp:Label></div>
			<div class="card-body ">
			<asp:GridView ID="GridView1" class="table table-bordered table-hover" BorderStyle="None" BorderWidth="0"
					GridLines="None" runat="server" AutoGenerateColumns=false OnRowCommand="GridView1_RowCommand" 
					DataKeyNames="sys_parmtr_id" onprerender="GridView1_PreRender" OnRowCreated="GridView1_RowCreated">
				<Columns>
					<asp:BoundField DataField="sys_parmtr_name" ItemStyle-Width="20%" HeaderText="Name"/>
                    <asp:BoundField DataField="sys_parmtr_value" HeaderText="Value" />
                    <asp:TemplateField HeaderText="Actions" >
					    <ItemTemplate>
							    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
							    Action
						    </button>
						    <div class="dropdown-menu">
							    <a class="dropdown-item" href="#"><asp:Button ID="Edit" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Edit" CommandName="u" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>
                                <a class="dropdown-item" href="#"><asp:Button ID="Delete" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Delete" CommandName="d" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>
                                <a class="dropdown-item" href="#"><asp:Button ID="Value" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Value" CommandName="p" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>
						    </div>
					    </ItemTemplate>
				    </asp:TemplateField>
                    <asp:BoundField DataField="SYS_PARMRT_VALUE_TYPE" HeaderText="" />
                    <asp:BoundField DataField="SYS_PARMTR_VALUE_LKP" HeaderText="" />
					
				</Columns>
			</asp:GridView>
			</div>
					
			<!-- /.card-body -->
		</div>
		<!-- /.card -->
		<div class="row">
			<div class="col-12">
				<asp:Button ID="btnAdd" runat="server" Text="     Add     " OnClick="btnAdd_Click"
										class="btn btn-success float-right" />
			</div>
			<div class="modal fade" id="modal-xl">
		   
				<div class="modal-dialog modal-xl">
					<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_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width:15%">
                                            Name
                                        </td>
                                        <td class="tdNormal" style="width:30%">
                                            <asp:TextBox ID="txtName" runat="server" Width="100%" class="fieldNormal" 
                                                MaxLength="100"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal" style="width:10%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width:15%">
                                            Value Type
                                        </td>
                                        <td class="tdNormal" style="width:30%">
                                            <asp:DropDownList ID="ddlRecordType" runat="server" Width="250px" class="fieldNormal" >
                                                <asp:ListItem Value="0">TextBox</asp:ListItem>
                                                <asp:ListItem Value="1">CheckBox</asp:ListItem>
                                                <asp:ListItem Value="2">List</asp:ListItem>                                                           
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Value Lookup
                                        </td>
                                        <td colspan="4">
                                            <asp:TextBox ID="txtDesc" runat="server" Width="100%" Rows="4" class="fieldMultiLine"
                                                TextMode="MultiLine" MaxLength="250"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </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>

                <div class="modal fade" id="modal-xl1">
		   
				<div class="modal-dialog modal-xl">
					<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Parameter Value</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_ItemTB">
                                    <tr>
                                        <td class="tdNormal" style="width:15%">
                                            Value
                                        </td>
                                        <td class="tdNormal" style="width:30%">
                                            <asp:TextBox ID="txtValue" runat="server" Width="100%" class="fieldNormal" 
                                                MaxLength="100"></asp:TextBox>
                                            <asp:DropDownList ID="ddlValue" runat="server" Width="250px" class="fieldNormal" >
                                            </asp:DropDownList>
                                            <asp:CheckBox ID="chkBox" runat="server" class="fieldNormal" />
                                        </td>
                                        <td class="tdNormal" style="width:10%">
                                        </td>
                                        <td class="tdNormal" style="width:15%">
                                        </td>
                                        <td class="tdNormal" style="width:30%">
                                            
                                        </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="btnSaveValue" runat="server" Text="Save changes" OnClick="btnSaveValue_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>
	<!-- AdminLTE App -->
	<script src="../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../dist/js/demo.js"></script>
	<!-- /.content-wrapper -->
	<script>
		$(function () {

		    $('#ctl00_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)');
		});
</script>
</asp:Content>
