<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ContractTemplates.aspx.cs" Inherits="HRMS.Purcahsing.ContractTemplates" %>

<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">
                        Contract Templete
                        <div class="pull-right">
                            <asp:Button Text="Save" CssClass="btn btn-info" ID="btn_save" Width="120px" 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" style="padding-top: 10px">

                            <asp:HiddenField ID="hid_Templete" runat="server" />
                            <asp:HiddenField ID="hid_language" runat="server" />
                            <asp:HiddenField ID="hid_translate" runat="server" />
                            <asp:HiddenField ID="hid_layouttemp" runat="server" />
                            <label class="control-label col-md-2">Operating Unit</label>

                            <div class="col-md-3">
                                <asp:DropDownList CssClass="form-control" ID="ddl_OperatingUnit" runat="server">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" ID="req_ddl_OperatingUnit" ControlToValidate="ddl_OperatingUnit" ErrorMessage="Operating Unit is Required!" />
                            </div>
                            <label class="col-md-2 control-label">Status</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_Status" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" ID="reqtxt_Status" ControlToValidate="txt_Status" ErrorMessage="Status is Required!" />
                            </div>

                        </div>

                        <div class="row" style="padding-top: 10px">
                            <asp:HiddenField ID="hid_content_owner_id" 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>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" ID="req_txt_Name" ControlToValidate="txt_Name" ErrorMessage="Name is Required!" />

                            </div>

                            <label class="col-md-2 control-label">Language</label>
                            <div class="col-md-3">
                                <div class="input-group">
                                    <asp:TextBox ID="txt_lang" runat="server" CssClass="form-control datetime"></asp:TextBox>
                                    <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_Eto" controltovalidate="txt_strt_date" errormessage="Date is Required!" />--%>
                                    <span class="input-group-btn">
                                        <button id="btn_lov_lang" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_lang_Click"><i class="fa fa-search"></i></button>
                                    </span>
                                </div>
                            </div>
                        </div>

                        <div class="row" style="padding-top: 10px">

                            <label class="col-md-2 control-label">Intent</label>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_Rlevel" runat="server" CssClass="form-control">
                                    <%--<asp:ListItem Selected="True" Text="--- Select ---">
                                            </asp:ListItem>--%>
                                    <asp:ListItem Text="Buy" Value="1"></asp:ListItem>
                                </asp:DropDownList>
                            </div>

                            <label class="col-md-2 control-label">Translated From Template</label>
                            <div class="col-md-3">
                                <div class="input-group">
                                    <asp:TextBox ID="txt_transfromtemp" runat="server" CssClass="form-control"></asp:TextBox>
                                    <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_Eto" controltovalidate="txt_strt_date" errormessage="Date is Required!" />--%>
                                    <span class="input-group-btn">
                                        <button id="btn_lov_transfromtemp" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_transfromtemp_Click"><i class="fa fa-search"></i></button>
                                    </span>
                                </div>
                            </div>
                        </div>

                        <div class="row" style="padding-top: 10px">

                            <label class="control-label col-md-2">Start Date</label>
                            <div class="col-md-3">

                                <asp:TextBox ID="txt_StartDate" runat="server" CssClass="form-control datetime"></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" ID="req_txt_StartDate" ControlToValidate="txt_StartDate" ErrorMessage="Start Date is Required!" />
                                <%--<span class="input-group-btn">
                                    <button id="btn_lov_taxCur" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_taxCur_Click"><i class="fa fa-search"></i></button>
                                    </span>--%>
                            </div>


                            <label class="col-md-2 control-label">Layout Template</label>
                            <div class="col-md-3">
                                <div class="input-group">
                                    <asp:TextBox ID="txt_Layout" runat="server" CssClass="form-control"></asp:TextBox>
                                    <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_Eto" controltovalidate="txt_strt_date" errormessage="Date is Required!" />--%>
                                    <span class="input-group-btn">
                                        <button id="btn_lov_Layout" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_Layout_Click"><i class="fa fa-search"></i></button>
                                    </span>
                                </div>
                            </div>

                        </div>

                        <div class="row" style="padding-top: 10px">

                            <label class="control-label col-md-2">End Date</label>
                            <div class="col-md-3">

                                <asp:TextBox ID="txt_EndDate" runat="server" CssClass="form-control datetime"></asp:TextBox>
                            </div>

                            <label class="col-md-2 control-label">Instructions</label>
                            <div class="col-md-3">

                                <asp:TextBox ID="txt_defaultssefto" runat="server" CssClass="form-control " TextMode="MultiLine"></asp:TextBox>
                                <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="RequiredFieldValidator2" controltovalidate="txt_Country" errormessage="Country is Required!" />--%>
                            </div>
                        </div>

                        <div class="row" style="padding-top: 10px">

                            <label class="control-label col-md-2">Description</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_Desc" runat="server" CssClass="form-control " TextMode="MultiLine"></asp:TextBox>
                            </div>
                        </div>

                        <div class="row" style="padding-top: 10px">

                            <label class="col-md-2 control-label"></label>
                            <div class="col-md-3 text-left">
                                <span class="checkbox">
                                    <input id="chk_Enabled" runat="server" type="checkbox" name="ctl00$ContentPlaceHolder1$Enabled" />
                                    <label class="col-md-1 control-label"></label>
                                    Enabled</span>

                            </div>

                            <label class="col-md-2 control-label"></label>
                            <div class="col-md-3 text-left">
                                <span class="checkbox">
                                    <input id="chk_ClausesMand" runat="server" type="checkbox" name="ctl00$ContentPlaceHolder1$ClausesMand" />
                                    <label class="col-md-1 control-label"></label>
                                    Expert Clauses Mandatory</span>

                            </div>
                        </div>

                        <div class="row">
                            <label class="control-label col-md-2">Default Section</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_Default" runat="server" CssClass="form-control "></asp:TextBox>
                            </div>

                        </div>



                        <hr />
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                            CssClass="table table-striped table-bordered table-hover" CellPadding="0"
                            Width="90%" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderStyle-Width="1%">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hid_templine" runat="server"
                                            Value='<%#Bind("TEMPLATE_LINE_ID")%>' />
                                        <asp:HiddenField ID="hid_doc_type" runat="server"
                                            Value='<%#Bind("DOCUMENT_TYPE")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Document Type" HeaderStyle-Width="10%">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddl_doc_type" runat="server" CssClass="form-control">
                                        </asp:DropDownList>
                                    </ItemTemplate>



                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Default Template" HeaderStyle-Width="10%">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk_def" Checked='<%# bool.Parse(Eval("DEFAULT_TEMPLATE").ToString() == "Y" ? "True": "False") %>' runat="server" CssClass="checkbox" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                              
                                <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                    <ItemTemplate>

                                        <asp:LinkButton ID="lnk_add" ValidationGroup="d_save"
                                            runat="server" CommandName="gadd"><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>
                    <hr />
                    <div class="row">
                        <asp:Label CssClass="control-label col-md-offset-2" ID="lbl_due" runat="server"></asp:Label>
                    </div>



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