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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
    <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 FeedBackSend()
        {
            //$.ajax({
            //    type: "POST",
            //    url: "EISDashBoard1.aspx/Submit",
            //    data: JSON.stringify({ "UserName": Test, "Licenceno": 550, "MobileNo": 7878787878 }),
            //    contentType: "application/json; charset=utf-8",
            //    dataType: "json",
            //    success: function (result) {
            //    }
            //});
           var myWindow = window.open("../ZCRM/ClientFeedback.aspx?UserName=Test&Licenceno=500&MobileNo=7878558822");
            //window.location.href = "../ZCRM/ClientFeedback.aspx?UserName=Test&Licenceno=500&MobileNo=7878558822";
        }
        function DashBoard() {
            window.location.href = "../MobileView/DashBoard.aspx";
        }
        function OrgGroupIdFunction(Id) {
            window.location.href = "../MobileView/MobileDashBoard2.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">EIS Dashboard</h2>
                    </div>
                </div>
                <div class="col-xl-6 col-sm-6 col-xs-12 top-btn db">
                    <%--<asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn db-btn far" Text="&#xf248;  MIS" />--%>

                    <%--   <span class="btn bg-white-outline btn-icon" onclick="openNav()">
                        <span>
                            <i class="ti-dashboard"></i>
                            <span>Manage</span>
                        </span>
                    </span>--%>
                </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>
                        <input type="button" value="Send" onclick="FeedBackSend()" target="_blank"/>
                    </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>
