<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" inherits="Organization_Settings_Organization_CCMailGroup, App_Web_zwx4uwl3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/LeaveSettings.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" Text="Leave Settings - CC Mail Group" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="inr-ftr">
            <div class="row" style="min-height: 30px">
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:DropDownList ID="ddlSearchOption" runat="server" AppendDataBoundItems="true"
                            CssClass="form-control select2" AutoPostBack="True">
                            <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                            <asp:ListItem Text="Designation" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Organization" Value="1"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvSearchOption" SetFocusOnError="true" ControlToValidate="ddlSearchOption"
                            ErrorMessage="Select search option" Display="None" InitialValue="0" runat="server"
                            ValidationGroup="CCMail"></asp:RequiredFieldValidator>
                    </div>
                    <div class="col-md-3 src-margintop">
                        <asp:TextBox ID="txtSearch" runat="server" CssClass="form-control" MaxLength="50"
                            onkeypress="return chkMaxLen(event,this,50);"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvSearchText" Display="None" SetFocusOnError="true"
                            ControlToValidate="txtSearch" ErrorMessage="Enter text to search" runat="server"
                            ValidationGroup="CCMail"></asp:RequiredFieldValidator>
                    </div>
                    <div class="col-md-7 src-margintop">
                        <asp:ValidationSummary ID="vsSearch" runat="server" ShowMessageBox="True" ShowSummary="False"
                            ValidationGroup="CCMail" />
                        <asp:LinkButton ID="btn_Search" CausesValidation="False" CssClass="btn src-btn fa-search"
                            Text="&nbsp;&nbsp;Search" OnClick="btn_Search_Click" runat="server" ValidationGroup="CCMail" />
                        <asp:LinkButton ID="btn_Clear" CausesValidation="False" CssClass="btn clr-btn fa-refresh"
                            Text="&nbsp;&nbsp;Clear" OnClick="btn_Clear_Click" runat="server" />
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-12" style="overflow: auto; padding-bottom: 10px">
                        <asp:GridView ID="gvCcGroup" runat="server" DataSourceID="odsCCGroup" CssClass="table das-table1"
                            AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="100%">
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="checkall" OnClick="javascript: return select_all(this.checked,this.id);"
                                            runat="server" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkSelect" OnClick="javascript: return select_all(this.checked,this.id);"
                                            runat="server"></asp:CheckBox>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CCGroupId" Visible="False">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCCGroupId" runat="server" Text='<%#Eval("CCGroupId") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Organization / Designation" SortExpression="CCGroup">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_CCGroup" runat="server" Text='<%#Eval("CCGroup") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30px">
                                    <ItemTemplate>
                                        <a href="Organization_CCMailGroupModify.aspx?CCGroupId=<%#Eval("CCGroupId") %>" class="btn btn-defalut edit-icons"></a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                No Records Found.
                            </EmptyDataTemplate>
                            <HeaderStyle CssClass="empheader" />
                            <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                            <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                            <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                PreviousPageText="<" />
                            <AlternatingRowStyle BackColor="white" />
                        </asp:GridView>
                        <asp:ObjectDataSource ID="odsCCGroup" runat="server" SelectMethod="GetCCGroups" TypeName="CCGroupEventData_Angler">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlSearchOption" DefaultValue="0" PropertyName="SelectedValue"
                                    Type="Int32" Name="SearchOption" />
                                <asp:ControlParameter ControlID="txtSearch" PropertyName="Text" Type="string" Name="SearchText" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_Add" CssClass="btn add-btn fa-plus" CausesValidation="False"
                                runat="server" Text="&nbsp;&nbsp;Add" OnClick="btn_Add_Click" />
                            <asp:LinkButton ID="btn_Delete" CssClass="btn del-btn fa-trash-o" Text="&nbsp;&nbsp;Delete"
                                runat="server" OnClick="btn_Delete_Click" OnClientClick="return confirmdelete(this.form);"
                                CausesValidation="False" />
                            <asp:LinkButton ID="btn_Back" CssClass="btn clr-btn fa-angle-left" Text="&nbsp;&nbsp;Back"
                                runat="server" OnClick="btn_Back_Click" CausesValidation="False" Visible="false" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
