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

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

           var OrgId 
           var TypeId 

           $(document).ready(function () {
               var myurl = window.location.href;
               var keyval = myurl.split('?')[1].split('&');
               OrgId = parseInt(keyval[0].split('=')[1].toString());
               CommonOrgGroupBatchId = parseInt(keyval[1].split('=')[1].toString());
               TypeId = 2;
               TypeId = 1;
               Type = 'Status';
               //if (item.RoleDashletId == 71 && item.IsCheck == true) {
               //    document.getElementById("AdmissionCountOrgHead").style.display = "block";
               //}

               AdmissionStatusStudentDataBind(OrgId, TypeId, Type);
           });

           function AdmissionStatusStudentDataBind(OrgId, TypeId, Type) {
               $.ajax({
                   type: "POST",
                   url: "ConsolidateInquiryStatusDashBoard.aspx/AdmissionStatusOrgWiseGet",
                   data: JSON.stringify({ "OrgId": parseInt(OrgId), "TypeId": 1, "Type": 'Status', "CommonOrgGroupBatchId": parseInt(CommonOrgGroupBatchId) }),
                   contentType: "application/json; charset=utf-8",
                   dataType: "json",
                   success: function (result) {
                       var obj = (result.d);
                       var tblAdmissionStatusCountOrgWise = "";
                       var totaladmissionorgwise = 0;
                       if (obj != "") {
                           tblAdmissionStatusCountOrgWise += "<tr><th>Inquiry Status</th><th>Count</th></tr>";
                           $.each(obj, function (i, item) {
                               tblAdmissionStatusCountOrgWise += "<tr><td>" + item.Status + "</td><td>" + item.StatusCount + "</td></tr>";
                               totaladmissionorgwise += parseInt(item.StatusCount);
                           });
                           tblAdmissionStatusCountOrgWise += "<tr><td style='font-weight:bold'>Total</td><td style='font-weight:bold'>" + totaladmissionorgwise + "</td></tr>";
                       }
                       else { tblAdmissionStatusCountOrgWise += "<tr><td colspan='8' class='record'>No records found..!!</td></tr>"; }
                       document.getElementById("tblAdmissionStatusCountOrgWise").innerHTML = tblAdmissionStatusCountOrgWise;
                   }
               });
           }

           //function GroupFunction() {
           //    GroupId = $("#drpGroup").val();
           //    BrightStudentDataBind(OrgGroupId,GroupId,NoOfTopStudent)
           //}

           //function NoOfStdFunction() {
           //    NoOfTopStudent = $("#drpNoOfStudent").val();
           //    BrightStudentDataBind(OrgGroupId, GroupId, NoOfTopStudent);
           //}

           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">Admission Inquiry Status Summary</h3>
                            <div class='himsBoxContent pTop5'>
                                <div class='table-responsive'>
                                    <table id='tblAdmissionStatusCountOrgWise' class='table table-striped table-bordered'>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
 
</asp:Content>
