<%@ page language="C#" autoeventwireup="true" inherits="Forms_ParamMst, App_Web_cdte31zm" %>

<%@ 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.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">
    <title>Configuration</title>
    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <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" />

    <%--Custom Theme for DevEx 14.2--%>
    <link type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

    <%--BootStrap Css--%>
    <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 Css--%>

    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
    <%--<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>--%>
    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <%-- <script type="text/javascript">
        function MinimumNValidate() {
            var min = parseInt(document.getElementById("txtMinvalue").value);
            var max = parseInt(document.getElementById("txtmax").value);
            if (min > max) {
                TrinetraCustomAlerts("Minimum value must be lesser than maximum value.");
                document.getElementById("txtMinvalue").value = "";
            }
        }

        function MaximumNValidate() {
            var min = parseInt(document.getElementById("txtMinvalue").value);
            var max = parseInt(document.getElementById("txtmax").value);
            if (max < min) {
                TrinetraCustomAlerts("Maximum value must be greater than minimum value.");
                document.getElementById("txtMinvalue").value = "";
            }
        }
    </script>--%>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel runat="server" ID="updVenDetails" UpdateMode="Conditional">
                <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="divTopContent" runat="server" class="head-part">
                                            <div id="heading" class="col-sm-4 col-md-3">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfiguration" runat="server">Trend Parameter</asp:Literal>
                                                </h1>
                                                <a href="MapPage.aspx">
                                                    <asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label>
                                                </a>
                                                <span>&gt;</span>
                                                <a href="ConfigurationSetup.aspx">
                                                    <asp:Label ID="lblConfigurationCaption" Text="Configuration" runat="server"></asp:Label>
                                                </a><span>&gt;</span>
                                                <asp:LinkButton ID="lnkESPLayout" PostBackUrl="ParamMst.aspx" runat="server"
                                                    Text="Trend Parameter" OnClick="lnkESPLayout_Click">
                                                </asp:LinkButton>
                                            </div>
                                            <div class="col-sm-8 col-md-9 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:LinkButton ID="lbtnAddDevice" runat="server" CssClass="MultilingualBtn" Visible="false"
                                                        OnClientClick="ShowPopUp();" PostBackUrl="~/Forms/ControllerMaster.aspx">
                                                        <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                            <div class="AddDevice">
                                                                <div id="AddVendorDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    ESP Configuration
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" CausesValidation="false"
                                                        PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                        <span id="Span4" 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>
                                        <div class="col-sm-12 form-box nullpadding">
                                            <h1>
                                                <span class="icon">
                                                    <asp:Image ID="imgUserInfo" runat="server" ImageUrl="~/imagesButton/Linechart.png" /></span>
                                                <asp:Label ID="lblUserInfo" runat="server" Text="Trend Parameter"></asp:Label>
                                            </h1>
                                            <div class="col-sm-10 col-md-10 col-lg-8 form-horizontal">
                                                <div class="form-group" style="padding-top: 5px;">
                                                    <div class="col-sm-2 caption icon-img">
                                                        <asp:Label ID="lblEquipLocation" runat="server" Text="Site"></asp:Label>
                                                        <%-- <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>--%>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:DropDownList ID="ddlSites" runat="server" AutoPostBack="true" CssClass="form-control" OnSelectedIndexChanged="ddlSites_SelectedIndexChanged" TabIndex="3">
                                                            <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-sm-2 caption icon-img">
                                                        <asp:Label ID="lblEqupName" runat="server" Text="Equipment Name"></asp:Label>
                                                        <span style="color: red">*</span>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:DropDownList ID="ddlESP" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlParam_SelectedIndexChanged" CssClass="form-control" TabIndex="3">
                                                            <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-2 icon-img">
                                                        <asp:Label ID="lblController" runat="server" Text="Controller Name"></asp:Label>
                                                        <span style="color: red">*</span>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:DropDownList ID="ddlController" runat="server" CssClass="form-control" TabIndex="3">
                                                            <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-sm-2 icon-img">
                                                        <asp:Label ID="lblParameter" runat="server" Text="Parameter"></asp:Label>
                                                        <span style="color: red">*</span>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:DropDownList ID="ddlParam" runat="server" AutoPostBack="false" CssClass="form-control" TabIndex="4">
                                                            <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-2 icon-img">
                                                        <asp:Label ID="lblMinValue" runat="server" Text="Min. Value"></asp:Label>
                                                        <span style="color: red">*</span>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:TextBox ID="txtMinvalue" runat="server" MaxLength="4" CssClass="form-control" ondrop="return false;" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                    </div>
                                                    <div class="col-sm-2 icon-img">
                                                        <asp:Label ID="lblmaxvalue" runat="server" Text="Max. Value"></asp:Label>
                                                        <span style="color: red">*</span>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <asp:TextBox ID="txtmax" runat="server" MaxLength="4" CssClass="form-control" ondrop="return false;" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12 form-group">
                                                <div class="col-sm-4">
                                                </div>
                                                <div class="col-sm-6 nullpadding">
                                                    <%--  <asp:LinkButton ID="lbtEdit" CausesValidation="true" runat="server" CssClass="MultilingualBtn"
                                                        OnClientClick="ShowPopUp();">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Save">
                                                                <div id="EditButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Save
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>--%>
                                                    <asp:LinkButton ID="lbtnSave" runat="server" CssClass="MultilingualBtn" OnClientClick="return ValidateParam();ShowPopUp();" OnClick="lbtnSave_Click">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Save">
                                                                <div id="AddFleetButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Save
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="lbtnCancel" runat="server" CssClass="MultilingualBtn" OnClick="lbtnCancel_Click" OnClientClick="ShowPopUp();">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Cancel">
                                                                <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Cancel
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </div>
                                                <div class="col-sm-2">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <div class="table-responsive">
                                            <dxw:ASPxGridView ID="gvParam" ClientInstanceName="gvParam"
                                                KeyFieldName="ParamvalueId" runat="server" CssFilePath="~/App_Themes/Office2003Blue/{0}/grid.css"
                                                CssPostfix="Office2003_Blue" Width="98%" AutoGenerateColumns="False" Theme="Office2003Blue" OnHtmlRowCreated="gvParam_HtmlRowCreated">
                                                <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="200" ShowFilterRow="true"
                                                    ShowFilterRowMenu="true" ShowFooter="false" />
                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.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 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" PageSize="15"
                                                    AlwaysShowPager="true">
                                                </SettingsPager>
                                                <SettingsPopup CustomizationWindow-HorizontalAlign="RightSides" CustomizationWindow-VerticalAlign="TopSides" />
                                                <SettingsBehavior EnableCustomizationWindow="false" />
                                                <SettingsText CustomizationWindowCaption="Column Chooser" />
                                                <SettingsContextMenu Enabled="true" EnableGroupPanelMenu="False" ColumnMenuItemVisibility-GroupByColumn="false" ColumnMenuItemVisibility-ShowGroupPanel="false"
                                                    EnableFooterMenu="False" ColumnMenuItemVisibility-ShowFooter="false" RowMenuItemVisibility-NewRow="false" RowMenuItemVisibility-EditRow="false"
                                                    RowMenuItemVisibility-DeleteRow="false" EnableRowMenu="false">
                                                </SettingsContextMenu>
                                                <Settings ShowFilterBar="Hidden" />
                                                <Columns>
                                                    <dxw:GridViewDataTextColumn FieldName="EquipmentName" VisibleIndex="0" Width="20%" Caption="ESP Name" FixedStyle="Left" HeaderStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgDeviceID" runat="server" ImageUrl="../images/vehicle-icon.gif" ImageAlign="top"
                                                                    AlternateText="" />
                                                            </span>
                                                            <span>
                                                                <asp:Label ID="Label2" runat="server" Text="ESP Name"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("EquipmentName") %>'></asp:Label>
                                                        </DataItemTemplate>
                                                        <Settings AllowSort="True" />
                                                        <Settings AutoFilterCondition="Contains" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn FieldName="ControllerName" VisibleIndex="0" Width="20%" Caption="Controller Name" FixedStyle="Left" HeaderStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgDeviceID" runat="server" ImageUrl="../images/icn-driver-name.gif" ImageAlign="top"
                                                                    AlternateText="" />
                                                            </span>
                                                            <span>
                                                                <asp:Label ID="Label2" runat="server" Text="Controller Name"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("ControllerName") %>'></asp:Label>
                                                        </DataItemTemplate>
                                                        <Settings AllowSort="True" />
                                                        <Settings AutoFilterCondition="Contains" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn FieldName="ParamName" VisibleIndex="0" Width="20%" Caption="Parameter" FixedStyle="Left" HeaderStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgDeviceID" Visible="false" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                    AlternateText="" />
                                                            </span>
                                                            <span>
                                                                <asp:Label ID="Label2" runat="server" Text="Parameter"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("ParamName") %>'></asp:Label>
                                                        </DataItemTemplate>
                                                        <Settings AllowSort="True" />
                                                        <Settings AutoFilterCondition="Contains" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn FieldName="MinValue" VisibleIndex="0" Width="15%" Caption="Min. Value" FixedStyle="Left" CellStyle-HorizontalAlign="Center" HeaderStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgDeviceID" Visible="false" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                    AlternateText="" />
                                                            </span>
                                                            <span>
                                                                <asp:Label ID="Label2" runat="server" Text="Min. Value"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("MinValue") %>'></asp:Label>
                                                        </DataItemTemplate>
                                                        <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn FieldName="MaxValue" VisibleIndex="0" Width="15%" Caption="Max. Value" FixedStyle="Left" CellStyle-HorizontalAlign="Center" HeaderStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <asp:Image ID="imgDeviceID" Visible="false" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                    AlternateText="" />
                                                            </span>
                                                            <span>
                                                                <asp:Label ID="Label2" runat="server" Text="Max. Value"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("MaxValue") %>'></asp:Label>
                                                        </DataItemTemplate>
                                                        <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Edit" VisibleIndex="11" Width="5%" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" Name="Edit">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="lbtnEdit" runat="server" CommandArgument='<%# Eval("ParamvalueId") %>'
                                                                alternatetext="Edit" OnClientClick="ShowPopUp();" OnClick="lbtnEdit_Click"
                                                                ToolTip="Click here to Edit" CssClass="handButton">
                                                                <asp:Image ID="imgEdit" runat="server" ImageUrl="~/images/icn-edit.gif" />
                                                            </asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Delete" VisibleIndex="13" Width="5%" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="lbtnDelete" runat="server" alternatetext="Delete" ToolTip="Click here to Delete" OnClick="lbtnDelete_Click"
                                                                CommandArgument='<%# Convert.ToString(Eval("ParamvalueId")) %>'>
                                                              <img src="../images/delete-icon.gif" alt="" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                            </dxw:ASPxGridView>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <script lang="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>
            <script type="text/javascript" lang="javascript" src="../js/FormValidations.js"></script>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="pnlProgress" TargetControlID="Button1">
            </cc1:ModalPopupExtender>
            <asp:Button ID="Button1" Style="display: none;" runat="server" />
            <asp:Panel ID="pnlProgress" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                <center>
                <br />
                <img id="imgLoad" runat="server" 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>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
