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

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="server">
    <div class="content-header">
        <h1 style="background-image: url(../dist/img/adit-trail.png); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_HeaderAuditTrail" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="emp-filter">
            <div class="form-horizontal">


                <%-----------------------HariHaran J------21-09-2023----------%>

                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="table-responsive" style="overflow: auto;">
                            <asp:Label ID="Label1" runat="server" Text="Audit Trail is not defined!"
                                Visible="false" ForeColor="Red"></asp:Label>
                            <asp:GridView ID="GrvAudiTrail" runat="server" CssClass="table das-table1" AutoGenerateColumns="false"
                                EnableTheming="false" OnRowCommand="GrvAudiTrail_RowCommand" BorderWidth="1px"
                                HeaderStyle-CssClass="empheader">
                                <Columns>


                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="lblTable" runat="server" Text="Table" Style="padding-right: 2px"></asp:Label>
                           
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                      
                                           
                                            <asp:CheckBox ID="ChkTabletruefalse" runat="server" AutoPostBack="true" OnCheckedChanged="ChkTabletruefalse_CheckedChanged"
                                                Checked='<%# (Eval("TableStatus").ToString() == "True" ? true : false) %>'
                                                Style="padding-left: 5px; padding-top: 5px" />
                               
                                            
                                        </ItemTemplate>
                                        <HeaderStyle CssClass="empheader" HorizontalAlign="Left" Width="6%" Height="6%"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" />
                                    </asp:TemplateField>

                                    <asp:TemplateField>
                                        <HeaderTemplate>
                              
                                            <asp:Label ID="lblInserts" runat="server" Text="Insert" Style="padding-right: 2px"></asp:Label>
                          
                                        </HeaderTemplate>
                                        <ItemTemplate>
                            
                                            <asp:CheckBox Style="padding-left: 15px" ID="chkListInsertFields" runat="server" AutoPostBack="true"
                                                Checked='<%# (Eval("InsertBit").ToString() == "True" ? true : false) %>'
                                                OnCheckedChanged="chkListInsertFields_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
                           
                                        </ItemTemplate>
                                        <HeaderStyle CssClass="empheader" HorizontalAlign="Left" Width="6%" Height="6%"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" />
                                    </asp:TemplateField>

                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                           
                                            <asp:Label ID="lblUpdates" runat="server" Text="Update" Style="padding-right: 2px"></asp:Label>

                                        </HeaderTemplate>
                                        <ItemTemplate>
                                
                                            <asp:CheckBox Style="padding-left: 15px" ID="chkListUpdateFields" runat="server" AutoPostBack="true"
                                                Checked='<%# (Eval("UpdateBit").ToString() == "True" ? true : false) %>'
                                                OnCheckedChanged="chkListUpdateFields_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;        
                                             
                                            
                                        </ItemTemplate>
                                        <HeaderStyle CssClass="empheader" HorizontalAlign="Left" Width="6%" Height="6%"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" />
                                    </asp:TemplateField>

                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                    
                                            <asp:label id="lbldeletes" runat="server" text="delete" style="padding-right: 2px"></asp:label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                             
                                                <asp:CheckBox Style="padding-left: 15px" ID="chkListDeleteFields" runat="server" AutoPostBack="true"
                                                Checked='<%# (Eval("DeleteBit").ToString() == "True" ? true : false) %>'
                                                OnCheckedChanged="chkListDeleteFields_CheckedChanged" />
                                            
                                        </ItemTemplate>
                                        <HeaderStyle CssClass="empheader" HorizontalAlign="Left" Width="6%" Height="6%"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" />
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="FieldID" Visible="false" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="FieldID" runat="server" Text='<% # Bind("FieldID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    <asp:TemplateField HeaderText="ManualTimeEntryId" Visible="false" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="TableID" runat="server" Text='<% # Bind("TableID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Table Name" Visible="true" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="FieldName" runat="server" Text='<% # Bind("FieldName") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Table Description" Visible="true" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="FieldDescription" runat="server" Text='<% # Bind("FieldDescription") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Status" Visible="false" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="Status" runat="server" Text='<% # Bind("Status") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                </Columns>
                                <%--<RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                <AlternatingRowStyle BackColor="white" />--%>
                            </asp:GridView>
                        </div>
                    </div>
                </div>

               <%-------------END----------------22-09-2023----------%>


                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="table-responsive" style="overflow: auto;">
                            <asp:Label ID="lblAuditTrailNotDefined" runat="server" Text="Audit Trail is not defined!"
                                Visible="false" ForeColor="Red"></asp:Label>
                            <asp:GridView ID="grvAuditTrail" runat="server" CssClass="table das-table1" AutoGenerateColumns="true"
                                EnableTheming="false" OnRowCommand="grv_AuditTrail_RowCommand" BorderWidth="1px"
                                HeaderStyle-CssClass="empheader">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="lblInsert" runat="server" Text="Insert" Style="padding-right: 2px"></asp:Label>
                                            <asp:Label ID="lblUpdate" runat="server" Text="Update" Style="padding-right: 2px"></asp:Label>
                                            <asp:Label ID="lblDelete" runat="server" Text="Delete" Style="padding-right: 2px"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="btnLink" runat="server" CssClass="fa fa-plus-circle" CommandName="Expand"
                                                Style="padding-left: 5px; padding-top: 5px"></asp:LinkButton>
                                            <asp:CheckBox ID="chkListTable" runat="server" AutoPostBack="true" OnCheckedChanged="chkListTable_CheckedChanged"
                                                Style="padding-left: 5px; padding-top: 5px" />
                                            <asp:CheckBox Style="padding-left: 15px" ID="chkListInsertField" runat="server" AutoPostBack="true"
                                                OnCheckedChanged="chkListInsertField_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
                                            <asp:CheckBox Style="padding-left: 15px" ID="chkListUpdateField" runat="server" AutoPostBack="true"
                                                OnCheckedChanged="chkListUpdateField_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
                                            <asp:CheckBox Style="padding-left: 15px" ID="chkListDeleteField" runat="server" AutoPostBack="true"
                                                OnCheckedChanged="chkListDeleteField_CheckedChanged" />
                                            <asp:HiddenField ID="hdnRowIndex" runat="server" />
                                        </ItemTemplate>
                                        <HeaderStyle CssClass="empheader" HorizontalAlign="Left" Width="16%" Height="16%"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="left" />
                                    </asp:TemplateField>
                                </Columns>
                                <%--<RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                <AlternatingRowStyle BackColor="white" />--%>
                            </asp:GridView>
                        </div>
                    </div>
                </div>



                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btnSave" runat="server" CssClass="btn save-btn fa-floppy-o" OnClick="btnSave_Click" />
                        </div>
                    </div>
                </div>



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