<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Special_cal.aspx.cs" Inherits="HRMS.Special_cal" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Special Calender
                          <div class="pull-right">
                            <asp:button text="Save" CssClass="btn btn-info" ID="btn_save"   ValidationGroup="save"
                                runat="server" onclick="btn_save_Click"/>
                            <asp:button text="Back" CssClass="btn btn-info" ID="btn_cancel" runat="server" onclick="btn_cancel_Click"/>
                        </div>
                    </header>


                    <div class="panel-body">
                        <div class="span6">
                                <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                            <div class="span6">
                                <div id="diverrmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" id="lbl_err_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                        <div class="row">
                            <asp:HiddenField ID="hid_period_type" runat="server" />
                            <label class="col-md-2  control-label">Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_name" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>

                             <label class="col-md-2  control-label">Description</label>
                            <div class="col-md-4">
                                <asp:TextBox ID="txt_desc" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>


                         <div class="row">
                             <label class="col-md-2  control-label">Periods Per Year</label>
                            <div class="col-md-1">
                                <asp:TextBox ID="txt_period_year" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>

                        <br />
                        <div class="row">
                            <label class="col-md-3 control-label">Types of Calender</label>
                        </div>

                        <div class="row">
                            <div class="col-md-3 col-md-offset-2">
                                <asp:CheckBox ID="chk_r_inv" CssClass="checkbox" Text="Recurring Invoice" runat="server" />
                            </div>

                            <div class="col-md-3">
                                <asp:CheckBox ID="chk_with_h_tax" CssClass="checkbox" Text="Withholding Tax" runat="server" />
                            </div>

                            
                        </div>
                         <div class="row">
                            <div class="col-md-3 col-md-offset-2">
                                <asp:CheckBox ID="chk_pay_term" CssClass="checkbox" Text="Payment Terms" runat="server" />
                            </div>

                             <div class="col-md-3">
                                <asp:CheckBox ID="chk_key" CssClass="checkbox" Text="Key Indicator" runat="server" />
                            </div>
                        </div>

                        <hr />
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  Visible="false"
                        CssClass="table table-striped table-bordered table-hover" CellPadding="0" onrowcommand="GridView1_RowCommand">
                                <Columns>
                                <asp:TemplateField HeaderStyle-Width="10px">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hid_pr" runat="server" Value='<%# Bind("PERIOD_ID") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>    

                            <asp:TemplateField HeaderText="Period Name">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_name" runat="server" CssClass="form-control" Text='<%#Bind("PERIOD_NAME") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq4" ControlToValidate="txt_name" ErrorMessage="Period Name is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Year">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_year" runat="server" CssClass="form-control" Text='<%#Bind("PERIOD_YEAR") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq3" ControlToValidate="txt_year" ErrorMessage="Period Year is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Period No" HeaderStyle-Width="140px">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_pr_no" runat="server" CssClass="form-control" Text='<%#Bind("PERIOD_NUM") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq2" ControlToValidate="txt_pr_no" ErrorMessage="Period No. is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                

                                

                                <asp:TemplateField HeaderText="Start Date">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_strt_date" runat="server" CssClass="form-control datetime" Text='<%#Bind("START_DATE") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq5" ControlToValidate="txt_strt_date" ErrorMessage="Start Date is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="End Date">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_end_date" runat="server" Text='<%# Bind("END_DATE") %>' CssClass="form-control datetime"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rq6" ControlToValidate="txt_end_date" ErrorMessage="End Date is required." setfocusonerror="true" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'></asp:RequiredFieldValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Due Date">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_due_date" runat="server" Text='<%# Bind("DUE_DATE") %>' CssClass="form-control datetime"></asp:TextBox>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                    <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="linkedit" Visible="false" runat="server" CommandName="gEdit"><i class="fa fa-pencil" style="font-size:20px !important;"></i></asp:LinkButton>
                                            <asp:linkbutton ID="lnkadd" CommandName="gAdd" runat="server" ValidationGroup = '<%# "add_" + Container.DataItemIndex %>'><i class="fa fa-plus" style="font-size:20px !important"></i></asp:linkbutton>
                                        </ItemTemplate>
                                            <ItemStyle Width="6%"></ItemStyle>
                                    </asp:TemplateField>
                                </Columns>
                                    <%--<FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />--%>
                            </asp:GridView>
                        


                    </div>

                </section>
            </div>
        </div>
    </div>
</asp:Content>
