<%@ page language="C#" autoeventwireup="true" inherits="Forms_DriverGroupMaster, App_Web_avqw0kfx" %>

<%@ 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" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>--%>

<%@ 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">
    <title>tSense-IoT Manage Driver Groups</title>
    <%--********* 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 *************--%>
    <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="updatedcss" runat="server" href="../css/Updated_css.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" />

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

    <script src="../js/CommonFuncitonsInHeader.js" type="text/javascript"></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="ScmUserGroup" runat="server">
            </asp:ScriptManager>
            <%--   <asp:UpdatePanel ID="upUserGroup" runat="server">
                <Triggers>
                    <asp:PostBackTrigger ControlID="btnTest" />
                </Triggers>
                <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">
                        <!-- Do not delete 'btnTest' Button -->
                        <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" OnClick="btnTest_Click" />
                        <!-- 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="lblConfigurationCaption" runat="server"></asp:Literal></h1>
                                        <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton><span>&gt;</span><span><a
                                            href="DriverGroupMaster.aspx"><asp:Label ID="lblManageCaption" Text="Manage User Groups"
                                                runat="server"></asp:Label></a></span><%--<span>&gt;</span><span><a href="ConfigurationSetup.aspx">User 
                                            Groups</a></span>--%>
                                    </div>
                                    <div id="" class="col-sm-7 col-md-7 pull-right">
                                        <div class="pull-right btn-wrap">

                                            <%--<asp:ImageButton ID="btnAddUser" runat="server" OnClick="btnAddUser_Click" ImageUrl="~/images/btn-add-usergroup.jpg" />--%>
                                            <%--<asp:Button ID="btnAddDriverGroup" runat="server" Text="Add Driver Group" 
                                                                            onclick="btnAddDriverGroup_Click" />--%>
                                            <asp:LinkButton ID="btnAddDriverGroup1" runat="server" OnClick="btnAddDriverGroup_Click"
                                                CssClass="btn" Visible="false"></asp:LinkButton>
                                            <asp:LinkButton ID="btnAddDriverGroup" runat="server" CausesValidation="true" CssClass="MultilingualBtn"
                                                OnClick="btnAddDriverGroup_Click">
                                                <span runat="server" class="MultilingualBtnspan">
                                                    <div class="AddDriverGroup">
                                                        <div id="AddDriverGroupDiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Add Driver Group
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>

                                            <%-- <asp:ImageButton ID="lbtAssignUserGrp" runat="server" ImageUrl="~/images/btn-group-assignment.jpg"
                                                                            PostBackUrl="~/Forms/GroupUserAssignment.aspx" />--%>
                                            <%-- <asp:Button  Text="" />--%>
                                            <asp:LinkButton ID="btnDriverGroupAssignment1" runat="server" PostBackUrl="~/Forms/DriverGroupAssignment.aspx"
                                                CssClass="btn" Visible="false"></asp:LinkButton>
                                            <asp:LinkButton ID="btnDriverGroupAssignment" runat="server" CausesValidation="true"
                                                CssClass="MultilingualBtn" PostBackUrl="~/Forms/DriverGroupAssignment.aspx">
                                                <span runat="server" class="MultilingualBtnspan">
                                                    <div class="DriverGroupAssignment">
                                                        <div id="DriverGroupAssignmentDiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Driver Group Assignment
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>

                                            <%-- <asp:ImageButton ID="ibtManageUsers" runat="server" ImageUrl="~/images/btn-manage-users.jpg"
                                                                            PostBackUrl="~/Forms/UserManipulation.aspx" />--%>
                                            <asp:LinkButton ID="btnManageDrivers1" runat="server" PostBackUrl="~/Forms/DriverMaster.aspx"
                                                CssClass="btn" Visible="false"></asp:LinkButton>
                                            <asp:LinkButton ID="btnManageDrivers" runat="server" CausesValidation="true" CssClass="MultilingualBtn"
                                                PostBackUrl="~/Forms/DriverMaster.aspx">
                                                <span runat="server" class="MultilingualBtnspan">
                                                    <div class="ManageDrivers">
                                                        <div id="ManageDriversDiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Manage Drivers
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>

                                            <asp:LinkButton ID="ibtnBackToConfig" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                <span runat="server" class="MultilingualBtnspan">
                                                    <div class="Back">
                                                        <div id="BacktoConfigurationDiv" 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="pnlDriverUserGroupInformations" runat="server" CssClass="ControlShowSendCommands">
                                    <div class="form-box">
                                        <h1>
                                            <span class="icon" style="padding-top: 0px">
                                                <asp:Label ID="lblDriverUserGroupInformation" runat="server" Text="Manage Driver Groups"></asp:Label>
                                            </span></h1>
                                    </div>
                                    <div class="col-sm-12 form-box">
                                        <div class="col-sm-8 form-controls">
                                            <div class="col-sm-12 form-group">
                                                <div class="col-sm-4 col-xs-10 col-lg-2 caption">
                                                    <asp:Label ID="lblDriverGroupName" runat="server" CssClass="label" Text="Driver Group Name"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4">
                                                    <asp:TextBox ID="txtDriverGroupName" runat="server" Width="250px" onkeypress="return chkAlphaNumericWithSpace(event,this,29)"
                                                        MaxLength="30" TabIndex="1" onpaste="return false;" class="form-control" ondrop="return false;"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-8 form-controls">
                                            <div class="col-sm-12 form-group">
                                                <div class="col-sm-4 col-xs-10 col-lg-2 caption">
                                                    <asp:Label ID="lblGroupDes" runat="server" CssClass="label" Text="Driver Group Description"></asp:Label>
                                                </div>
                                                <div class="col-sm-4">
                                                    <asp:TextBox ID="txtDriverDescription" runat="server" Width="250px" Height="50px" class="form-control"
                                                        TextMode="MultiLine" MaxLength="250" TabIndex="2" onblur="return disallowScriptTags(this);"
                                                        onkeypress="return chkDescription(event,this,249);"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-8 form-controls">
                                            <div class="col-sm-12 form-group">
                                                <div class="col-sm-6 caption">
                                                    <span style="color: Red">*</span>&nbsp;
                                                        <asp:Label ID="lblMandatory" runat="server" Text="Required fields"></asp:Label>
                                                </div>
                                                <div class="col-sm-6">
                                                </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="ibtnAddDriverGroup1" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                        OnClick="ibtnAddDriverGroup_Click" OnClientClick="return ValidateDriverGroupInformation(true);"
                                                        TabIndex="4" Visible="false" />
                                                    <asp:LinkButton ID="ibtnAddDriverGroup" runat="server" CausesValidation="false" CssClass="MultilingualBtn"
                                                        OnClick="ibtnAddDriverGroup_Click" OnClientClick="return ValidateDriverGroupInformation(true);"
                                                        TabIndex="4">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Save">
                                                                <div id="SaveDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Save
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>&nbsp;
                                                            <asp:ImageButton ID="ibtnEditDriverGroup1" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                OnClick="ibtnEditDriverGroup_Click" OnClientClick="return ValidateDriverGroupInformation(true);"
                                                                TabIndex="5" Visible="false" />
                                                    <asp:LinkButton ID="ibtnEditDriverGroup" runat="server" CausesValidation="false"
                                                        CssClass="MultilingualBtn" OnClick="ibtnEditDriverGroup_Click" OnClientClick="return ShowPopUp();ValidateDriverGroupInformation(true);"
                                                        TabIndex="5">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Update">
                                                                <div id="UpdateDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Update
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>&nbsp;
                                                            <asp:ImageButton ID="ibtnCancelDriverGroup1" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                OnClick="ibtnCancelDriverGroup_Click" TabIndex="6" Visible="false" />
                                                    <asp:LinkButton ID="ibtnCancelDriverGroup" runat="server" CausesValidation="false"
                                                        CssClass="MultilingualBtn" OnClick="ibtnCancelDriverGroup_Click" OnClientClick="return DeleteConfirmation();">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Cancel">
                                                                <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Cancel
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>&nbsp;
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </asp:Panel>
                                <asp:Panel ID="pnlDriverGroupDetails" runat="server" CssClass="ControlShowSendCommands">
                                    <div class="form-box">
                                        <h1>
                                            <span class="icon" style="padding-top: 0px">
                                                <%--<asp:Image runat="server" ID="imgUserGroupInformation" ImageUrl="../images/icn-manage-usergroup.gif" />--%>

                                                <asp:Label ID="lblDriverGroupList" runat="server" Text="Driver Group Details"></asp:Label>
                                            </span>
                                        </h1>
                                    </div>
                                    <div id="grid-dsply">
                                        <div class="table-responsive">
                                            <dxw:ASPxGridView ID="gvDriverGroupDetails" ClientInstanceName="gvDriverGroupDetails" runat="server"
                                                Width="100%" AutoGenerateColumns="False" KeyFieldName="DriverGroupId" EnableTheming="true" Theme="Office2003Blue"
                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                OnHtmlRowCreated="gvDriverGroupDetails_OnHtmlRowCreated" OnAfterPerformCallback="gvDriverGroupDetails_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 AlternatingRow-Enabled="True" CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.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="DriverGroupName" Width="44%" FieldName="DriverGroupName"
                                                        VisibleIndex="1">
                                                        <HeaderCaptionTemplate>
                                                            <%--  <span class="icon">
                                                                <img id="imgUserGroupName" src="../images/icn-usergroup-name.gif" alt="" /></span>--%>
                                                            <span class="label">
                                                                <asp:Label ID="lblDriGroupName" runat="server" Text="Driver Group Name"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="DriverGroupDescription" Width="46%" FieldName="DriverGroupDesc"
                                                        VisibleIndex="2" CellStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <%--  <span class="icon">
                                                                <img id="imgDescription" src="../images/icn-usergroup-desc.gif" alt="" /></span>--%>
                                                            <span class="label">
                                                                <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" Name="Edit" VisibleIndex="4">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:ImageButton ID="btnEdit" runat="server" CommandArgument='<%# Eval("DriverGroupId").ToString() %>' OnClientClick="ShowPopUp();"
                                                                AlternateText="Edit" CommandName="Delete" ImageUrl="~/images/icn-edit.gif" OnClick="btnEditDriver_click"
                                                                ToolTip="Click here to Edit" ImageAlign="Middle" CssClass="handButton" />
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Delete" VisibleIndex="5" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" Width="3%">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:ImageButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("DriverGroupId") %>'
                                                                AlternateText="Delete" CommandName="Delete" ImageUrl="~/images/delete-icon.gif"
                                                                OnClientClick="return DeleteConfirmation1();" OnClick="btnDelete_click" ToolTip="Click here to Delete"
                                                                ImageAlign="Middle" CssClass="handButton" />
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                                <%--<ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />--%>
                                                <Settings ShowStatusBar="Auto" ShowFilterRow="false" ShowGroupPanel="false" />
                                                <SettingsText EmptyDataRow="No Data Identified" />
                                                <SettingsBehavior ColumnResizeMode="NextColumn" AllowSort="true" AllowDragDrop="true"
                                                    AllowGroup="true" AllowFocusedRow="false" />
                                                <SettingsPager PageSize="10" Mode="ShowPager" AlwaysShowPager="true">
                                                </SettingsPager>
                                            </dxw:ASPxGridView>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                        </div>
                        <!-- Main Content Ends Here -->
                        <div id="left">
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <div id="right">
                    </div>
                </div>
            </div>
            <%--     </ContentTemplate>
            </asp:UpdatePanel>--%>

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

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

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

            <script type="text/javascript" language="javascript">
                var Alert_Delete = "Are sure you want to delete the selected Driver Group?";

                function setAlertMessageDelete(Delete) {
                    Alert_Delete = Delete;
                }
                function DeleteConfirmation1() {
                    return confirm(Alert_Delete);
                }
            </script>

            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <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>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
