<%@ page language="C#" autoeventwireup="true" inherits="Forms_DriverBehaviorRating, App_Web_niziglsf" %>

<%@ 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.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="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="exp" %>
<%@ 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" %>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head id="Head1" runat="server">
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <title>tSense-IoT Driver Demerit Rating</title>
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet"
        type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <link id="datepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />

    <style type="text/css">
        </style>

    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>

    <script language="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>

    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>

    <script src="../js/wow.min.js"></script>
</head>
<body>
    <%--********* For Bootstrap Implementation *************--%>
    <div class="pageContainer">
        <%--********* End of Bootstrap Implementation *************--%>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <%-- <asp:UpdatePanel runat="server" ID="updDriverDetails">
                <ContentTemplate>--%>
            <!-- 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" class="container-fluid head-part">
                                    <div id="heading" class="col-sm-4 col-md-4">
                                        <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                        <h1>
                                            <asp:Literal ID="lblConfigurationSetupCaption" Text="Configuration" runat="server"></asp:Literal>
                                        </h1>
                                        <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton><span>&gt;</span><span><a
                                            href="DriverBehaviorRating.aspx"><asp:Label ID="lblDriverBehavior" Text="Manage Demerit Rating"
                                                runat="server"></asp:Label></a></span>
                                    </div>
                                    <div id="" class="col-sm-7 col-md-7 pull-right">
                                        <div class="pull-right btn-wrap">

                                            <asp:ImageButton ID="ibtnBackToConfig1" runat="server" CausesValidation="false" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                PostBackUrl="~/Forms/ConfigurationSetup.aspx" Visible="false" />
                                            <asp:LinkButton ID="ibtnBackToConfig" runat="server" CausesValidation="true" CssClass="MultilingualBtn"
                                                PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                <span runat="server" class="MultilingualBtnspan">
                                                    <div class="Back">
                                                        <div id="Backdiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Back to Configuration
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                                <asp:Panel ID="pnlVehicleMsgSeveritySettings" runat="server">
                                    <div class="form-box" id="trMessageType" visible="false" runat="server">
                                        <h1>
                                            <span class="icon txt">
                                                <%--<asp:Image ID="imgDriverInfo" runat="server" ImageUrl="~/images/demerit-rating.png" />--%>
                                                <asp:Image ID="imgDriverInfo" runat="server" ImageUrl="~/images/icn-driver-information.gif" />
                                                <asp:Label ID="lblDriverInfo" runat="server" Text="Driver Demerit Rating Information"></asp:Label></span>
                                        </h1>
                                        <div class="col-sm-12 form-box">
                                            <div class="col-sm-8 form-controls">
                                                <div class="col-sm-8 form-group">
                                                    <div class="col-xs-5 col-sm-4 col-xs-10 col-lg-2 caption nullpadding">
                                                        <asp:Label ID="lblMessageType" CssClass="label" runat="server" Text="Message Type"></asp:Label>
                                                    </div>
                                                    <div class="col-sm-4 nullpadding">
                                                        <asp:Label ID="lblSelectedMessageType" CssClass="label" runat="server" Text="Message Type"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12" id="trRating" visible="false" runat="server">
                                                <div class="col-sm-8 nullpadding">
                                                    <div class="col-sm-5 form-group nullpadding">
                                                        <div class="col-xs-5 col-sm-6 col-lg-3 caption nullpadding">
                                                            <asp:Label ID="lblRating" runat="server" CssClass="label" Text="Demerit Rating"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-3 nullpadding">
                                                            <asp:DropDownList ID="ddlRating" runat="server" class="form-control" AutoPostBack="false" Style="width: auto !important">
                                                                <asp:ListItem Selected="True">- Select -</asp:ListItem>
                                                                <asp:ListItem>5</asp:ListItem>
                                                                <asp:ListItem>10</asp:ListItem>
                                                                <asp:ListItem>15</asp:ListItem>
                                                                <asp:ListItem>20</asp:ListItem>
                                                                <asp:ListItem>25</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-8 form-controls">
                                                    <div class="col-sm-12 form-group">
                                                        <div class="col-sm-2 caption">
                                                        </div>
                                                        <div class="col-sm-10">
                                                            <asp:ImageButton ID="btnSave1" ImageUrl="~/images/btn-save.jpg" runat="server" Text="Save"
                                                                OnClientClick="return ValidateBehavior();" OnClick="btnSave_Click" Visible="false" />
                                                            <asp:LinkButton ID="btnSave" runat="server" CausesValidation="true" CssClass="MultilingualBtn"
                                                                OnClick="btnSave_Click" OnClientClick="return ValidateBehavior();">
                                                                <span runat="server" class="MultilingualBtnspan">
                                                                    <div class="Save">
                                                                        <div id="SaveDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                            Save
                                                                        </div>
                                                                    </div>
                                                                </span>
                                                            </asp:LinkButton>

                                                            <asp:ImageButton ID="btnCancel1" runat="server" OnClick="btnCancel_Click" ImageUrl="~/images/btn-cancel.jpg"
                                                                Visible="false" />
                                                            <asp:LinkButton ID="btnCancel" runat="server" CausesValidation="true" CssClass="MultilingualBtn"
                                                                OnClick="btnCancel_Click">
                                                                <span runat="server" class="MultilingualBtnspan">
                                                                    <div class="Cancel">
                                                                        <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                            Cancel
                                                                        </div>
                                                                    </div>
                                                                </span>
                                                            </asp:LinkButton>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                            <div class="clear clearfix">
                            </div>
                            <asp:Panel ID="pnlDriverMessage" runat="server">
                                <div class="form-box">
                                    <h1>
                                        <span class="icon">
                                            <asp:Image ID="imgDriver" runat="server" ImageUrl="~/images/icn-driver-information.gif" /></span>
                                        <span class="txt">
                                            <asp:Label ID="lblDemeritDetails" runat="server" Text="Driver Demerit Rating Details"></asp:Label></span></h1>
                                </div>
                                <div id="grid-dsply">
                                    <div style="width: 100%; overflow: auto;">
                                        <div class="table-responsive">
                                            <dxw:ASPxGridView ID="gvDriverRatingDetails" runat="server" Width="100%" KeyFieldName="RATINGID" Settings-ShowFilterRow="true"
                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue"
                                                OnHtmlRowCreated="gvDriverRatingDetails_HtmlRowCreated" OnAfterPerformCallback="gvDriverRatingDetails_AfterPerformCallback">
                                                <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>--%>
                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" AlternatingRow-Enabled="True"
                                                    CssPostfix="Office2003_Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="10px">
                                                    </LoadingPanel>
                                                    <PagerBottomPanel CssClass="PageFooter">
                                                    </PagerBottomPanel>
                                                    <PagerTopPanel CssClass="PageFooter">
                                                    </PagerTopPanel>
                                                </Styles>
                                                <SettingsPager PageSize="10" 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">
                                                </SettingsPager>
                                                <Columns>
                                                    <dxw:GridViewDataTextColumn FieldName="BoxMsgInTypeDesc" Width="50%" Caption="Message"
                                                        VisibleIndex="1">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgMessage" runat="server" ImageUrl="..\Images\icn-message-details.gif" /></span>
                                                            <span class="label">
                                                                <asp:Label ID="lblMessage" runat="server" Text="Message"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings ShowFilterRowMenu="True" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn FieldName="Rating" Width="50%" Caption="Rating" VisibleIndex="2"
                                                        HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgRating" runat="server" ImageUrl="~/images/demerit-rating.png" /></span>
                                                            <span class="label">
                                                                <asp:Label ID="lblRating" runat="server" Text="Demerit Rating"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings ShowFilterRowMenu="True" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <%--   <dxw:GridViewDataComboBoxColumn FieldName="Rating" Caption="Rating" VisibleIndex="2">
                                                    <HeaderCaptionTemplate>
                                                     <span class="icon">
                                                            <asp:Image ID="imgMessage" runat="server" ImageUrl="..\Images\demerit-rating.png" /></span>
                                                        <span class="label">
                                                            <asp:Label ID="lblRating" runat="server" Text="Demerit Rating"></asp:Label></span>
                                                    </HeaderCaptionTemplate>                                        
                                                    <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                </dxw:GridViewDataComboBoxColumn>--%>
                                                    <dxw:GridViewDataTextColumn Caption="" Width="5%" VisibleIndex="3">
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="lnkEditDriverRating" runat="server" OnClick="EditDriverRating"
                                                                CommandArgument='<%# Eval("RATINGID")+","+Eval("BoxMsgInTypeDesc")+","+Eval("BoxMsgInTypeId")+","+Eval("Rating") %>'><img src="../images/icn-edit.gif" alt="Edit driver rating" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                <%--Commented to prevent page from postback for each gridview event #25-Mar-2015--%>
                                                <%--<ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />--%>
                                                <SettingsText EmptyDataRow="No rating found" />
                                                <SettingsBehavior AllowSort="true" />
                                            </dxw:ASPxGridView>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </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>
            <!-- Content Ends Here -->
            <%-- </div>--%>
            <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" />
            <%--  </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="btnTest" />
                </Triggers>
            </asp:UpdatePanel>--%>
            <cc1:ModalPopupExtender ID="mpeMapProgressIndicator" runat="server" PopupControlID="pnlProgress"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Text="Test" CssClass="ControlHide" runat="server" />
            <%-- <asp:UpdateProgress ID="uprDataLoading" runat="server" DynamicLayout="True" AssociatedUpdatePanelID="updDriverDetails">
            <ProgressTemplate>--%>
            <asp:Panel ID="pnlProgress" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                <center>
                    <br />
                    <img alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>
            <%-- </ProgressTemplate>
        </asp:UpdateProgress>--%>

            <script language="javascript" type="text/javascript" src="../js/DriverManagementScript.js"></script>

        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
