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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            GetOrgId();
        });
        function GetOrgId() {
            $.ajax({
                type: "POST",
                url: "EISDashBoard1.aspx/GetOrgId",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    var OrgGroupId = "";
                    var k = 0;
                    $.each(obj, function (i, item) {
                        //alert(obj.length);
                        if (k >= 8) { k = 0; }
                        k++;
                        console.log(item.Title);
                        OrgGroupId += "<div class='col-xs-12 col-sm-6 col-md-4 col-xl-3 mt-43'><a onclick='OrgGroupIdFunction(" + item.Id + ")' class='block text-center bg-image' style='background-image:url(../../App_Themes/mis_db/images/" + k + ".jpeg);'>" +
                       "<div class='block-content block-content-full org-grad aspect-ratio-16-9 d-flex justify-content-center align-items-center'><div> <i class='fas fa-2x fa-school text-white'></i> " +
                       "<div class='font-w600 mt-3 text-uppercase text-white'>" + item.Title + "</div></div></div></a></div>";


                    });
                    document.getElementById("EisDashBorad").innerHTML = OrgGroupId;


                    //$("#MisDashBoard").html(result.d);
                }
            });
        }
        function DashBoard() {
            window.location.href = "../MobileView/DashBoard.aspx";
        }
        function OrgGroupIdFunction(Id) {
            window.location.href = "../MobileView/AlertInnerdashboard.aspx?OrgGroupId=" + Id;
        }
    </script>

    <asp:UpdatePanel ID="DoctorScheduleUpdatePanel" runat="server">
        <ContentTemplate>
            <div class="page-header row mb37">
                <div class="col-md-12 ptb12">
                    <span class="btn btn-home btn-icon" onclick="DashBoard()" title="home">
                        <span>
                            <i class="material-icons">home</i>
                        </span>
                    </span>
                </div>
                <div class="col-xl-6 col-sm-6 col-xs-12 border-bottom-inline xs-padd0">
                    <div class="main-topic db">

                        <h2 class="page-title">Dashboard</h2>
                    </div>
                </div>
                <div class="col-xl-6 col-sm-6 col-xs-12 top-btn db">
                </div>

            </div>
            <div class="bg-body-dark row center-block">
                <div class="container-fluid">
                    <div class="gutters-tiny push js-appear-enabled animated fadeIn" data-toggle="appear">
                        <div class="tab row eis" id="EisDashBorad">
                            <%-- <div class="col-xs-12 col-sm-6 col-md-4 col-xl-3 mt-43" id="OrgGroupId">
                                 <a class="block text-center bg-image">
                                    <div class="block-content block-content-full bg-gd-fruit-op aspect-ratio-16-9 d-flex justify-content-center align-items-center">
                                        <div>
                                            <i class="fas fa-2x fa-school text-white"></i>
                                            <asp:PlaceHolder ID="DataPlaceHolder" runat="server" />
                                            <div class="font-w600 mt-3 text-uppercase text-white">School Name 1</div>
                                        </div>
                                    </div>
                                </a>
                            </div>--%>
                        </div>
                    </div>
                </div>
            </div>

            <script>
                function openNav() {
                    document.getElementById("mySidenav").style.width = "344px";
                }

                function closeNav() {
                    document.getElementById("mySidenav").style.width = "0";
                }
            </script>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
