<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Communication_QueryStatus, App_Web_nljof4qm" enableEventValidation="false" viewStateEncryptionMode="Never" %>


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>


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


    <link href="../../App_Themes/newTheme/css/inner-db.css" rel="stylesheet" />
    <script src="../../App_Themes/newTheme/js/Chart.min.js"></script>
    <script src="../../App_Themes/newTheme/js/utils.js"></script>
    <%-- <script src="../../JavaScript/Chart.min.js"></script>  --%>
    <asp:HiddenField ID="QueryCategoryIdHidden" runat="server" Value="0" />
    <asp:HiddenField ID="FromSourceTypeHidden" runat="server" Value="0" />
    <script>
        var QueryCategoryId = 0;
        //var LibraryId = 0;
        $(document).ready(function () {
            $.ajax({
                type: "POST",
                url: "QueryStatus.aspx/QueryCategoryDropDownList",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    debugger;
                    $("#drpQueryCategory").html(result.d);
                    QueryCategoryId = $("#drpQueryCategory").val();
                    LoadData();
                },
                error: function (xhr, status, error) {
                    var err = eval("(" + xhr.responseText + ")");
                    console.log(err.Message);
                }
            });


        });

        function LoadData() {

            $.ajax({
                type: "POST",
                url: "QueryStatus.aspx/LoadData",
                data: JSON.stringify({ "QueryCategoryId": parseInt($("#drpQueryCategory").val()), "FromSourceTypeId": parseInt($("#drpFromSourceTypeId").val()) }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    var obj = (result.d);
                    document.getElementById("TodayNewOpenTickitLabel").innerHTML = obj[0][0].value;
                    document.getElementById("CloseTicketOfTodayLabel").innerHTML = obj[0][1].value;
                    document.getElementById("HoldTicketOfTodayLabel").innerHTML = obj[0][2].value;
                    document.getElementById("OverdueTicketOfTodayLabel").innerHTML = obj[0][3].value;
                    document.getElementById("PendingTicketOfTodayLabel").innerHTML = obj[0][4].value;
                    document.getElementById("PendingTicketOnTodayLabel").innerHTML = obj[0][5].value;
                    debugger;
                    document.getElementById("ctl00_CP_QueryCategoryIdHidden").value = $("#drpQueryCategory").val();
                    document.getElementById("ctl00_CP_FromSourceTypeHidden").value = $("#drpFromSourceTypeId").val();


                }
            });
        }
        <%--function GetListOfQueries(ctrl) {
            debugger;
            if ($(ctrl).attr("Id") == "TodayNewOpenTickitDiv") {
                <% Session["QueryStatusType"] = "TodayNewOpenTickitDiv"; %>
            }
            if ($(ctrl).attr("Id") == "CloseTicketOfTodayDiv") {
                <% Session["QueryStatusType"] = "CloseTicketOfTodayDiv"; %>
            }
            if ($(ctrl).attr("Id") == "HoldTicketOfTodayDiv") {
                <% Session["QueryStatusType"] = "HoldTicketOfTodayDiv"; %>
            }
            if ($(ctrl).attr("Id") == "OverdueTicketOfTodayDiv") {
                <% Session["QueryStatusType"] = "OverdueTicketOfTodayDiv"; %>
            }
            if ($(ctrl).attr("Id") == "PendingTicketOfTodayDiv") {
                <% Session["QueryStatusType"] = "PendingTicketOfTodayDiv"; %>
            }
            if ($(ctrl).attr("Id") == "PendingTicketOnTodayDiv") {
                <% Session["QueryStatusType"] = "PendingTicketOnTodayDiv"; %>
            }

            window.location.href = "../Communication/Query.aspx";

        }--%>

    </script>
    <asp:UpdatePanel ID="QueryStatusUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <div class="himsBoxContent">
                            <div class="leftUlMenu">
                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="114"
                                    Visible="true" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <i class="fas fa-mouse-pointer"></i>
                                    <asp:Label ID="SelectLibraryLabel" runat="server" Text="Query Status"></asp:Label>
                                </div>
                            </div>

                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="row">
                                    <div class="top-btn col-md-12">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>Query Category</label>
                                                <select id='drpQueryCategory' class="form-control custom-select col-12" onchange="LoadData()">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>From Source Type</label>
                                                <select id='drpFromSourceTypeId' class="form-control custom-select col-12" onchange="LoadData()">
                                                    <option value="0">All</option>
                                                    <option value="2003">Student</option>
                                                    <option value="95">Employee</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row mlr14 center-block">

                                    <div id="TodayNewOpenTickitDiv" class="col-md-6 col-lg-3 col-xlg-3" style="cursor: pointer">
                                        <asp:LinkButton ID="TodayNewOpenTickitLinkButton" runat="server" OnClick="TodayNewOpenTickitLinkButton_Click">
                                        <div class="card card-inverse card-info hover-expand-effect">
                                            <div class="box text-center">
                                                <h1 id="TodayNewOpenTickitLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">New Open Ticket Of Today</h6>
                                            </div>
                                        </div>
                                        </asp:LinkButton>
                                    </div>


                                    <div id="CloseTicketOfTodayDiv" class="col-md-6 col-lg-3 col-xlg-3" style="cursor: pointer">
                                        <asp:LinkButton ID="CloseTicketOfTodayLinkButton" runat="server" OnClick="CloseTicketOfTodayLinkButton_Click">
                                        <div class="card card-inverse card-red  hover-expand-effect">
                                            <div class="box text-center">
                                                <h1 id="CloseTicketOfTodayLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">Close Ticket Of Today</h6>
                                            </div>
                                        </div>
                                        </asp:LinkButton>
                                    </div>
                                    <div id="HoldTicketOfTodayDiv" class="col-md-6 col-lg-3 col-xlg-3" style="cursor: pointer">
                                        <asp:LinkButton ID="HoldTicketOfTodayLnkButton" runat="server" OnClick="HoldTicketOfTodayLnkButton_Click">
                                        <div class="card card-inverse card-warning hover-expand-effect">
                                            <div class="box text-center">
                                                <h1 id="HoldTicketOfTodayLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">Hold Ticket Of Today</h6>
                                            </div>
                                        </div>
                                        </asp:LinkButton>
                                    </div>
                                    <div id="OverdueTicketOfTodayDiv" class="col-md-6 col-lg-3 col-xlg-3" style="cursor: pointer">
                                        <asp:LinkButton ID="OverdueTicketOfTodayLinkButton" runat="server" OnClick="OverdueTicketOfTodayLinkButton_Click">
                                        <div class="card card-inverse card-primary hover-expand-effect">
                                            <div class="box text-center">
                                                <h1 id="OverdueTicketOfTodayLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">Overdue Ticket Of Today</h6>
                                            </div>
                                        </div>
                                        </asp:LinkButton>
                                    </div>

                                </div>

                                <div class="row mlr14 block">
                                    <div id="PendingTicketOfTodayDiv" class="col-md-6 col-lg-3 col-xlg-3" style="cursor: pointer">
                                        <asp:LinkButton ID="PendingTicketOfTodayLinkButton" runat="server" OnClick="PendingTicketOfTodayLinkButton_Click">
                                        <div class="card card-inverse card-primary hover-expand-effect">
                                            <div class="box text-center">
                                                <h1 id="PendingTicketOfTodayLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">Pending Ticket Of Today</h6>
                                            </div>
                                        </div>
                                        </asp:LinkButton>
                                    </div>
                                    <div class="col-md-6 col-lg-3 col-xlg-3">
                                        <asp:LinkButton ID="PendingTicketOnTodayLinkButton" runat="server" OnClick="PendingTicketOnTodayLinkButton_Click">
                                        <div id="PendingTicketOnTodayDiv" class="card card-inverse card-primary hover-expand-effect" style="cursor: pointer">
                                            
                                            <div class="box text-center">
                                                <h1 id="PendingTicketOnTodayLabel" class="font-light text-white"></h1>
                                                <h6 class="text-white">Pending Ticket On Today</h6>
                                            </div>
                                         </div>
                                        </asp:LinkButton>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/select-library")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>

