<%@ page language="C#" autoeventwireup="true" inherits="Forms_TripSheetMenu, App_Web_5gbuhbxa" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>

<%--<%@ Register Assembly="DevExpress.XtraReports.v8.2.Web, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.XtraReports.Web" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>tSense-IoT Tracking</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link href="../App_Themes/Office2003Blue/GridView/grid.css" rel="Stylesheet" />
    <link href="../App_Themes/Office2003Blue/Editors/styles.css" rel="Stylesheet" />

    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div id="container">
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Nav Ends Here -->
            <!-- Content Starts Here -->
            <div id="outer">
                <div id="inner">
                    <div id="float-wrap">
                        <!-- Main Content Starts Here -->
                        <div id="content">
                            <div class="content-wrap">
                                <div id="top-content">
                                    <div id="heading">
                                        <img class="icon" src="../images/tracking-icon.jpg" alt="" />
                                        <h1>Tracking</h1>
                                        <a href="Dashboard.aspx">Home</a><span>&gt;</span><span><a href="Tracking.aspx">Tracking</a></span>
                                    </div>
                                    <div id="control-box">
                                        <div id="control-btn">
                                            <table cellpadding="0" cellspacing="0" border="0" align="right">
                                                <tr height="20px">
                                                    <td>&nbsp;
                                                    </td>
                                                    <td>&nbsp; &nbsp;
                                                    </td>
                                                    <td>&nbsp;
                                                    </td>
                                                </tr>
                                                <tr height="20px">
                                                    <td>
                                                        <asp:ImageButton ImageUrl="~/images/btn-back.jpg" runat="server" ID="lnkBackToFilters"
                                                            Visible="false" />
                                                    </td>
                                                    <td>&nbsp;
                                                    </td>
                                                    <td>&nbsp;&nbsp;
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnlReportFilter" runat="server">
                                            <cc1:CalendarExtender ID="ceStartDate" runat="server" Format="dd/MM/yyyy" CssClass="cal_Theme1"
                                                TargetControlID="txtDateOfTrip">
                                            </cc1:CalendarExtender>
                                            <div class="form-box" id="divFilter" runat="server">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/icn-tracking.gif" alt="" /></span>Tracking
                                                </h1>
                                                <table border="0" cellpadding="0" cellspacing="0" class="form-tbl" id="tblReportFilters"
                                                    runat="server">
                                                    <tr>
                                                        <td class="split">&nbsp;
                                                        </td>
                                                        <td>
                                                            <img src="../images/calendar-rht-icon.gif" width="15" height="16" alt="" />&nbsp;<asp:Label
                                                                ID="lblFrom" runat="server" Text="Trip Date:"></asp:Label>
                                                        </td>
                                                        <td colspan="4" style="padding: 0px; margin: 0px">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr>
                                                                    <td>
                                                                        <asp:TextBox ID="txtDateOfTrip" runat="server" oncopy="return false" oncut="return false"
                                                                            CssClass="date" onkeypress="return false" onpaste="return false" TabIndex="1"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="btnPickUp" runat="server" ImageUrl="../images/btn-pickup-report.jpg" OnClick="btnPickUp_Click"
                                                                            TabIndex="2" />

                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="btnDrop" runat="server" OnClick="btnDrop_Click"
                                                                            TabIndex="3" ImageUrl="../images/btn-drop-report.jpg" />

                                                                    </td>
                                                                    <td>
                                                                        <asp:Label CssClass="errorLabel" ID="lblNoRecords" runat="server"></asp:Label>
                                                                    </td>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>

                                                </table>
                                            </div>
                                        </asp:Panel>
                                        <asp:Panel ID="pnlReportdetails" runat="server">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/icn-tracking.gif" /></span>
                                                    Tracking Details</h1>
                                            </div>
                                            <div id="grid-dsply">
                                                <dxw:ASPxGridView ID="gvReportDetails" ClientInstanceName="gvReportDetails" KeyFieldName="EmployeeId"
                                                    EnableTheming="true" Theme="Office2003Blue" runat="server"
                                                    CssFilePath="~/App_Themes/Office2003Blue/{0}/grid.css" CssPostfix="Office2003_Blue"
                                                    Width="100%" AutoGenerateColumns="False" OnRowCommand="gvReportDetails_RowCommand">
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003 Blue/{0}/">
                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/GridView/gvCollapsedButton.png"
                                                        Width="11px" />
                                                    <ExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                        Width="11px" />
                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                        Width="11px" />
                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                        Width="11px" />
                                                </Images>--%>
                                                    <Styles AlternatingRow-Enabled="True" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css"
                                                        CssPostfix="Office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>

                                                        <dxw:GridViewDataColumn Caption="DisplayName" FieldName="DisplayName">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-employee-name.gif" align="top" alt="" /></span>
                                                                <span class="label">Employee Name</span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn Caption="FromAddress" FieldName="FromAddress">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-address.gif" align="top" alt="" /></span>
                                                                <span class="label">Address</span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataTextColumn Caption="LandmarkName" FieldName="LandmarkName">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-landmark-name.gif" align="top" alt="" /></span>
                                                                <span class="label">Landmark Name</span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="LoginTime" FieldName="LoginTime">
                                                            <HeaderTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-shiftin-time.gif" align="top" alt="" /></span>
                                                                <span class="label">LoginTime</span>
                                                            </HeaderTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="LogoutTime" FieldName="LoginTime">
                                                            <HeaderTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-shiftout-time.gif" align="top" alt="" /></span>
                                                                <span class="label">LogoutTime</span>
                                                            </HeaderTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="MobileNo" FieldName="MobileNo">
                                                            <HeaderTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-contact-number.gif" align="top" alt="" /></span>
                                                                <span class="label">Contacts</span>
                                                            </HeaderTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataColumn Caption="Tracking">
                                                            <HeaderTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-tracking.gif" align="top" alt="" /></span>
                                                                <span class="label">Trackers Column</span>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="lbtnUpdate" runat="server" Text='<%#Eval("Tracking") %>' CommandArgument='<%#Eval("EmployeeId") %>'></asp:LinkButton>
                                                                <asp:Label ID="lblTrackingDetails" runat="server" Text='<%#Eval("TrackingDetails") %>'></asp:Label>

                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn Caption="TrackingDrop">
                                                            <HeaderTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-tracking.gif" align="top" alt="" /></span>
                                                                <span class="label">Trackers Column</span>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <%-- <asp:LinkButton ID="lbtnUpdateDrop" runat="server" Text="Update" ></asp:LinkButton>    --%>
                                                                <asp:Label ID="lblTrackingDetails" runat="server" Text="Update"></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataColumn>
                                                    </Columns>
                                                    <Settings ShowStatusBar="Auto" ShowFilterRow="false" ShowGroupPanel="false" />
                                                    <SettingsText EmptyDataRow="No Data Identified" />
                                                    <ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />
                                                    <SettingsBehavior ColumnResizeMode="NextColumn" AllowSort="true" AllowDragDrop="true"
                                                        AllowGroup="true" AllowFocusedRow="true" />
                                                    <SettingsPager PageSize="10" Mode="ShowPager">
                                                    </SettingsPager>
                                                </dxw:ASPxGridView>
                                            </div>
                                        </asp:Panel>
                                        <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" />
                                        <asp:Button ID="btnPopup" runat="server" Style="display: none;" />
                                        <cc1:ModalPopupExtender ID="mptrackingDetails" runat="server" BackgroundCssClass="modalbackground"
                                            PopupControlID="pnlTrackingDetails" TargetControlID="btnPopup" X="280">
                                        </cc1:ModalPopupExtender>
                                        <asp:Panel ID="pnlTrackingDetails" runat="server" Style="display: none; position: absolute; top: -600px; width: 375px; height: 210px;">
                                            <div id="con">
                                                <table cellpadding="0" cellspacing="0" border="0" width="98%" class="popup">
                                                    <tr>
                                                        <td class="top-l">&nbsp;
                                                        </td>
                                                        <td class="top-m">&nbsp;
                                                        </td>
                                                        <td class="top-r">&nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="left">&nbsp;
                                                        </td>
                                                        <td>
                                                            <div class="top">
                                                                <h1>
                                                                    <asp:Label ID="lblTrackingDetails" Text="Tracking Details" runat="server"></asp:Label></h1>
                                                                <div class="close">
                                                                    <asp:ImageButton ID="ImageButton1" OnClientClick="$find('mptrackingDetails').hide(); return false;"
                                                                        CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                                                                </div>
                                                                <div class="clear clearfix">
                                                                </div>
                                                            </div>
                                                            <div class="popup-cont">
                                                                <table class="form-tbl" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td width="35%">
                                                                            <asp:RadioButton ID="rbtNoShow" runat="server" Text="No Show" GroupName="Tracking"
                                                                                onclick="ShowTracker();" />
                                                                        </td>
                                                                        <td colspan="3"></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td width="35%">
                                                                            <asp:RadioButton ID="rbtPicked" runat="server" Text="Picked" GroupName="Tracking"
                                                                                onclick="ShowTracker();" />
                                                                        </td>
                                                                        <td id="trDateOfPick" colspan="3" runat="server" width="100%">Date:<asp:TextBox ID="txtDateofPicked" runat="server" Width="25%"></asp:TextBox>
                                                                            Time:<asp:DropDownList ID="ddlTimeOfPicked" runat="server" CssClass="time">
                                                                            </asp:DropDownList>
                                                                            <asp:DropDownList ID="ddlMinutesOfPicked" runat="server" CssClass="time">
                                                                                <asp:ListItem>00</asp:ListItem>
                                                                                <asp:ListItem>15</asp:ListItem>
                                                                                <asp:ListItem>30</asp:ListItem>
                                                                                <asp:ListItem>45</asp:ListItem>
                                                                            </asp:DropDownList>
                                                                            <cc1:CalendarExtender ID="ceDateOfTracking" runat="server" Format="dd/MM/yyyy" CssClass="cal_Theme1"
                                                                                TargetControlID="txtDateofPicked">
                                                                            </cc1:CalendarExtender>
                                                                        </td>



                                                                    </tr>
                                                                    <tr>
                                                                        <td width="35%">
                                                                            <asp:RadioButton ID="rbtWaitMove" runat="server" Text="Wait & Move" onclick="ShowTracker();"
                                                                                GroupName="Tracking" />
                                                                        </td>
                                                                        <td id="trDateOfMove" colspan="3" runat="server" width="100%">Date:<asp:TextBox ID="txtDateOfMove" runat="server" Width="25%"></asp:TextBox>
                                                                            Time:<asp:DropDownList ID="ddlTimeOfMove" runat="server" CssClass="time">
                                                                            </asp:DropDownList>
                                                                            <asp:DropDownList ID="ddlMinuesOfMove" runat="server" CssClass="time">
                                                                                <asp:ListItem>00</asp:ListItem>
                                                                                <asp:ListItem>15</asp:ListItem>
                                                                                <asp:ListItem>30</asp:ListItem>
                                                                                <asp:ListItem>45</asp:ListItem>
                                                                            </asp:DropDownList>
                                                                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" CssClass="cal_Theme1"
                                                                                TargetControlID="txtDateOfMove">
                                                                            </cc1:CalendarExtender>
                                                                        </td>

                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="4">
                                                                            <center>
                                                                                <asp:ImageButton ID="btnImportEmployeeSave" runat="server" ImageUrl="~/images/btn-Save.jpg"
                                                                                    OnClientClick="return ValidateTracking();" OnClick="btnSaveTrackingDetails_Click" />
                                                                                <asp:ImageButton ID="btnImportEmployeeCancel" runat="server" ImageUrl="~/images/btn-Cancel.jpg" />
                                                                            </center>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </td>
                                                        <td class="right">&nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="bottom-l">&nbsp;
                                                        </td>
                                                        <td class="bottom-m">&nbsp;
                                                        </td>
                                                        <td class="bottom-r">&nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:Panel>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:PostBackTrigger ControlID="btnTest" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </div>
                        </div>
                        <!-- Main Content Ends Here -->
                        <div id="left">
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <div id="right">
                    </div>
                    <div class="clear clearfix">
                    </div>
                </div>
            </div>
        </div>
        <!-- Content Ends Here -->
        <uc2:Footer ID="ucFooter" runat="server" />

        <script type="text/javascript" language="javascript" src="../js/FormValidations.js"></script>
        <asp:HiddenField ID="hdnLogout" runat="server" />
    </form>

    <script type="text/javascript">
        function ShowTracker() {

            if (document.getElementById("<%=rbtPicked.ClientID %>").checked == true) {
                document.getElementById("<%=trDateOfPick.ClientID %>").style.visibility = "visible";

            }
            else {
                document.getElementById("<%=trDateOfPick.ClientID %>").style.visibility = "hidden";

            }
            if (document.getElementById("<%=rbtWaitMove.ClientID %>").checked == true) {
                document.getElementById("<%=trDateOfMove.ClientID %>").style.visibility = "visible";

            }
            else {
                document.getElementById("<%=trDateOfMove.ClientID %>").style.visibility = "hidden";

            }
        }
    </script>

</body>
</html>
