<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Assessment_General_ReportCriteria_ResultReportAnalysis, App_Web_vcvlcqwm" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="Common" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch"
    TagPrefix="Std" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <script type="text/javascript">
        function Line() {
            var hfLablepring = document.getElementById('<%=hfLablepring.ClientID%>').value;
            var aLabels = hfLablepring.split(",");
            var hfYaxis = document.getElementById('<%=hfYaxis.ClientID%>').value;
            var aDatasets1 = hfYaxis.split(",");
            var hfYaxis1 = document.getElementById('<%=hfYaxis1.ClientID%>').value;
            var aDatasets2 = hfYaxis1.split(",");
            var data = {
                labels: aLabels,
                exportEnabled: true,
                datasets: [{
                    label: "Pass Student",
                    fillColor: "rgba(220,220,220,0.2)",
                    strokeColor: "rgba(220,220,220,1)",
                    pointColor: "rgba(220,220,220,1)",
                    pointStrokeColor: "#fff",
                    pointHighlightFill: "#fff",
                    pointHighlightStroke: "rgba(220,220,220,1)",
                    borderColor: ['rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)',
                                       'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)', 'rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)',
                                       'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)'
                                       , 'rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)',
                                       'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)'],
                    borderWidth: 1,
                    data: aDatasets1
                },
                    {
                        label: "Fail Student",
                        fillColor: "rgba(220,220,220,0.2)",
                        strokeColor: "rgba(220,220,220,1)",
                        pointColor: "rgba(220,220,220,1)",
                        pointStrokeColor: "#fff",
                        pointHighlightFill: "#fff",
                        pointHighlightStroke: "rgba(220,220,220,1)",
                        borderColor: ['rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)',
                                     'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)', 'rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)',
                                     'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)'
                                     , 'rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)',
                                     'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)'],
                        borderWidth: 1,
                        data: aDatasets2
                    }]
            };

            var ctx = $("#myChart").get(0).getContext('2d');
            ctx.canvas.height = 300;
            var imgageData = ctx.canvas.toDataURL("image/png");


            var myNewChart = new Chart(ctx, {
                type: "bar",
                data: data,
            });


        }

    </script>
    <script type="text/javascript">
        function Download() {
            html2canvas($("#myChart"), {
                onrendered: function (canvas) {
                    var imgData = canvas.toDataURL(
                        'image/png');
                    var doc = new jsPDF('p', 'mm');
                    doc.addImage(imgData, 'PNG', 10, 10);
                    doc.save('sample-file.pdf');
                }
            });
        }
    </script>
    <asp:UpdatePanel ID="StudentReportUpdatePanel" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="PrintButton" />
        </Triggers>
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
            <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />

            <div id="divContentPage" class="divcontentpagemargin">
                <!-- ContentPlaceHolder Box Starts -->

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <div class="himsBoxContent">
                            <div class="leftUlMenu">
                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="105"
                                    Visible="true" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader2WireBox">
                        <div class="contentHolder">
                            <div class="himssuHeader1WireBox card card-box">
                                <div class="himsBoxHeader card-head">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            Criteria
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBoxContent card-body">
                                    <div class="contentHolder">
                                        <asp:Panel ID="StudentReportListDiv" runat="server" meta:resourcekey="SkillDivResource1">

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ReportLabel" runat="server" Text="Report" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="ReportDropDownList" runat="server" DataTextField="Name" DataValueField="Id"
                                                        class="form-control" SkinID="CustomWidthDropDownList" AutoPostBack="true" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" OnSelectedIndexChanged="ReportDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ViewModeLabel" runat="server" Text="View Mode"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="ViewModeDropDownList" runat="server" class="form-control" SkinID="CustomWidthDropDownList"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="ViewModeDropDownListResource" />
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                        AutoPostBack="true" onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                        OnSelectedIndexChanged="DepartmentDropDownList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="ClassDropDownList" runat="server" class="form-control" SkinID="CustomWidthDropDownList" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" meta:resourcekey="ClassDropDownListResource" AutoPostBack="true"
                                                        OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged" />
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="DivisionLabel" runat="server" Text="Division"></asp:Label>
                                                </div>
                                                <asp:DropDownList ID="DivisionDropDownList" runat="server"
                                                    class="form-control" SkinID="CustomWidthDropDownList" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" AutoPostBack="false" />
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ExamLabel" runat="server" Text="Exam" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <asp:DropDownList ID="ExamDropDownList" runat="server"
                                                    class="form-control" SkinID="CustomWidthDropDownList" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="ExamDropDownList_OnSelectedIndexChanged" />
                                            </div>

                                            <asp:Panel ID="StudentSearchPanel" runat="server">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="StudentIdNoLabel" runat="server" Text="Id No"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 display-flex">
                                                        <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200" AutoPostBack="true">
                                                        </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton"
                                                            runat="server" ImageUrl="../../../../Images/icons/icon_find.gif" />
                                                        <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="FromRollNoLabel" runat="server" Text="From Roll No"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="FromRollNoTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ToRollNoLabel" runat="server" Text="To Roll No"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="ToRollNoTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" />
                                                </div>
                                            </div>

                                            <div class="outerBox11 pTop15 col-md-3">
                                                <div class="select">
                                                    <asp:CheckBox ID="ClassCheckBox" runat="server" AutoPostBack="True" Text="Class" OnCheckedChanged="ClassCheckBox_OnCheckedChanged" />
                                                    <%--  <asp:Label ID="ClassDivisionLabel" runat="server" ></asp:Label>--%>
                                                </div>
                                                <div id="ClassDivisionDiv" runat="server" visible="False" class="fLeft pRight5 chck-dropdown-onclick bg-lghtgrey overflow-x-hidden padd-0">
                                                    <asp:CheckBoxList ID="ClassDivisionCheckBoxList" runat="server">
                                                    </asp:CheckBoxList>
                                                </div>
                                            </div>

                                            <div class="col-md-12 bg-lghtgrey radiobtn">
                                                <div class="col-md-2">
                                                    <asp:RadioButton ID="rbHTML" Text="HTML" runat="server" GroupName="Type" Checked="True" />
                                                </div>
                                                <div class="col-md-2">
                                                    <asp:RadioButton ID="rbExcel" Text="EXCEL" runat="server" GroupName="Type" />
                                                </div>
                                                <div class="col-md-2">
                                                    <asp:RadioButton ID="rbPdf" Text="PDF" runat="server" GroupName="Type" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SubjectLabel" runat="server" Text="Subject" Visible="false" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <asp:DropDownList ID="SubjectDropDownList" runat="server"
                                                    class="form-control" SkinID="CustomWidthDropDownList" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" AutoPostBack="false" Visible="false" />
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="FromPercentageLabel" runat="server" Text="From Percentage" Visible="false"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="FromPercentageTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ToPercentageLabel" runat="server" Text="To Percentage" Visible="false"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="ToPercentageTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" />
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="TopeLabel" runat="server" Text="Top Student" Visible="false"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="TopTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" />
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="GroupLabel" runat="server" Text="Group By" Visible="false"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="GroupByDropDownList" runat="server"
                                                        class="form-control" SkinID="CustomWidthDropDownList" Visible="false">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div id="RankGradediv" runat="server" visible="false">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="GradeLabel" runat="server" Text="Grade"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="GradeTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="outerBox11 pTop15 col-md-3">
                                                <div class="">
                                                    <asp:CheckBox ID="ExamCheckBox" runat="server" AutoPostBack="True" Visible="false" OnCheckedChanged="ExamCheckBox_OnCheckedChanged" />
                                                    <asp:Label ID="ExamNameLabel" runat="server" Visible="false" Text="Exam">   </asp:Label>
                                                </div>
                                                <div id="Div1" runat="server" class="fLeft pRight5 chck-dropdown-onclick bg-lghtgrey overflow-x-hidden padd-0" visible="false">
                                                    <asp:CheckBoxList ID="ExamCheckBoxList" runat="server">
                                                    </asp:CheckBoxList>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>

                                    <div class="alignCenter pTop5 col-md-12">
                                        <asp:HiddenField ID="hfGetdata" runat="server" />
                                        <asp:HiddenField ID="hfLablepring" runat="server" />
                                        <asp:HiddenField ID="hfYaxis" runat="server" />
                                        <asp:HiddenField ID="hfYaxis1" runat="server" />
                                        <asp:Button ID="PrintButton" Text="&#Xf15b; Print" runat="server"
                                            OnClick="PrintButton_Click" meta:resourcekey="PrintButtonResource1" SkinID="0" CssClass="btn-print btn fas" />
                                        <input type="button" id="Download" value="&#Xf15b; Print" onclick="Download()" runat="server" class="btn-print btn fas" />
                                        <asp:HiddenField ID="hfImageData" runat="server" />
                                        <input type="button" id="btnExport" value="&#Xf15b; Print" onclick="PrintPanel()" runat="server" visible="false" class="btn-print btn fas" />

                                        <asp:Button ID="ClearButton" Text="&#Xf12d; Clear" runat="server" SkinID="0" CssClass="btn-clear btn fas"
                                            OnClick="ClearButton_Click" meta:resourcekey="ClearButtonResource1" />
                                        <asp:Panel ID="pnlPerson" runat="server">
                                            <div class="col-md-12 pTop5 pb5">
                                                <canvas id="myChart"></canvas>
                                            </div>


                                            <div style="width: 90%; text-align: center">
                                                <asp:PlaceHolder ID="PlaceHolder1" runat="server" />
                                            </div>
                                        </asp:Panel>

                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <%--HEDP History Ends Here--%>
                </div>
            </div>


        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript" src="../../../../Js/html2canvas.min.js"></script>
    <script type="text/javascript" src="../../../../Js/jquery.min.js"></script>
    <script type="text/javascript" src="../../../../Js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="../../../../js/Chart.min.js"></script>
    <script type="text/javascript" src="../../../../Js/canvas2image.js"></script>
    <%--<script data-main="../../../../JavaScript/rjs/encrypt/resultsheet-reportcriteria-encrypt" src="../../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/resultsheet-reportcriteria")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>

