<%@ page language="C#" autoeventwireup="true" inherits="Pages_MobileView_Default, App_Web_cwg5l20b" masterpagefile="~/Pages/Common/MasterPages/MobileViewMasterPage.master" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <link href="../../App_Themes/jquery-ui.css" rel="stylesheet" />
    <script src="../../JavaScript/rjs/lib/jquery-ui.min.js"></script>
    <script src="../../JavaScript/rjs/lib/1.11.4-jquery-ui.js"></script>
    <style>
        .table-topic.date-topic {
            float: right;
        }

        .table-topic.frst:after {
            /*width: 64pc;*/
            width: 62pc;
        }
    </style>
    <script>

        var ExamTypeId = 0
        var CommonOrgGroupBatchIdFee = 0
        var CommonOrgGroupBatchId = 0
        var CommonOrgGroupBatchIdInquiry = 0
        var ExamId = 0
        var SelectDate
        var CurrentDate = "";

        var TaskCurrentDate = "";
        var ReceiptStatusFromDatePickerDate = "";
        var ReceiptStatusToDatePickerDate = "";
        var CommonOrgGroupBatchIdReceipt = 0;
        var SyncData = 0;

        $(document).ready(function () {
            //debugger;


            var now = new Date();
            //var today = now.getDate() + '/' + (now.getMonth() + 1) + '/' + now.getFullYear();
            //var today = $.datepicker.formatDate('dd/mm/yy', new Date());

            ReceiptStatusFromDatePickerDate = $.datepicker.formatDate('yy/mm/dd', new Date());
            ReceiptStatusToDatePickerDate = $.datepicker.formatDate('yy/mm/dd', new Date());
            TaskCurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
            CurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());

            $('#ReceiptStatusFromDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            $('#ReceiptStatusToDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            $('#TaskDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            $('#TaskHWCWDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            
            $('#StdAttendanceDate').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            $('#StaffAttendanceDate').val($.datepicker.formatDate('dd/mm/yy', new Date()));
            $("#StudentAttndLoader").css("display", "block");
            $("#StaffAttndLoader").css("display", "block");
            $("#TaskSummaryLoader").css("display", "block");
            $("#TaskHWCWSummaryLoader").css("display", "block");
            $("#ResultSummaryLoader").css("display", "block");
            //$("#AdmissionCountLoader").css("display", "block");
            $("#AdmissionInquiryCountLoader").css("display", "block");
            $("#FeeStatusLoader").css("display", "block");
            SyncData = 0;
            GetCommonOrgGroupBatchForFee();
            //FeeStatusDataBind();
            //ReceiptDetailDataBind();
            // AssignPermission();
            //SelectDate = new Date(this);
        });

        function isValidDate2(inputText) {
            // debugger;
            if (inputText.val() != '') {
                var dateformat = /^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/;
                if (inputText.val().match(dateformat)) {
                    var opera1 = inputText.val().split('/');
                    var opera2 = inputText.val().split('-');
                    lopera1 = opera1.length;
                    lopera2 = opera2.length;
                    if (lopera1 > 1) {
                        var pdate = inputText.val().split('/');
                    }
                    else if (lopera2 > 1) {
                        var pdate = inputText.val().split('-');
                    }
                    var dd = parseInt(pdate[0]);
                    var mm = parseInt(pdate[1]);
                    var yy = parseInt(pdate[2]);
                    var ListofDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
                    if (mm == 1 || mm > 2) {
                        if (dd > ListofDays[mm - 1]) {
                            alert('Invalid date!');
                            //inputText.value = '';
                            inputText.val('');
                            return false;
                        }
                    }
                    if (mm == 2) {
                        var lyear = false;
                        if ((!(yy % 4) && yy % 100) || !(yy % 400)) {
                            lyear = true;
                        }
                        if ((lyear == false) && (dd >= 29)) {
                            alert('Invalid date!');
                            //inputText.value = '';
                            inputText.val('');
                            return false;
                        }
                        if ((lyear == true) && (dd > 29)) {
                            alert('Invalid date!');
                            //inputText.value = '';
                            inputText.val('');
                            return false;
                        }
                    }
                }
                else {
                    // alert('Invalid date!');
                    //inputText.value = '';
                    // inputText.val('');
                    return false;
                }
            }
        }
        function FormatIt(obj) {
            //  debugger;
            if (obj.value.length == 2) // Day
                obj.value = obj.value + "/";
            if (obj.value.length == 5) // month
                obj.value = obj.value + "/";
            if (obj.value.length > 10) // month
                $(obj).val('');

        }
        function AssignPermission() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/AssignPermission",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    var OrgGroupId = "";
                    $.each(obj, function (i, item) {
                        if (item.RoleDashletId == 67 && item.IsCheck == true) {
                            FeeStatusDataBind();
                            document.getElementById("FeeStatusHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 68 && item.IsCheck == true) {
                            ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
                            document.getElementById("ReceiptDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 69 && item.IsCheck == true) {
                            GetExamType();
                            document.getElementById("ResultDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 70 && item.IsCheck == true) {
                            StudentAttndDetailsGroupWiseDataBind(CurrentDate);
                            document.getElementById("StudentAttndGroupWiseDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 71 && item.IsCheck == true) {
                            GetAdmissionCount();
                            document.getElementById("AdmissionCountHead").style.display = "block";

                        }
                        else if (item.RoleDashletId == 72 && item.IsCheck == true) {
                            StaffAttndDetailsGroupWiseDataBind(CurrentDate);
                            document.getElementById("StaffAttndGroupWiseDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 73 && item.IsCheck == true) {
                            GetTaskData(TaskCurrentDate);
                            document.getElementById("TaskDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 79 && item.IsCheck == true) {
                            GetAdmissionInquiryCount();
                            document.getElementById("AdmissionInquiryHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 80 && item.IsCheck == true) {
                            GetTaskDataCWHW(TaskCurrentDate);
                            document.getElementById("TaskHWCWDetailHead").style.display = "block";
                        }
                        else if (item.RoleDashletId == 81 && item.IsCheck == true) {
                            FeeCollectionPayTypeDataBind();
                            document.getElementById("FeeCollectionPayTypeHead").style.display = "block";
                        }
                        GetEmployeeSummary();
                    });
                    //GetOrgId();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }

        function FeeStatusDataBind() {
           // alert(SyncData);
            $("#FeeStatusLoader").show();
            $.ajax({
                async: false,
                type: "POST",
                url: "ConsolidateDashBoard.aspx/FeeStatusDataBind",
                data: JSON.stringify({ "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee), "SyncData": parseInt(SyncData) }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    var tblFeeStatus = "";
                    if (obj != "") {
                        tblFeeStatus += "<tr><th>Organization Name</th><th>Paid Amount</th><th>Pending Amount</th><th>Total Amount</th></tr>";
                        $.each(obj, function (i, item) {
                            tblFeeStatus += "<tr><td>" + item.OrgGroupName + "</td><td><a href='../MobileView/ConsolidateFeeStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Count=1&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PaidAmount + "</a></td><td><a href='../MobileView/ConsolidateFeeStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Count=2&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PendingAmount + "</a></td><td><a href='../MobileView/ConsolidateFeeStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Count=3&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.TotalAmount + "</a></td></tr>";
                            //total += parseInt(item.StudentCount);

                        });
                        //tblFeeStatus += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + total + "</td></tr>";
                    }
                    else { tblFeeStatus += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                    //$("#FeeStatusLoader").hide();
                    document.getElementById("tblFeeStatus").innerHTML = tblFeeStatus;
                    document.getElementById("CreateDate").innerHTML = obj[0].LastUpdatedDate;

                    //GetCommonOrgGroupBatchForReceipt(); alert(item.LastUpdatedDate);
                    // ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
                    // console.log(Header);
                },
                complete: function () {
                    $("#FeeStatusLoader").hide();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                    $("#LoaderDiv1").hide();
                }
            });

        }
        function ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate) {

            // var tblFeeStatus = "";
            var tblReceiptDetail = "";
            var checkValid = isValidDate2($("#ReceiptStatusFromDatePicker"));
            var checkValid1 = isValidDate2($("#ReceiptStatusToDatePicker"));
            if (checkValid == false) {
                $("#ReceiptStatusFromDatePicker").val('');
                tblReceiptDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblReceiptDetail").innerHTML = tblReceiptDetail;
                $('#ReceiptStatusFromDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                ReceiptStatusFromDatePickerDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                ReceiptStatusDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
                alert('Invalid date!');
            }
            else if (checkValid1 == false) {
                $("#ReceiptStatusToDatePicker").val('');
                tblReceiptStatus += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblReceiptDetail").innerHTML = tblReceiptDetail;
                $('#ReceiptStatusToDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                ReceiptStatusToDatePickerDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                ReceiptStatusDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
                alert('Invalid date!');
            }


            else {
                //$("#LoaderDiv").show();
                $.ajax({
                    async: false,
                    type: "POST",
                    url: "ConsolidateDashBoard.aspx/ReceiptDetailDataBind",
                    // data: JSON.stringify({}),
                    //data: JSON.stringify({ "CommonOrgGroupBatchId": CommonOrgGroupBatchIdReceipt, "FromDate": ReceiptStatusFromDatePickerDate, "ToDate": ReceiptStatusToDatePickerDate }),
                    data: JSON.stringify({ "CommonOrgGroupBatchId": CommonOrgGroupBatchIdFee, "FromDate": ReceiptStatusFromDatePickerDate, "ToDate": ReceiptStatusToDatePickerDate, "SyncData": parseInt(SyncData) }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        //alert(result.d);
                        debugger;
                        var obj = (result.d);
                        //var tblReceiptDetail = "";
                        ///  var total = 0;
                        if (obj != "") {
                            tblReceiptDetail += "<tr><th>Organization Name</th><th>ReceiptCount</th><th>ReceiptAmount</th><th>CancelReceipt</th></tr>";
                            $.each(obj, function (i, item) {
                                tblReceiptDetail += "<tr><td>" + item.OrgGroupName + "</td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=1&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&FromDate=" + ReceiptStatusFromDatePickerDate + "&ToDate=" + ReceiptStatusToDatePickerDate + "'>" + item.ReceiptCount + "</a></td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=2&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&FromDate=" + ReceiptStatusFromDatePickerDate + "&ToDate=" + ReceiptStatusToDatePickerDate + "'>" + item.ReceiptAmount + "</a></td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=3&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&FromDate=" + ReceiptStatusFromDatePickerDate + "&ToDate=" + ReceiptStatusToDatePickerDate + "'>" + item.CancelAmount + "</a></td></tr>";
                                //total += parseInt(item.StudentCount);
                            });
                            //tblFeeStatus += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + total + "</td></tr>";
                        }
                        else { tblReceiptDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                        $("#ReceiptStatusLoader").hide();
                        document.getElementById("tblReceiptDetail").innerHTML = tblReceiptDetail;
                        document.getElementById("ReceiptCreateDate").innerHTML = obj[0].LastUpdatedDate;
                        
                        // $("#LoaderDiv1").hide();
                        // console.log(Header);
                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                        // $("#LoaderDiv1").hide();
                    }
                });
            }
        }
        function FeeCollectionPayTypeDataBind() {
            $.ajax({
                async: false,
                type: "POST",
                url: "ConsolidateDashBoard.aspx/FeeCollectionPayTypeWiseDataGet",
                data: JSON.stringify({ "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee)}),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    var tblFeeCollectionPayType = "";
                    if (obj != "") {
                        tblFeeCollectionPayType += "<tr><th>Organization Name</th><th>Total</th><th>By Bank</th><th>Cash</th><th>Cheque</th><th>Credit Card</th><th>DD</th><th>Netbanking</th></tr>";
                        $.each(obj, function (i, item) {
                            tblFeeCollectionPayType += "<tr><td><a href='../MobileView/ConsolidateFeeCollectionDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroupName + "</a></td><td>" + item.Total + "</td><td>" + item.ByBank + "</td><td>" + item.Cash + "</td><td>" + item.Cheque + "</td><td>" + item.CreditCard + "</td><td>" + item.DD + "</td><td>" + item.Netbanking + "</td></tr>";
                            //total += parseInt(item.StudentCount);

                        });
                        //tblFeeStatus += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + total + "</td></tr>";
                    }
                    else { tblFeeCollectionPayType += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                    //$("#FeeStatusLoader").hide();
                    document.getElementById("tblFeeCollectionPayType").innerHTML = tblFeeCollectionPayType;
                   // document.getElementById("CreateDate").innerHTML = obj[0].LastUpdatedDate;

                    //GetCommonOrgGroupBatchForReceipt(); alert(item.LastUpdatedDate);
                    // ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
                    // console.log(Header);
                },
                complete: function () {
                    $("#FeeStatusLoader").hide();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                    $("#LoaderDiv1").hide();
                }
            });

        }
        function GetExamType() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetExamTypeList",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    $("#drpExam").html(result.d);
                    ExamTypeId = $("#drpExam").val();

                    GetExamId();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }

        function GetCommonOrgGroupBatchForFee() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetCommonOrgGroupBatchList",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    // debugger;
                    $("#drpFeeCommonOrgGroupBatch").html(result.d);
                    CommonOrgGroupBatchIdFee = $("#drpFeeCommonOrgGroupBatch").val();
                    //alert("hi");
                    AssignPermission();
                    //FeeStatusDataBind();
                    //GetExamId();
                    //GetAdmissionCount();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }
        function GetCommonOrgGroupBatch() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetCommonOrgGroupBatchList",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    // debugger;
                    $("#drpAdmissionCount").html(result.d);
                    CommonOrgGroupBatchId = $("#drpAdmissionCount").val();
                    //GetExamId();
                    GetAdmissionCount();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }

        function GetExamId() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetExamId",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify({ "ExamTypeId": parseInt(ExamTypeId), "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee) }),
                //data: JSON.stringify({ "ExamTypeId": parseInt(ExamTypeId) }),
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    var tblResult = "";
                    var totalpass = 0;
                    var totalfail = 0;
                    if (obj != "") {
                        tblResult += "<tr><th>Org Group Name</th><th>Pass Student Count</th><th>Fail Student Count</th><th>Pass Student Percentage</th></tr>";
                        $.each(obj, function (i, item) {

                            tblResult += "<tr><td><a href='../MobileView/ConsolidateBrightStdDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroupName + "</a></td><td>" + item.PassStudentCount + "</td><td>" + item.FailStudentCount + "</td><td>" + item.PassStudentPercentage + "</td></tr>";
                            totalpass += parseInt(item.PassStudentCount);
                            totalfail += parseInt(item.FailStudentCount);

                        });
                        tblResult += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + totalpass + "</td><td style='font-weight:bold'>" + totalfail + "</td><td></td></tr>";


                    }
                    else { tblResult += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }

                    //GetCommonOrgGroupBatch();
                    $("#ResultSummaryLoader").css("display", "none");
                    document.getElementById("tblResult").innerHTML = tblResult;
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }

        function GetAdmissionCount() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetAdmissionCount",
                contentType: "application/json; charset=utf-8",
                //data: JSON.stringify({ "OrgGroupId": 0, "TypeId": 1, "Type": 'OrgGroup' }),
                data: JSON.stringify({ "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee), "SyncData": parseInt(SyncData) }),
                dataType: "json",
                success: function (result) {

                    var obj = (result.d);
                    var tblAdmissionCount = "";
                    var totaladmission = 0;
                    if (obj != "") {
                        tblAdmissionCount += "<tr><th>Org Group Name</th><th>Student Admission Count</th></tr>";
                        $.each(obj, function (i, item) {
                            tblAdmissionCount += "<tr><td><a href='../MobileView/ConsolidateAdmissionCountDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroup + "</a></td><td><a href='../MobileView/ConsolidateAdmissionOrgGroupStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AdmissionCount + "</a></td></tr>";
                            totaladmission += parseInt(item.AdmissionCount);
                        });
                        tblAdmissionCount += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + totaladmission + "</td></tr>";
                    }
                    else { tblAdmissionCount += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                    document.getElementById("tblAdmissionCount").innerHTML = tblAdmissionCount;
                    document.getElementById("AdmissionCreateDate").innerHTML = obj[0].LastUpdatedDate;
                    
                    //GetCommonOrgGroupBatchForInquiry();

                    //$("#AdmissionCountLoader").css("display", "none");
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }


        function GetAdmissionInquiryCount() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashBoard.aspx/GetAdmissionInquiryCount",
                contentType: "application/json; charset=utf-8",
                //data: JSON.stringify({ "OrgGroupId": 0, "TypeId": 2, "Type": 'OrgGroup' }),
                data: JSON.stringify({ "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee), "SyncData": parseInt(SyncData) }),
                dataType: "json",
                success: function (result) {
                    //   debugger;
                    var obj = (result.d);
                    var tblAdmissionInquiry = "";
                    var totaladmissioninquiry = 0;
                    if (obj != "") {
                        tblAdmissionInquiry += "<tr><th>Org Group Name</th><th>Admission Inquiry Count</th></tr>";
                        $.each(obj, function (i, item) {
                            tblAdmissionInquiry += "<tr><td><a href='../MobileView/ConsolidateAdmissionInquiryCountDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroup + "</a></td><td><a href='../MobileView/ConsolidateOverallInquiryStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AdmissionCount + "</a></td></tr>";
                            totaladmissioninquiry += parseInt(item.AdmissionCount);
                        });
                        tblAdmissionInquiry += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + totaladmissioninquiry + "</td></tr>";
                    }
                    else { tblAdmissionInquiry += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                    document.getElementById("tblAdmissionInquiry").innerHTML = tblAdmissionInquiry;
                    document.getElementById("InquiryCreateDate").innerHTML = obj[0].LastUpdatedDate;
                    //GetTaskData(TaskCurrentDate);
                    $("#AdmissionInquiryCountLoader").css("display", "none");
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }


        function GetTaskData(TaskCurrentDate) {
            //return FormatIt(TaskCurrentDate);
            //return isValidDate2(TaskCurrentDate);
            //debugger;
            var tblTaskDetail = "";
            var checkValid = isValidDate2($("#TaskDatePicker"));
            if (checkValid == false) {
                $("#TaskDatePicker").val('');
                tblTaskDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblTaskDetail").innerHTML = tblTaskDetail;
                $('#TaskDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                TaskCurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                GetTaskData(TaskCurrentDate);
                alert('Invalid date!');
            }
            else {
                $.ajax({
                    type: "POST",
                    url: "ConsolidateDashBoard.aspx/GetTaskDashboardData",
                    contentType: "application/json; charset=utf-8",
                    data: JSON.stringify({ "Date": TaskCurrentDate, "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee) }),
                    dataType: "json",
                    success: function (result) {

                        var obj = (result.d);


                        if (obj != "") {
                            tblTaskDetail += "<tr><th>Org Group Name</th><th>Total </th><th>Pending </th><th>Complated</a></th></tr>";
                            $.each(obj, function (i, item) {
                                tblTaskDetail += "<tr><td>" + item.OrgGroup + "</td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=11&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.TotalAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=12&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PendingAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=13&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.ComplatedAttendance + "</a></td></tr>";
                                    //<td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PendingAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgHomeWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.ComplatedAttendance + "</a></td></tr>";
                            });
                        }
                        else {
                            tblTaskDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                        }
                        $("#TaskSummaryLoader").css("display", "none");
                        document.getElementById("tblTaskDetail").innerHTML = tblTaskDetail;
                        //alert("hi");
                        //StudentAttndDetailsGroupWiseDataBind(CurrentDate);
                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                    }
                });
            }
        }

        function GetTaskDataCWHW(TaskCurrentDate) {
            //return FormatIt(TaskCurrentDate);
            //return isValidDate2(TaskCurrentDate);
            //debugger;
            var tblTaskHWCWDetail = "";
            var checkValid = isValidDate2($("#TaskHWCWDatePicker"));
            if (checkValid == false) {
                $("#TaskHWCWDatePicker").val('');
                tblTaskHWCWDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblTaskHWCWDetail").innerHTML = tblTaskHWCWDetail;
                $('#TaskHWCWDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                TaskCurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                GetTaskDataCWHW(TaskCurrentDate);
                alert('Invalid date!');
            }
            else {
                $.ajax({
                    type: "POST",
                    url: "ConsolidateDashBoard.aspx/GetTaskCWHWDashboardData",
                    contentType: "application/json; charset=utf-8",
                    data: JSON.stringify({ "Date": TaskCurrentDate, "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee) }),
                    dataType: "json",
                    success: function (result) {
                        var obj = (result.d);
                        if (obj != "") {
                            tblTaskHWCWDetail += "<tr><th rowspan='2' style='text-align: center; padding-top: 20px;'><b>Org Group Name</b></th><th colspan='3' style='text-align: center;'><b>Class Work</b></th><th colspan='3' style='text-align: center;'><b>Home Work</b></th></tr>";
                            tblTaskHWCWDetail += "<tr><th style='text-align: center;'>Assign</th><th style='text-align: center;'>Pending</th><th style='text-align: center;'>N/A</th><th style='text-align: center;'>Assign</th><th style='text-align: center;'>Pending</th><th style='text-align: center;'>N/A</th></tr>";
                            $.each(obj, function (i, item) {
                               // tblTaskHWCWDetail += "<tr><td>" + item.OrgGroup + "</td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=11&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.TotalAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=12&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PendingAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgAttnDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&TypeId=13&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.ComplatedAttendance + "</a></td></tr>";
                                tblTaskHWCWDetail += "<tr><td>" + item.OrgGroup + "</td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=21'>" + item.ClassWorkAssigned + "</a></td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=22'>" + item.ClassWorkNotAssigned + "</a></td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=23'>" + item.ClassWorkNotApplicable + "</a></td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=24'>" + item.HomeWorkAssigned + "</a></td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=25'>" + item.HomeWorkNotAssigned + "</a></td><td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "&TypeId=26'>" + item.HomeWorkNotApplicable + "</a></td></tr>"
                                //<td><a href='../MobileView/ConsolidateOrgClassWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PendingAttendance + "</a></td><td><a href='../MobileView/ConsolidateOrgHomeWorkDetailDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&Date=" + TaskCurrentDate + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.ComplatedAttendance + "</a></td></tr>";
                            });
                        }
                        else {
                           // tblTaskHWCWDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                        }
                        $("#TaskHWCWSummaryLoader").css("display", "none");
                        document.getElementById("tblTaskHWCWDetail").innerHTML = tblTaskHWCWDetail;
                        //alert("hi");
                        //StudentAttndDetailsGroupWiseDataBind(CurrentDate);
                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                    }
                });
            }
        }

        function ExamFunction() {
            ExamTypeId = $("#drpExam").val();
            $("#ResultSummaryLoader").css("display", "block");
            GetExamId()
        }

        function FeeCommonOrgGroupBatchFunction() {
            debugger;
            $("#tblFeeStatus").html('');
            CommonOrgGroupBatchIdFee = $("#drpFeeCommonOrgGroupBatch").val();

            $("#FeeStatusLoader").css("display", "block");
            FeeStatusDataBind();
        }

        function TaskDateFunction() {
            //alert("hi task");
            TaskCurrentDate = $('#TaskDatePicker').val().split("/").reverse().join("-");
            $("#tblTaskDetail").html('');
            $("#TaskSummaryLoader").css("display", "block");
            GetTaskData(TaskCurrentDate);
        }
        function TaskHWCWDateFunction()
        {
            TaskCurrentDate = $('#TaskHWCWDatePicker').val().split("/").reverse().join("-");
            $("#tblTaskHWCWDetail").html('');
            $("#TaskHWCWSummaryLoader").css("display", "block");
            GetTaskDataCWHW(TaskCurrentDate);
        }
        function DateFunction() {

            CurrentDate = $('#StdAttendanceDate').val().split("/").reverse().join("-");
            //alert(CurrentDate);
            $("#tblStudentAttndGroupWiseDetail").html('');
            $("#StudentAttndLoader").css("display", "block");
            StudentAttndDetailsGroupWiseDataBind(CurrentDate);
        }
        function DateFunctionStaff() {

            // alert("hi Staff");

            CurrentDate = $('#StaffAttendanceDate').val().split("/").reverse().join("-");
            $("#tblStaffAttndGroupWiseDetail").html('');
            $("#StaffAttndLoader").css("display", "block");
            StaffAttndDetailsGroupWiseDataBind(CurrentDate);
            // GetTaskData(TaskCurrentDate);
        }
        function ReceiptStatusFromDateFunction() {
            //alert("hi task");
            //  debugger;

            if ($('#ReceiptStatusFromDatePicker').val() == "") {
                //alert("From Date should not be blank");
                $('#ReceiptStatusFromDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                //return;
            }
            if ($('#ReceiptStatusToDatePicker').val() == "") {
                // alert("To Date should not be blank");
                $('#ReceiptStatusToDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                //return;
            }

            ReceiptStatusFromDatePickerDate = $('#ReceiptStatusFromDatePicker').val().split("/").reverse().join("-");
            ReceiptStatusToDatePickerDate = $('#ReceiptStatusToDatePicker').val().split("/").reverse().join("-");

            var FDate = new Date(ReceiptStatusFromDatePickerDate);
            var TDate = new Date(ReceiptStatusToDatePickerDate);

            if (FDate <= TDate) {
                // Do something

                // GetTaskData(FeeStatusFromDatePickerDate);

                ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
            }
            else {
                $('#ReceiptStatusFromDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                alert("From Date should be greate than To Date");
            }

        }
        function ReceiptStatusToDateFunction() {
            //debugger;
            //alert("hi task");

            if ($('#ReceiptStatusFromDatePicker').val() == "") {
                //alert("From Date should not be blank");
                $('#ReceiptStatusFromDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                //return;
            }
            if ($('#ReceiptStatusToDatePicker').val() == "") {
                //alert("To Date should not be blank");
                $('#ReceiptStatusToDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                //return;
            }



            ReceiptStatusFromDatePickerDate = $('#ReceiptStatusFromDatePicker').val().split("/").reverse().join("-");
            ReceiptStatusToDatePickerDate = $('#ReceiptStatusToDatePicker').val().split("/").reverse().join("-");

            var FDate = new Date(ReceiptStatusFromDatePickerDate);
            var TDate = new Date(ReceiptStatusToDatePickerDate);

            if (FDate <= TDate) {
                // Do something

                // GetTaskData(FeeStatusFromDatePickerDate);

                ReceiptDetailDataBind(ReceiptStatusFromDatePickerDate, ReceiptStatusToDatePickerDate);
            }
            else {
                $('#ReceiptStatusToDatePicker').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                alert("To Date should be less than To Date");
            }

        }

        function StudentAttndDetailsGroupWiseDataBind(CurrentDate) {
            //alert(CurrentDate);
            //var d = new Date();
            //var curr_date = d.getDate();
            //var curr_month = d.getMonth() + 1; //Months are zero based
            //var curr_year = d.getFullYear();
            //document.write(curr_year + "-" + curr_month + "-" + curr_date);
            //var CurrentDate = curr_year + "-" + curr_month + "-" + curr_date;
            //var CurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
            //var CurrentDate = '2018-11-27';
            //alert(CurrentDate);
            //debugger;
            var tblStudentAttndGroupWiseDetail = "";
            var checkValid = isValidDate2($("#StdAttendanceDate"));
            if (checkValid == false) {
                $("#StdAttendanceDate").val('');
                tblStudentAttndGroupWiseDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblStudentAttndGroupWiseDetail").innerHTML = tblStudentAttndGroupWiseDetail;
                $('#StdAttendanceDate').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                CurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                StudentAttndDetailsGroupWiseDataBind(CurrentDate);
                alert('Invalid date!');
            }

            else {

                $.ajax({
                    async: false,
                    type: "POST",
                    url: "ConsolidateDashboard.aspx/StudentAttndDetailsGroupWiseDataBind",
                    data: JSON.stringify({ "TypeId": 1, "UpTodate": CurrentDate, "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee), "SyncData": parseInt(SyncData) }),

                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {

                        var obj = (result.d);

                        if (obj != "") {
                            tblStudentAttndGroupWiseDetail += "<tr><th style='display:none'>OrgGroupId</th><th>Org Group Name</th><th>Total</th><th>Present</th><th>Absent</th><th>Pending</th><th>PR<70%</th><th>100%</th><th>Continue AB</th><th>Leave Request</th></tr>";
                            $.each(obj, function (i, item) {
                                //tblStudentAttndGroupWiseDetail += "<tr><td>" + item.OrgGroupId + "</td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=1'>" + item.ReceiptCount + "</a></td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=2'>" + item.ReceiptAmount + "</a></td><td><a href='../MobileView/ConsolidateReceiptDetailsDashBoard.aspx?OrgId=" + encodeURIComponent(item.OrgGroupId) + "&Count=3'>" + item.CancelAmount + "</a></td></tr>";
                                
                               // var NotTaken = item.Total - (item.PresentStudent + item.AbsentStudent);
                                //tblStudentAttndGroupWiseDetail += "<tr><td>" + item.OrgGroupId + "</td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=2&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "'>" + item.OrgTitle + "</a></td><td><a href='../MobileView/StudentAttendanceDivisionDetails.aspx?TypeId=11&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "'>" + item.Total + "</a></td><td>" + item.PresentStudent + "</td><td>" + item.AbsentStudent + "</td><td>" + item.LessThen70 + "</td><td>" + item.HundredPer + "</td><td>" + item.AbsentCount + "</td><td>" + item.LeaveRequest + "</td><td>" + item.AttnNotTakenClass + "</td></tr>";
                                //tblStudentAttndGroupWiseDetail += "<tr><td>" + item.OrgGroupId + "</td><td>" + item.OrgGroupTitle + "</td><td>" + item.OrgId + "</td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=2&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.OrgGroupTitle + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=11&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.Total + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=12&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.PresentStudent + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=13&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0'>" + item.AbsentStudent + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=14&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.LessThen70 + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=15&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.HundredPer + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=17&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.AbsentCount + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=16&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.LeaveRequest + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=18&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0'>" + item.AttnNotTakenClass + "</a></td></tr>";
                                tblStudentAttndGroupWiseDetail += "<tr><td style='display:none'>" + item.OrgGroupId + "</td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=2&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroupTitle + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=11&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Total + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=12&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.PresentStudent + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=13&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AbsentStudent + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=18&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AttnNotTakenClass + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=14&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.LessThen70 + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=15&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.HundredPer + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=17&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AbsentCount + "</a></td><td><a href='../MobileView/StudentAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=16&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DivisionId=0&GenderType=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.LeaveRequest + "</a></td></tr>";




                                //total += parseInt(item.StudentCount);
                            });
                            //tblFeeStatus += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + total + "</td></tr>";
                        }
                        else { tblStudentAttndGroupWiseDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                        $("#StudentAttndLoader").css("display", "none");
                        document.getElementById("tblStudentAttndGroupWiseDetail").innerHTML = tblStudentAttndGroupWiseDetail;
                        document.getElementById("StudentDate").innerHTML = obj[0].LastUpdatedDate;
                        
                        //debugger;


                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                        // $("#LoaderDiv1").hide();
                    }
                });
            }
        }

        function StaffAttndDetailsGroupWiseDataBind(CurrentDate) {

            var tblStaffAttndGroupWiseDetail = "";
            var checkValid = isValidDate2($("#StaffAttendanceDate"));
            if (checkValid == false) {
                $("#StaffAttendanceDate").val('');
                tblStaffAttndGroupWiseDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>";
                document.getElementById("tblStaffAttndGroupWiseDetail").innerHTML = tblStaffAttndGroupWiseDetail;
                $('#StaffAttendanceDate').val($.datepicker.formatDate('dd/mm/yy', new Date()));
                CurrentDate = $.datepicker.formatDate('yy/mm/dd', new Date());
                StaffAttndDetailsGroupWiseDataBind(CurrentDate);
                alert('Invalid date!');
            }

            else {

                $.ajax({
                    async: false,
                    type: "POST",
                    url: "ConsolidateDashboard.aspx/StaffAttndDetailsGroupWiseDataBind",
                    data: JSON.stringify({ "TypeId": 1, "UpTodate": CurrentDate, "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee), "SyncData": parseInt(SyncData) }),

                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        //alert(result.d);

                        var obj = (result.d);



                        if (obj != "") {
                            //tblStaffAttndGroupWiseDetail += "<tr><th>Dept</th><th style='display:none'>OrgGroupId</th><th>Org Group Name</th><th>Total</th><th>Present</th><th>Absent</th><th>Leave</th><th>Ab<10%</th><th>Continue AB</th><th>Continue Leave</th><th>100%</th></tr>";
                            tblStaffAttndGroupWiseDetail += "<tr><th style='display:none'>OrgGroupId</th><th>Org Group Name</th><th>Total</th><th>Present</th><th>Absent</th><th>Pending</th><th>Leave</th><th>Ab<10%</th><th>Continue AB</th><th>Continue Leave</th><th>100%</th></tr>";
                            $.each(obj, function (i, item) {

                                //tblStaffAttndGroupWiseDetail += "<tr><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0'>Get</a></td><td style='display:none'>" + item.OrgGroupId + "</td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=2&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0'>" + item.OrgGroupTitle + "</a></td><td>" + item.Total + "</td><td>" + item.Present + "</td><td>" + item.Absent + "</td><td>" + item.Leave + "</td><td>" + item.AB10 + "</td><td>" + item.AB3Days + "</td><td>" + item.Leave3Day + "</td><td>" + item.HundredPerAttn + "</td></tr>";
                                tblStaffAttndGroupWiseDetail += "<tr><td style='display:none'>" + item.OrgGroupId + "</td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=2&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroupTitle + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=31&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Total + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=32&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Present + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=33&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Absent + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=34&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AttnNotTaken + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=35&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Leave + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=36&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AB10 + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=37&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.AB3Days + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=38&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Leave3Day + "</a></td><td><a href='../MobileView/StaffAttendanceDetailsOrgWiseDashBoard.aspx?TypeId=3&TypeId1=39&UpToDate=" + CurrentDate + "&OrgGroupId=" + item.OrgGroupId + "&OrgId=0&DepartmentId=0&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.HundredPerAttn + "</a></td></tr>";


                            });

                        }
                        else { tblStaffAttndGroupWiseDetail += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                        //debugger;

                        document.getElementById("tblStaffAttndGroupWiseDetail").innerHTML = tblStaffAttndGroupWiseDetail;
                        document.getElementById("StaffDate").innerHTML = obj[0].LastUpdatedDate;
                        // 

                    },
                    complete: function () {
                        //alert('hi');
                        $("#StaffAttndLoader").css("display", "none");
                    },
                    error: function (xhr, status, error) {
                        var err = eval("(" + xhr.responseText + ")");
                        console.log(err.Message);
                        // $("#LoaderDiv1").hide();
                    }
                });
            }

        }
        function GetEmployeeSummary() {
            $.ajax({
                type: "POST",
                url: "ConsolidateDashboard.aspx/GetEmployeeSummary",
                contentType: "application/json; charset=utf-8",
                //data: JSON.stringify({ "OrgGroupId": 0, "TypeId": 1, "Type": 'OrgGroup' }),
                data: JSON.stringify({ "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchIdFee) }),
                dataType: "json",
                success: function (result) {

                    var obj = (result.d);
                    var tblAdmissionCount = "";
                    var totaladmission = 0;
                    if (obj != "") {
                        tblAdmissionCount += "<tr><th>Org Group Name</th><th>Total</th><th>Active</th></tr>";
                        $.each(obj, function (i, item) {
                            tblAdmissionCount += "<tr><td><a href='../MobileView/ConsolidateEmployeeSummaryCountDashBord.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.OrgGroupName + "</a></td><td><a href='../MobileView/ConsolidateEmployeeSummaryStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Total + "</a></td><td><a href='../MobileView/ConsolidateEmployeeSummaryStatusDashBoard.aspx?OrgGroupId=" + item.OrgGroupId + "&CommonOrgGroupBatchId=" + CommonOrgGroupBatchIdFee + "'>" + item.Active + "</a></td></tr>";
                        });

                    }
                    else { tblAdmissionCount += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                    document.getElementById("EmployeeSummaryDetail").innerHTML = tblAdmissionCount;

                    //GetCommonOrgGroupBatchForInquiry();

                    //$("#AdmissionCountLoader").css("display", "none");
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });
        }
        function SyncDataFunction()
        {
            SyncData = 1;
            AssignPermission();
            location.reload();
        }
        function BackOrgFunction() { window.location.href = "../MobileView/DashBoard.aspx"; CurrentBatchGet(); }
        function DashBoard() { window.location.href = "../MobileView/DashBoard.aspx"; }
    </script>
    <asp:UpdatePanel ID="DoctorScheduleUpdatePanel" runat="server">
        <ContentTemplate>

            <div class="page-header row mb20">
                <div class="col-xl-12 col-sm-12 col-xs-12 border-bottom-inline padd-0">
                    <div class="col-md-12 ptb12 d-inline-flex">
                        <span class='btn btn-home btn-icon' onclick='DashBoard()' title='home'><span><i class='material-icons'>home</i></span></span>
                        <div class="d-inline-flex w-100">
                            <label class="header-topic justify-content-center" id="HeaderLabel">Consolidate DashBoard</label>
                        </div>
                        <input type="button" value="&#xf3e5;" id="bntBackOrg" onclick="BackOrgFunction()" skinid="0" class="float-right btn btn-back btn-icon fas" />
                    </div>
                    <div class="main-topic inner" id="HeaderTitle">
                    </div>
                </div>
            </div>

            <div class="bg-white row center-block mb4" id="FeeStatusHead1">
                <div style="width: 100%; overflow: hidden">

                    <div style="float: left">
                        <div class="custom-select width-17" style="width: 170%; margin-left: 32px; margin-top: 32px;">
                            <div class='fLeft pRight5'>
                                <select id='drpFeeCommonOrgGroupBatch' onchange="FeeCommonOrgGroupBatchFunction()">
                                    <option selected="selected" value='0'>Select</option>
                                </select>
                            </div>
                        </div>

                    </div>
                     <input type="button" value="&#8635;" id="btnUpdate" onclick="SyncDataFunction()" skinid="0" class="float-right btn btn-back btn-icon fas"  style="font-size:25px; width: 4%; padding:2px; margin-right: 10px; margin-top: 25px;"/>

                </div>
                <div class="bg-white row center-block mb4" id="FeeStatusHead" style="display: none">
                    <div class="container-fluid">
                        <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                            <%--<input type="button" value="Back" id="bntBack1" onclick="BackFunction1()" style="display:none" />
                        <input type="button" value="Back" id="bntBack2" onclick="BackFunction2()" style="display:none" />--%>
                            <div class="himssuHeader1WireBox col-md-12 pTop5">
                                <h3 class="table-topic frst">Fee Status</h3>
                                <span class="table-topic date-topic" id="CreateDate"></span>
                            </div>
                            <div class="himssuHeader1WireBox col-md-12 pTop5">
                                <%--onkeyup="return FormatIt(this);" onblur="return isValidDate2(this);"--%>
                                <div class="cBoth"></div>
                                <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                                <div class='himsBoxContent'>
                                    <div class='table-responsive'>
                                        <table id='tblFeeStatus' class='table table-striped table-bordered'>
                                        </table>
                                    </div>
                                </div>
                                <div class="se-pre-con" id="LoaderDiv1" style="display: none"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="ReceiptDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Receipt Detail</h3>
                            <span class="table-topic date-topic" id="ReceiptCreateDate"></span>
                            <div class="cboth"></div>

                            <div style="width: 100%; overflow: hidden">

                                <div style="float: left">From Date</div>
                                <div style="float: left; margin-left: 12px">
                                    <input id="ReceiptStatusFromDatePicker" maxlength="10" onchange="ReceiptStatusFromDateFunction()" onkeyup="return FormatIt(this);" />

                                </div>

                                <div style="float: left; margin-left: 20px">To Date</div>
                                <div style="float: left; margin-left: 12px">
                                    <input id="ReceiptStatusToDatePicker" maxlength="10" onchange="ReceiptStatusToDateFunction()" onkeyup="return FormatIt(this);" />

                                </div>

                                <div style="float: left; margin-left: 106px">
                                    <img id="ReceiptStatusLoader" style="display: none; position: relative; left: 16%; top: 1px;" src="../../Images/Loading1.gif" />
                                </div>
                            </div>
                            <div class="cboth"></div>


                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class='himsBoxContent' style="margin-top: 15px">
                                <div class='table-responsive'>
                                    <table id='tblReceiptDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="ClassHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Class Wise Student</h3>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <table id='tblClss' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="DivisionHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Division Wise Student</h3>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <table id='tblDivision' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="StudentHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Student List </h3>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <table id='tblstudent' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
                    <div class="bg-white row center-block mb4" id="FeeCollectionPayTypeHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Fee Collection PayType Summary </h3>
                            <div class='himsBoxContent pTop5' style="padding-top: 20px">
                                <div class='table-responsive'>
                                    <table id='tblFeeCollectionPayType' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="ResultDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Overall Result Summary </h3>
                            <div class="cBoth"></div>
                            <div class="custom-select width-17">
                                <div class='fLeft pRight5'>
                                    <select id='drpExam' onchange="ExamFunction()">
                                        <option selected="selected" value='0'>Select</option>
                                    </select>
                                    &nbsp;&nbsp;<img id="ResultSummaryLoader" style="display: none; position: relative; left: 113%; top: -51px;" src="../../Images/Loading1.gif" />
                                </div>
                                <div class="cBoth"></div>
                            </div>
                            <div class="cBoth"></div>

                            <div class='himsBoxContent pTop5'>
                                <div class='table-responsive'>
                                    <br />
                                    <table id='tblResult' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="AdmissionCountHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Admission Count Summary</h3>
                            <span class="table-topic date-topic" id="AdmissionCreateDate"></span>
                            <%-- <div class="cBoth"></div>
                            <div class="custom-select width-17">
                                <div class='fLeft pRight5'>
                                    <select id='drpAdmissionCount' onchange="CommonOrgGroupBatchFunction()">
                                        <option selected="selected" value='0'>Select</option>
                                    </select>
                                    &nbsp;&nbsp;<img id="AdmissionCountLoader" style="display: none; position: relative; left: 113%; top: -51px;" src="../../Images/Loading1.gif" />
                                </div>
                                <div class="cBoth"></div>
                            </div>
                            <div class="cBoth"></div>--%>


                            <div class='himsBoxContent pTop5' style="padding-top: 20px">
                                <div class='table-responsive'>
                                    <table id='tblAdmissionCount' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="AdmissionInquiryHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Admission Inquiry Count Summary </h3>
                             <span class="table-topic date-topic" id="InquiryCreateDate"></span>

                            <%--<div class="cBoth"></div>
                            <div class="custom-select width-17">
                                <div class='fLeft pRight5'>
                                    <select id='drpAdmissionInquiryCount' onchange="CommonOrgGroupBatchForInquiryFunction()">
                                        <option selected="selected" value='0'>Select</option>
                                    </select>
                                    &nbsp;&nbsp;<img id="AdmissionInquiryCountLoader" style="display: none; position: relative; left: 113%; top: -51px;" src="../../Images/Loading1.gif" />
                                </div>
                                <div class="cBoth"></div>
                            </div>
                            <div class="cBoth"></div>--%>


                            <div class='himsBoxContent pTop5' style="padding-top: 20px">
                                <div class='table-responsive'>
                                    <table id='tblAdmissionInquiry' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="TaskDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Task Attendance Detailed Summary </h3>
                            <div class="cBoth"></div>
                            <input id="TaskDatePicker" maxlength="10" onchange="TaskDateFunction()" onkeyup="return FormatIt(this);" />
                            &nbsp;&nbsp;<img id="TaskSummaryLoader" style="display: none; position: relative; left: 16%; top: -30px;" src="../../Images/Loading1.gif" />
                            <%--onkeyup="return FormatIt(this);" onblur="return isValidDate2(this);"--%>
                            <div class="cBoth"></div>
                            <div class='himsBoxContent pTop5'>
                                <br />
                                <div class='table-responsive'>
                                    <table id='tblTaskDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
                  <div class="bg-white row center-block mb4" id="TaskHWCWDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Task CW/HW Detailed Summary </h3>
                            <div class="cBoth"></div>
                            <input id="TaskHWCWDatePicker" maxlength="10" onchange="TaskHWCWDateFunction()" onkeyup="return FormatIt(this);" />
                            &nbsp;&nbsp;<img id="TaskHWCWSummaryLoader" style="display: none; position: relative; left: 16%; top: -30px;" src="../../Images/Loading1.gif" />
                            <%--onkeyup="return FormatIt(this);" onblur="return isValidDate2(this);"--%>
                            <div class="cBoth"></div>
                            <div class='himsBoxContent pTop5'>
                                <br />
                                <div class='table-responsive'>
                                    <table id='tblTaskHWCWDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="StudentAttndGroupWiseDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Student Attendance</h3>
                            <span class="table-topic date-topic" id="StudentDate"></span>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class="cBoth"></div>
                            <input id="StdAttendanceDate" maxlength="10" onchange="DateFunction()" onkeyup="return FormatIt(this);" />
                            &nbsp;&nbsp;<img id="StudentAttndLoader" style="display: none; position: relative; left: 16%; top: -30px;" src="../../Images/Loading1.gif" />
                            <div class="cBoth"></div>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <br />
                                    <table id='tblStudentAttndGroupWiseDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-white row center-block mb4" id="StaffAttndGroupWiseDetailHead" style="display: none">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic frst">Staff Attendance</h3>
                            <span class="table-topic date-topic" id="StaffDate"></span>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class="cBoth"></div>
                            <input id="StaffAttendanceDate" maxlength="10" onchange="DateFunctionStaff()" onkeyup="return FormatIt(this);" />
                            &nbsp;&nbsp;<img id="StaffAttndLoader" style="display: none; position: relative; left: 16%; top: -30px;" src="../../Images/Loading1.gif" />
                            <div class="cBoth"></div>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <br />
                                    <table id='tblStaffAttndGroupWiseDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <%--<input type="hidden" id="Departmentid" runat="server" />
                         <input type="hidden" id="ClassHiddenId" runat="server" />
                         <input type="hidden" id="DivisionHiddenId" runat="server" />--%>
                    </div>
                </div>
            </div>
              <div class="bg-white row center-block mb4" id="EmployeeSummaryDetailHead">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn overflow-hidden" data-toggle="appear">
                        <div class="himssuHeader1WireBox col-md-12 pTop5">
                            <h3 class="table-topic">Employee Summary</h3>
                            <%-- <asp:PlaceHolder ID="DepartMentPlaceHolder" runat="server" /> --%>
                            <div class="cBoth"></div>
                            <div class='himsBoxContent'>
                                <div class='table-responsive'>
                                    <br />
                                    <table id='EmployeeSummaryDetail' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <%--<input type="hidden" id="Departmentid" runat="server" />
                         <input type="hidden" id="ClassHiddenId" runat="server" />
                         <input type="hidden" id="DivisionHiddenId" runat="server" />--%>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">

        $(function () {

            $("#StdAttendanceDate").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });

            $("#StaffAttendanceDate").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });

            $("#TaskDatePicker").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });

            $("#ReceiptStatusFromDatePicker").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });

            $("#ReceiptStatusToDatePicker").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });
            $("#TaskHWCWDatePicker").datepicker({
                dateFormat: 'dd/mm/yy', showOn: "button",
                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                buttonImageOnly: true
            });


        })
    </script>
</asp:Content>
