<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_BaseFramework_AuditTrial_AuditLog, App_Web_msx1fljo" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DataPickerControl" TagPrefix="Date" %>
<%@ Register Src="../../../UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"  TagPrefix="uc1" %>
 <%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>

<asp:Content ID="AuditLogContent" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="AuditLogUpdatePanel" runat="server">
        <ContentTemplate>
           <div id="divContentPage">            
                <div style="width: 100%">
                    <table width="100%" cellpadding="0" cellspacing="0">
                    </table>
                    <div class="spacer5">
                        <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/spacer.gif"></asp:Image>
                    </div>
                    <table width="100%" border="0" style="vertical-align: top; margin-top: -1px" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td class="dashBoardLeftCont" style="width: 160px" valign="top">                             
                                <div id="leftContainer">                                  
                                    <dl class="expandMenu">
                                        <table width="100%" border="0">
                                            <tr>
                                                <td>                                                   
                                                    <div class="himssuHeader3WireBox">
                                                        <dt id="dtSETTINGS" onclick="showHideSwitch('ddSETTINGS')">
                                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td>
                                                                        <div class="himsBoxHeader">
                                                                            <div class="leftdiv">
                                                                            </div>
                                                                            <div class="himsBoxTitle">
                                                                                <table width="100%">
                                                                                    <tr>
                                                                                        <td style="width: 100%">
                                                                                            <div class="headerText">
                                                                                                Master </div>
                                                                                        </td>
                                                                                        <td>
                                                                                            <img name="ddSETTINGSButton" id="ddSETTINGSButton" src="../../../Images/buttonCollapse.gif"></img>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </dt>                                                       
                                                        <dd style="text-align: left; margin: 0px" id="ddSETTINGS">
                                                            <table width="160px" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td>
                                                                        <div class="himsBoxContent leftTableContainer">
                                                                            <div class="leftUlMenu">
                                                                                <ul id="sidebarmenu1">
                                                                                    <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="126"
                                                                                        Visible="true" runat="server" />
                                                                                </ul>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <div class="himsBoxFooter">
                                                                <div>
                                                                </div>
                                                            </div>
                                                        </dd>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </dl>
                                </div>
                            </td>
                            <td class="minMaxButton" style="width: 1%; margin: 0; vertical-align: top">
                                <asp:Image ID="Image7" runat="server" ImageUrl="~/Images/spacer.gif"></asp:Image>
                            </td>
                            <td style="vertical-align: top" width="99%">
                               <div class="himssuHeader1WireBox">
                <div class="himsBoxHeader">
                    <asp:Panel ID="AuditLogPanel" runat="server">
                        <div class="leftdiv">
                        </div>
                        <div class="himsBoxTitle">
                            <div class="headerText">
                                <asp:Label ID="HeaderLabel" runat="server" Text="Audit History"></asp:Label>
                            </div>
                        </div>
                    </asp:Panel>
                </div>
                <div class="himsBoxContent">
                    <div class="contentHolder">
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="AuditTableLabel" runat="server" Text="Audit Table" CssClass="mandatory"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList ID="AuditTableDropDownList" SkinID="CustomWidthDropDownList" Width="150px"
                                    AutoPostBack="True" runat="server" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                    OnSelectedIndexChanged="AuditTableDropDownList_SelectedIndexChanged" TabIndex=1>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="DataIdLabel" runat="server" Text="DataID" CssClass="mandatory"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList ID="DataIdDropDownList" SkinID="CustomWidthDropDownList" Width="100px"
                                    AutoPostBack="True" runat="server" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                    OnSelectedIndexChanged="DataIdDropDownList_SelectedIndexChanged" TabIndex=2>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="FieldLabel" runat="server" Text="Select Fields" CssClass="mandatory"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList ID="FieldDropDownList" SkinID="CustomWidthDropDownList" Width="100px"
                                    AutoPostBack="True" runat="server" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                    OnSelectedIndexChanged="FieldDropDownList_SelectedIndexChanged" TabIndex=3>
                                </asp:DropDownList>                              
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="UserLabel" runat="server" Text="User"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList ID="UserDropDownList" SkinID="CustomWidthDropDownList" Width="150px"
                                    AutoPostBack="True" runat="server" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                    OnSelectedIndexChanged="UserDropDownList_SelectedIndexChanged" TabIndex=4 >
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="AuditFromDateLabel" runat="server" Text="Audit From Date"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <Date:DataPickerControl ID="AuditFormDateTextBox" DisplayDatePicker="true" SkinID="CustomWidthTextBox"
                                    Width="100px" runat="server" OnTextChanged="AuditFormDateTextBox_TextChanged" DateTabIndex=5 />
                            </div>
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="AuditToDateLabel" runat="server" Text="Audit To Date"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <Date:DataPickerControl ID="AuditToDateTextBox" DisplayDatePicker="true" SkinID="CustomWidthTextBox"
                                    Width="100px" runat="server" OnTextChanged="AuditToDateTextBox_TextChanged"  DateTabIndex=6 />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="alignCenter pTop5">
                            <asp:Button ID="SearchButton" runat="server" Text="Search"
                                OnClick="SearchButton_Click" TabIndex=7  SkinID="0" CssClass="PrimaryButton"/>
                             <asp:Button ID="Clear" runat="server" SkinID="CustomWidthButton" OnClick="ClearButton_Click" Text="Clear" TabIndex=8  />
                        </div>
                        <div class="cBoth">
                        </div>
                    </div>
                </div>
                <div class="spacer">
                    <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/spacer.gif" />
                </div>
                <asp:Panel ID="grviewPanel" runat="server" Visible="false">
                    <div class="himssuHeader1WireBox">
                        <div class="himsBoxHeader">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <div class="fLeft">
                                        List
                                    </div>
                                    <div align="right" class="fRight coloBlack" style="margin-top: -3px;">
                                        <uc1:GridViewPager ID="AvailableDeptCodeGridViewPager" runat="server" OnFirstRecordClick="AvailableDeptCodeGridViewPager_FirstRecordClick"
                                            OnLastRecordClick="AvailableDeptCodeGridViewPager_LastRecordClick" OnNextRecordClick="AvailableDeptCodeGridViewPager_NextRecordClick"
                                            OnPrevRecordClick="AvailableDeptCodeGridViewPager_PrevRecordClick" OnTextBoxValueChange="AvailableDeptCodeGridViewPager_TextBoxValueChange"
                                            ParentGridView="AuditedHistoryGridView" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent">
                            <div class="himsBoxContent">
                                <div class="himsBoxContentMsg" id="GridContentDiv" runat="server" visible="False">
                                </div>
                                <asp:GridView ID="AuditedHistoryGridView" runat="server" AutoGenerateColumns="False"
                                    Width="100%" TabIndex="5" DataKeyNames="TableId" AllowPaging="True" PageSize="5"  EmptyDataText="No Records found">
                                    <Columns>
                                        <asp:BoundField HeaderText="DataID" DataField="DataId" Visible="False">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="Action" DataField="AuditAction" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="350px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="Audit Date" DataField="AuditDate" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="200px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="User Name" DataField="UserName" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="200px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="Field Name" DataField="FieldName" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="200px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="Old Value" DataField="OldValue" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="200px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText="New Value" DataField="NewValue" HeaderStyle-HorizontalAlign="Left">
                                            <ItemStyle HorizontalAlign="Left" Width="200px" />
                                            <HeaderStyle CssClass="Headerstyle" />
                                            <ControlStyle Font-Bold="True" />
                                        </asp:BoundField>
                                    </Columns>
                                    <PagerSettings Visible="False" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </asp:Panel>
            </div>
                            </td>
                        </tr>
                    </table>                
                </div>
            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>           
        </ContentTemplate>
    </asp:UpdatePanel>
  <%--  <script data-main="../../../JavaScript/rjs/encrypt/audit-log-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/audit-log")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
