<%@ page language="C#" autoeventwireup="true" inherits="Forms_Tips, App_Web_qlt3pisl" enableeventvalidation="false" %>

<%@ 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 Tips Master</title>
    <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" />
    <%--********* 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" />

    <%--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" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

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

    <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>

    <%--********* 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="smNews" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="upNews" 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="Tips.aspx"><asp:Label ID="lblManageCaption" Text="Manage News" 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="lbtAddTips1" runat="server" Visible="false" OnClick="lbtAddTips_Click" ImageUrl="~/images/add-tip.png"></asp:ImageButton>
                                                    <asp:LinkButton ID="lbtAddTips" runat="server" CssClass="MultilingualBtn" OnClick="lbtAddTips_Click">
                                                        <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                            <div class="AddGeozone">
                                                                <div id="AddNewsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Add Tips
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>

                                                    <asp:HyperLink ID="lbtConfiguration1" runat="server" NavigateUrl="~/Forms/ConfigurationSetup.aspx"
                                                        ImageUrl="~/images/btn-back-to-configuration.jpg" Visible="false"></asp:HyperLink>

                                                    <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                        <span id="Span2" 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>
                                        <div class="clear clearfix">
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlTips" runat="server" CssClass="ControlShow">
                                        <div class="form-box">
                                            <h1>
                                                <span class="icon" style="padding-top: 0px">
                                                    <img src="../images/Tip Details.png" alt="" /></span>
                                                <asp:Label ID="lblTipsList" runat="server" Text="Tips Details"></asp:Label>
                                            </h1>

                                            <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-3 col-xs-10 col-lg-2 caption">
                                                            <asp:Label ID="lblTipsName" runat="server" CssClass="label" Text="Tip Name"></asp:Label>
                                                            &nbsp;
                                                        <asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                        </div>
                                                        <div class="col-sm-4">
                                                            <asp:TextBox ID="txtTipsName" runat="server" onkeypress="return chkAlphaNumericWithSpace(event,this,49)"
                                                                MaxLength="50" TabIndex="1" class="form-control"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-8 form-controls">
                                                    <div class="col-sm-12 form-group">
                                                        <div class="col-sm-3 col-xs-10 col-lg-2 caption">
                                                            <asp:Label ID="lblTipsDesc" runat="server" CssClass="label" Text="Description"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-7 col-xs-10 col-lg-6">
                                                            <asp:TextBox ID="txtTipsDesc" runat="server" Style="max-width: 300px; width: 100%" Height="100px" TextMode="MultiLine"
                                                                MaxLength="500" TabIndex="2" class="form-control" onblur="return disallowScriptTags(this);" onkeypress="return chkDescription(event,this,499);"></asp:TextBox>
                                                        </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="ibtSaveTips" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                                OnClick="ibtSaveTips_Click" OnClientClick="return ValidateTipsInfo(true);" TabIndex="4" />
                                                            <asp:ImageButton ID="ibtUpdateTips" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                OnClick="ibtUpdateTips_Click" OnClientClick="return ValidateTipsInfo(true);"
                                                                TabIndex="5" />
                                                            <asp:ImageButton ID="ibtCancelTips" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                OnClick="ibtCancelTips_Click" TabIndex="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:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                        <asp:Label ID="lblMandatory" runat="server" Text="Required Fields"></asp:Label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                    </asp:Panel>
                                    <asp:Panel ID="pnlTipsDetails" runat="server" CssClass="ControlShow">
                                        <div class="form-box">
                                            <h1>
                                                <span class="icon" style="padding-top: 0px">
                                                    <img src="../images/Manage Tips.png" alt="" />
                                                </span>
                                                <asp:Label ID="lblManageTips" runat="server" Text="Manage Tips"></asp:Label></h1>
                                        </div>
                                        <div id="grid-dsply">
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvTips" ClientInstanceName="gvTips" KeyFieldName="TipsId" runat="server"
                                                    Width="100%" AutoGenerateColumns="False" EnableTheming="true" Theme="Office2003Blue"
                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                    OnHtmlRowCreated="gvTips_HtmlRowCreated">
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/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="Tip Name" Width="44%" FieldName="TipsName" VisibleIndex="1">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/Tip Name.png" alt="" /></span> <span style="padding-left: 5px; padding-top: 10px">
                                                                        <asp:Label ID="lblTipsName" runat="server" Text="Tip Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn Caption="Description" Width="46%" FieldName="TipsDescription"
                                                            VisibleIndex="2" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/Tip Description.png" alt="" /></span> <span style="padding-left: 5px; padding-top: 10px">
                                                                        <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="ibtEditTips" runat="server" CommandArgument='<%# Eval("TipsId").ToString() %>'
                                                                    AlternateText="Edit" CommandName="Delete" ImageUrl="~/images/icn-edit.gif" OnClick="ibtEditTips_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="ibtDeleteTips" runat="server" CommandArgument='<%# Eval("TipsId") %>'
                                                                    AlternateText="Delete" CommandName="Delete" ImageUrl="~/images/delete-icon.gif"
                                                                    OnClick="ibtDeleteTips_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 available" />
                                                    <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/myformvalidations.js"></script>

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

            <script type="text/javascript" language="javascript">


                var Alert_Delete = "Are you sure you want to delete this entry?";

                function setAlertMessageDelete(Delete) {
                    Alert_Delete = Delete;
                }

                // Delete confirm
                function DeleteConfirm() {
                    return confirm(Alert_Delete);
                }

            </script>

            <asp:HiddenField ID="hdnLogout" runat="server" />
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
