<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageInnernew.Master" AutoEventWireup="true" CodeBehind="TT_PeriodSetting.aspx.cs" Inherits="eCareERP.TimeTable.TT_PeriodSetting" %>
<%@ Register Assembly="CustomButton" Namespace="Custom.eCareERP" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
function OnChange() {
$("#showpopup").dialog({
title: 'Set Max Period',
width: 300,
height: 150,
position: ['center', 25],
closeOnEscape: true,
modal: false,
zIndex: 1000,
stack: false
//open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); }
}).parent().appendTo($("form:first"));
}
</script>
<div id="page-wrapper1">
<div class="white-box">
<%--<h3 class="text-center box-title" >Period Time Setting </h3>--%>
<div class="row button-box m-t-10 text-center">
<asp:LinkButton ID="btnUpdatePeriod" Text="Update" OnClick="btnUpdatePeriod_Click" CssClass="global btn btn-outline btn-info " runat="server" CausesValidation="False" ><i class="mdi mdi-update"></i> Update</asp:LinkButton>
</div>
<%-- <div id="showpopup"style="width: 200px; display: none; z-index: 1001;">
<fspl:eCareTextBox ID="txtperiod" text="" TextType="Numeric" MaxValue="90" runat="server" />
<asp:Button ID="BtnSetPeriod" Text="Set Period" OnClick="BtnSetPeriod_Click" CssClass="global" runat="server" CausesValidation="False"/>
</div> --%>
<div class="table table-responsive" id="myTablePeriod">
<asp:UpdatePanel ID="upnl1" runat="server">
<ContentTemplate>
<%-- <table border='0' cellspacing='3' class='display' id='example1' cellpadding='3' width='90%' style="width: 100%">--%>
<table id="myTable_k" class="table table-striped table-bordered">
<thead>
<tr>
<th>SNo.</th>
<th>Period</th>
<%-- <th style="width:300px"><img src="../Images/modify-icon.png" style="width:auto;height:16px" onclick="OnChange()" />Time</th>--%>
<th>Time</th>
<th style="display:none">
<div class="checkbox checkbox-info m-0">
<asp:CheckBox ID="chkaddall" runat="server" />
<label class="col-md-12 "><strong>Set</strong> </label>
</div>
</th>
</tr>
</thead>
<tbody>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:Repeater ID="rpt_TeacherDetails" runat="server">
<ItemTemplate>
<tr id="ItemRow2">
<td><%# Container.ItemIndex + 1 %></td>
<td>
<asp:Label ID="lblPeriods" runat="server" Text='<%# Eval("Periods") %>' />
</td>
<td>
<%--<fspl:eCareTextBox ID="txtTime" runat="server" type="number" TextType="Numeric" MinValue="5" MaxValue="99" SetWidth="70" Text='<%# Eval("Time") %>' Required="true" /> --%>
<%--<fspl:eCareTextBox ID="txtTime" runat="server" TextType="" SetWidth="100" Text='<%# Eval("Time") %>' Required="true" />--%>
<asp:TextBox ID="txtTime" CssClass="form-control input-sm" runat="server" Text='<%# Eval("Time") %>'></asp:TextBox>
<%-- <asp:RegularExpressionValidator ID="txtTimevalidate" runat="server" ControlToValidate="txtTime"
ValidationExpression="^(([0]?[1-9])|([1][0-2])):(([0-5][0-9])|([1-9])) [AP][M]$" ErrorMessage="Invalid Format" >
</asp:RegularExpressionValidator>--%>
</td>
<td style=" display:none">
<div class="checkbox checkbox-info m-0">
<asp:CheckBox ID="chkstatus" Text=" " runat="server" Checked='<%# Eval("Status").ToString() == "True" %>' Required="true" Visible="false" />
</div>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
</tbody>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<script>
//$(document).ready(function () {
// var $dataContainer = $('.table');
// oTable = $dataContainer.find('#myTable').dataTable({
// "bJQueryUI": true,
// "aoColumnDefs": [
// {
// "bSortable": false,
// "aTargets": [3] // <-- gets last column and turns off sorting
// }
// ],
// "bPaginate": false,
// "bFilter": true,
// "sPaginationType": "full_numbers",
// "sDom": '<""f>t<"F"lp>'
// })
//});
$(document).ready(function () {
debugger
var $dataContainer = $('.table');
oTable = $dataContainer.find('#myTablePeriod').dataTable({
"bJQueryUI": true,
"aoColumnDefs": [
{
"bSortable": false,
"aTargets": [2, 3] // <-- gets last column and turns off sorting
}
],
"bPaginate": false,
"bFilter": true,
"bDestroy": true,
"sPaginationType": "full_numbers",
"sDom": '<""f>t<"F"lp>'
})
});
$(function () {
$("#myTablePeriod [id*=chkaddall]").click(function () {
if ($(this).is(":checked")) {
$("#myTablePeriod [id*=chkstatus]").prop("checked", "checked");
} else {
$("#myTablePeriod [id*=chkstatus]").removeAttr("checked");
}
});
$("#myTablePeriod [id*=chkstatus]").click(function () {
if ($("#myTablePeriod [id*=chkstatus]").length == $("#myTablePeriod [id*=chkstatus]:checked").length) {
$("#myTablePeriod [id*=chkaddall]").prop("checked", "checked");
} else {
$("#myTablePeriod [id*=chkaddall]").removeAttr("checked");
}
});
});
</script>
</asp:Content>