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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
       <script>

           var OrgGroupId 
           var TypeId
           var CurrentDate
           var CommonOrgGroupBatchId = 0;

           $(document).ready(function () {
               var myurl = window.location.href;
               var keyval = myurl.split('?')[1].split('&');
               OrgGroupId = parseInt(keyval[0].split('=')[1].toString());
               CurrentDate = keyval[1].split('=')[1];
               CommonOrgGroupBatchId = parseInt(keyval[2].split('=')[1].toString());
               GetOrgHomeWorkNotAssignedData(CurrentDate, CommonOrgGroupBatchId);
           });

           function GetOrgHomeWorkNotAssignedData(CurrentDate, CommonOrgGroupBatchId) {
               $.ajax({
                   type: "POST",
                   url: "ConsolidateOrgHomeWorkDetailDashBoard.aspx/OrgHomeWorkNotAssignedGet",
                   data: JSON.stringify({ "OrgGroupId": parseInt(OrgGroupId), "Date": CurrentDate, "CommonOrgGroupBatchId": CommonOrgGroupBatchId }),
                   contentType: "application/json; charset=utf-8",
                   dataType: "json",
                   success: function (result) {
                       var obj = (result.d);
                       var tblHomeWorkOrgWiseNotAssigned = "";
                       //var totaladmissionorgwise = 0;
                       if (obj != "") {
                           tblHomeWorkOrgWiseNotAssigned += "<tr><th>OrgId</th><th>Class</th><th>Subject</th><th>Id</th><th>Employee Name</th><th>Employee Contact</th></tr>";
                           $.each(obj, function (i, item) {
                               tblHomeWorkOrgWiseNotAssigned += "<tr><td>" + item.OrgId + "</td><td>" + item.ClassDivision + "</td><td>" + item.SubjectName + "</td><td>" + item.EmployeeCode + "</td><td>" + item.EmployeeName + "</td><td>" + item.EmployeeContact + "</td></tr>";
                               //totaladmissionorgwise += parseInt(item.AdmissionCount);
                           });
                           //tblAttnCountOrgGroupWise += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + totaladmissionorgwise + "</td></tr>";
                       }
                       else { tblHomeWorkOrgWiseNotAssigned += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                       document.getElementById("tblHomeWorkOrgWiseNotAssigned").innerHTML = tblHomeWorkOrgWiseNotAssigned;
                   }
               });
           }

           function BackOrgFunction() { window.location.href = "../MobileView/ConsolidateDashBoard.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">
                <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" id="AdmissionCountOrgHead" style="display: block">
                            <h3 class="table-topic">HomeWork OrgWise Not Assigned Summary</h3>
                            <div class='himsBoxContent pTop5'>
                                <div class='table-responsive'>
                                    <table id='tblHomeWorkOrgWiseNotAssigned' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
 
</asp:Content>
