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

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

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

    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="106"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">

                    <Transport:TransportControl ID="TransportUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>

                                </div>
                            </asp:Panel>

                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="RouteTypeLabel" Text="Route Type" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="RouteTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="RouteTypeDropDownList_SelectedIndexChanged">
                                                    <asp:ListItem Value="1" Text="Pickup Route Wise"></asp:ListItem>
                                                    <asp:ListItem Value="2" Text="Drop Route Wise"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <div class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="RouteListDetailDiv" visible="false" runat="server">
                                            <div class="himsBoxHeader card-head col-md-11 inner" style="width: 93%" id="Div3" runat="server">
                                                <div class="gridHeaderText">
                                                    <header>
                                                        <asp:Label ID="Label6" runat="server" Text="Route List"></asp:Label>
                                                    </header>
                                                </div>
                                            </div>
                                            <div class="fRight col-md-1" style="margin-top: 6px; width: 7%; padding: 1px;">
                                                <asp:Button ID="ExportButton" runat="server" SkinID="0" Text="&#xf15b; Export" class="form-control" OnClick="ExportButton_Click" CssClass="btn btn-report fas" />
                                            </div>
                                            <div class="himsBoxContent card-body">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" class="table-responsive">
                                                            <asp:GridView ID="RouteListGridView" ClientIDMode="Static" runat="server" AutoGenerateColumns="False"
                                                                CssClass="table table-striped table-bordered table-hover" OnPageIndexChanging="RouteListGridView_PageIndexChanging"
                                                                AllowPaging="false" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                EmptyDataText="No records Found !!!" DataKeyNames="BusRouteId" ShowFooter="True" OnRowDataBound="RouteListGridView_RowDataBound">
                                                                <Columns>
                                                                    <asp:BoundField HeaderText="Route Number " DataField="RouteNumber">
                                                                        <HeaderStyle Width="10%" />
                                                                    </asp:BoundField>
                                                                    <asp:TemplateField HeaderText="Bus Route" ItemStyle-Width="20%" SortExpression="BusRoute" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="BusRouteLable" runat="server" Text='<%# Bind("BusRoute") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField HeaderText="Vehicle Name " DataField="VehicleName">
                                                                        <HeaderStyle Width="20%" />
                                                                    </asp:BoundField>
                                                                    <asp:BoundField HeaderText="Vehicle Type " DataField="VehicleType">
                                                                        <HeaderStyle Width="20%" />
                                                                    </asp:BoundField>

                                                                    <asp:TemplateField HeaderText="Capacity" ItemStyle-Width="10%" SortExpression="Capacity" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="CapacityLable" CssClass="test1" runat="server" Text='<%# Bind("Capacity") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="TotalCapacityLabel" runat="server" Text="0" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="No. Of Students" ItemStyle-Width="10%" SortExpression="NoOfStudent" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="LinkButton1" CssClass="test2" runat="server" Text='<%# Bind("NoOfStudent") %>' OnClick="LinkButton1_Click"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="TotalStudentLabel" runat="server" Text="0" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Vacant Seat" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="VacantLabel" CssClass="test3" runat="server" Text='<%# Convert.ToInt16(Eval("Capacity")) - Convert.ToInt32(Eval("NoOfStudent"))  %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                        <FooterTemplate>
                                                                            <asp:Label ID="TotalVacantLabel" runat="server" Text="0" Font-Bold="true"></asp:Label>
                                                                        </FooterTemplate>
                                                                    </asp:TemplateField>

                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                        <div id="pickupDiv" runat="server" visible="false">
                                                            <div class="headerText">
                                                                <asp:Label ID="Label2" runat="server" Text="" Font-Bold="true"></asp:Label>
                                                            </div>
                                                            <asp:GridView ID="PickuplistGridView" ClientIDMode="Static" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                CssClass="table table-striped table-bordered table-hover"
                                                                AllowPaging="false" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                EmptyDataText="No records Found !!!">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Organization" ItemStyle-Width="20%" SortExpression="OrganizationName" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="OrganizationNameLable" runat="server" Text='<%# Bind("OrganizationName") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="Code" />
                                                                    <asp:BoundField HeaderText="Name " DataField="Name">
                                                                        <HeaderStyle Width="20%" />
                                                                    </asp:BoundField>
                                                                    <asp:TemplateField HeaderText="Class" ItemStyle-Width="20%" SortExpression="Class" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="ClassLable" runat="server" Text='<%# Bind("Class") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Pick Up Point" ItemStyle-Width="20%" SortExpression="PickUpPoint" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="PickUpPointLable" runat="server" Text='<%# Bind("PickUpPoint") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="DropPoint" ItemStyle-Width="14%" SortExpression="DropPoint" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="DropPointLable" runat="server" Text='<%# Bind("DropPoint") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%-- <script data-main="../../JavaScript/rjs/encrypt/route-list-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
</asp:Content>
