<%@ control language="VB" autoeventwireup="false" inherits="RCC_System_CC_EmailCategories, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>




<asp:Panel ID="Pnl_Main" runat="server">
    <div class="row">

        <div class="col-xs-12 Div_OpsRow" id="Tbl_Operations" runat="server">
            <div class="card">
                <div class="header">
                    <div class="displayInlineBlock">
                        <h3><%= Resources.Content.GN00001320%>      <%--Operations--%></h3>
                    </div>

                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_Add" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,strAdd%>" />
                            <asp:Button ID="Btn_BulkEnable" runat="server" Custom1="Custom" Style="display: none" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,strEnable%>" />
                            <asp:Button ID="Btn_BulkDisable" runat="server" Custom1="Custom" Style="display: none" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,strDisable%>" />
                            <asp:Button ID="Btn_BulkIndexUpdate" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,FAM0019%>" />
                            <asp:Button ID="Btn_RemoveAll" runat="server" Custom1="Custom" Style="display: none" Text="<%$ Resources:Content,GN0000278%>" class="btn btn-primary waves-effect btnAction" />
                            <EM:ConfirmButtonExtender ID="CBE_RemoveAll" runat="server" TargetControlID="Btn_RemoveAll" />
                           <%-- <EM:ConfirmButtonExtender ID="CBE_DisableAll" runat="server" TargetControlID="Btn_BulkDisable" />--%>

                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <asp:Panel ID="Pnl_Search" DefaultButton="Btn_Search" runat="server">
        <div class="row">
            <div class="panel-group search-panel" id="AS_Categories" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_Categories">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Categories" href="#<%= CSB_Categories.ClientID%>" aria-expanded="true" aria-controls="SH_Categories">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_Categories" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Categories" aria-expanded="false">
                            <div class="row">

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_CategoryName" runat="server" MaxLength="500"></asp:TextBox>
                                            <asp:Label ID="Label16" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strCategoryName%>" class="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12" id="rowAvailableTo" runat="server">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDL_AvailableTo" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content, L0095 %>" Value="" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,SMI759%>" Value="Resellers"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Customers%>" Value="Customers"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDL_Status" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content, SelectStatus %>" Value="-1" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,GN000195%>" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,GN0000860%>" Value="0"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div class="col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:Button ID="Btn_Search" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                        <asp:Button ID="Btn_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                            Text="<%$ Resources:Content,String289 %>" />
                                    </div>
                                </div>

                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>

    </asp:Panel>

    <div class="row">
        <div class="col-xs-12" id="Pnl_Listing" runat="server">
            <asp:GridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                ID="GV_List" DataKeyNames="CategoryId,CategoryName,IsEnabled,SortIndex" AllowPaging="True" AllowSorting="True" runat="server" AutoGenerateColumns="False">


                <Columns>
                    <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000370 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <HeaderTemplate>
                            <asp:CheckBox runat="server" ID="ChkBx_All" onclick="SetCheckedHeader(this.checked, this, 'All');"
                                Text=" " class="option-menu" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="ChkBx_All" runat="server" onclick="SetCheckedHeader(this.checked, this,'1');" Text=" " CssClass="option-menu" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField SortExpression="IsEnabled" HeaderText="<%$Resources:Content,String385 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <asp:Label ID="LB_Status" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField SortExpression="SortIndex" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" HeaderStyle-HorizontalAlign="Center"
                        HeaderText='<%$ Resources:Content, GN0000941 %>'>
                        <ItemTemplate>
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_SortIndex" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.SortIndex")%>' />
                                    <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxBx_SortIndex"
                                        FilterType="Numbers,Custom" ValidChars="0123456789">
                                    </EM:FilteredTextBoxExtender>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField SortExpression="CategoryName" HeaderText="<%$ Resources:Content, strCategoryName %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <asp:Label ID="LB_CategoryName" Text='<%#DataBinder.Eval(Container, "DataItem.CategoryName")%>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField SortExpression="AvailableTo" HeaderText="<%$ Resources:Content, strAvailableTo %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                        <ItemTemplate>
                            <asp:Label ID="LB_AvailableTo" Text='<%#DataBinder.Eval(Container, "DataItem.AvailableTo")%>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <ul class="option-menu" id="div_options" runat="server">
                                <li class="dropdown">
                                    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                        <i class="material-icons">menu</i>
                                    </a>
                                    <ul class="dropdown-menu pull-right">
                                        <li>
                                            <asp:LinkButton ID="Lbtn_EditCategory" runat="server" Text='<%$ Resources:Content,GN0000276 %>'
                                                CommandArgument='<%#DataBinder.Eval(Container, "DataItem.CategoryId")%>'
                                                CommandName="EditCategory" SkinID="linkButtonEdt" CausesValidation="false"></asp:LinkButton></li>
                                        <li>
                                            <asp:LinkButton ID="LB_UpdateIndex" CssClass="btnAction" Text='<%$ Resources:Content,FAM0019 %>'
                                                runat="server" CommandName="UpdateIndexCategory" CommandArgument="<%# Container.DataItemIndex %>" SkinID="linkButtonPase" /></li>
                                        <li>
                                            <asp:LinkButton ID="LB_EnableDisable" CssClass="btnAction"
                                                CommandArgument='<%#DataBinder.Eval(Container, "DataItem.CategoryId")%>'
                                                runat="server" CommandName="DisableEnableCategory" SkinID="linkButtonPase" /></li>
                                        <li>
                                            <asp:LinkButton ID="LB_Remove" CssClass="btnAction" Text="<%$ Resources:Content,GN0000278%>" SkinID="linkButtonDel"
                                                CommandArgument='<%#DataBinder.Eval(Container, "DataItem.CategoryId")%>' runat="server"
                                                CommandName="DeleteCategory">
                                            </asp:LinkButton></li>
                                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>" runat="server" TargetControlID="LB_Remove" />
                                        <%--<EM:ConfirmButtonExtender ID="CBE_Disable" ConfirmText="<%$ Resources:Content,CBE001%>" runat="server" TargetControlID="LB_EnableDisable" />--%>
                                    </ul>
                                </li>
                            </ul>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <EM:Pager ID="Pager1" runat="server" />
                </PagerTemplate>
            </asp:GridView>
        </div>
    </div>

</asp:Panel>
<asp:Panel ID="Pnl_AddEdit" runat="server" Visible="false">
    <div class="row">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <asp:Literal ID="ltr_Heading" runat="server" Text="<%$ Resources:Content,strEditCategories%>" />:
                                                                                                                                                   
                    </h3>
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            *
                          <asp:Literal ID="Literal41" runat="server" Text="<%$ Resources:Content,strCategoryName%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_CatName" runat="server" MaxLength="500"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TxBx_CatName"
                                        Display="None" SetFocusOnError="True" ValidationGroup="AddEditCategory"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,strDescription%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <asp:TextBox ID="TxBx_Description" Rows="5" runat="server" MaxLength="2000" TextMode="MultiLine"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="row" id="rowAvailable" runat="server">

                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,strAvailableTo%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group form-float">
                                <asp:DropDownList ID="DDL_Available" runat="server">
                                    <asp:ListItem Text="<%$ Resources:Content, L0095 %>" Value="Both" Selected="True"></asp:ListItem>
                                    <asp:ListItem Text="<%$ Resources:Content,SMI759%>" Value="Resellers"></asp:ListItem>
                                    <asp:ListItem Text="<%$ Resources:Content,Customers%>" Value="Customers"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,GN0000941%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_SortIndexAdd" runat="server" Text='0' />
                                </div>
                                <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxBx_SortIndexAdd"
                                    FilterType="Numbers,Custom" ValidChars="0123456789">
                                </EM:FilteredTextBoxExtender>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,strEnable%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <asp:CheckBox ID="chkEnable" runat="server" Checked="true" Text=" " />

                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <asp:ValidationSummary ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false"
                                ValidationGroup="AddEditCategory" HeaderText="<%$ Resources:Content,EM000001%>" />
                            <asp:Button ID="Btn_Save" ValidationGroup="AddEditCategory" CausesValidation="true"
                                SkinID="saveButton" runat="server" Text="<%$ Resources:Content,GN0000281%>" CssClass="btn btn-primary btnAction" />
                            <asp:Button ID="Btn_Cancel" CausesValidation="false" SkinID="cancelButton" runat="server"
                                Text="<%$ Resources:Content,GN0000572%>" CssClass="btn btn-primary" />
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</asp:Panel>
