<%@ Page Language="C#" validateRequest="false" AutoEventWireup="true" CodeFile="List_Auditoria.aspx.cs" Inherits="List_Auditoria" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/ControlUsuario/pl_pie.ascx" TagName="pl_pie" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link rel="Shortcut Icon" href="images/ico.ico"> 
    <title id="Titulo" runat="server"></title>
    <link href="estilos/Estilos.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="JavaScript/actb.js"></script>
    <script language="javascript" type="text/javascript" src="JavaScript/common.js"></script>
    <script language="javascript" type="text/javascript" src="JavaScript/SGH_Script.js"></script>
    </head>

<%--<body onblur="self.close()">--%>
<body >
    <form id="form1" runat="server" method="post" defaultfocus="txtUsuario">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>


<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">


                function requestStart(sender, args) {
                    if (args.get_eventTarget().indexOf("ExcelExport") != -1)
                        args.set_enableAjax(false);
                    if (args.get_eventTarget().indexOf("PDFExport") > 0)
                        args.set_enableAjax(false);
                    if (args.get_eventTarget().indexOf("WordExport") > 0)
                        args.set_enableAjax(false);
                    if (args.get_eventTarget().indexOf("CSVExport") > 0)
                        args.set_enableAjax(false);
                    if (args.get_eventTarget().indexOf("Print") > 0)
                        args.set_enableAjax(false);
                }

                function ShowEditForm(id, rowIndex, sudid) {
                    var grid = $find("<%= tk_Grid.ClientID %>");

                    var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                    grid.get_masterTableView().selectItem(rowControl, true);

                    window.radopen("frmArchivos.aspx?AsientoContableID=" + id + "&SubDiarioID=" + sudid, "UserListDialog");
                    return false;
                }
                function ShowInsertForm() {
                    window.radopen("frmArchivos.aspx", "UserListDialog");
                    return false;
                }

                function refreshGrid(arg) {
                    if (!arg) {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                    }
                    else {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                    }
                }
                function RowDblClick(sender, eventArgs) {
                    window.radopen("frmArchivos.aspx?AsientoContableID=" + eventArgs.getDataKeyValue("AsientoContableID"), "UserListDialog");
                }
               </script>
           </telerik:RadCodeBlock>
           

      <table  style="height:455px; width:100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td align="center" valign="middle">
          <table width="100%" cellpadding="0" cellspacing="0" border="0" 
                style="height:435px; background-color: #FFFFFF;">
            <tr>
              <td colspan="2" style="height:7px" bgcolor="#FFFFFF"></td>
            </tr>
            <tr id="TRCerrar" runat="server" visible="false">
              <td align=right colspan="2" style="height:24px;" background="images/LineForest.jpg"></asp:Label> <a href="#" class="linksblanco" style="vertical-align:text-top" onClick="cerrar()"> Cerrar</a>&nbsp;&nbsp</td>
            </tr>
            <tr id="TRImagen" runat="server" visible="false">
              <td align="center" colspan="2" style="height:10px">
                <table width="95%" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td align="left" style="height: 18px">
                      
                      <asp:Image ID="imgLogo"  runat="server" align="left" />
                    </td>
                    <td align="right" valign="middle" >
                     
                      <asp:Image ID="imgLogoEmpresa"  runat="server" />
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="top">
              
              <table id="Table3" cellspacing="0" cellpadding="0" width="97%" border="0">
        <tr>
            <td align="center"  style="height: 45px; ">
                
                
                
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width:1px;">
                            <img id="Img3" runat="server" src="~/images/TitleLeftLightBlue.png" alt="" />
                        </td>
                        <td background="images/LineBodySky.png" style="padding-left:20px; text-align:left" class="tituloseccion">
                            
                            
                          Movimientos Historicos
                            
                        </td>
                        <td background="images/LineGray.png" style="width:20px; padding-left:10px; vertical-align:bottom;">
                            <a href="BusquedaInteligente.aspx" class="gridtext">
                                <img id="imgHome" runat="server" src="images/home.png" border="0" />                                            
                            </a>                            
                        </td>
                        <td background="images/LineGray.png" style="width:20px" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="Regresar()">Inicio</a>
                        </td>
                        <td background="images/LineGray.png" style="width:20px; padding-left:15px" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="cerrar()">
                                <img id="img2" runat="server" src="images/close.png" border="0" />                                            
                            </a>
                        </td>                 
                        <td background="images/LineGray.png" style="width:20px; padding-right:5px" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="CerraryRegresar()">Cerrar</a>
                        </td>
                        <td style="text-align:right; width:1px;">
                            <img id="Img1" class="gridtext" runat="server" src="~/images/TitleRightLightGray.png" alt="" />
                        </td>
                    </tr>
                </table>        
                   
            </td>
        </tr>
        
 
        <tr><td style="height:5px"></td></tr>
        
        <tr>
            <td colspan="3" align="center">
                

                        <table border="0" style="border: #CCCCCC 1px solid; width: 100%">
                        
                            <tr>
                                <td style="text-align: center; height: 21px; padding: 4px;">

         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="requestStart">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="tk_Grid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="tk_Grid"  LoadingPanelID="RadAjaxLoadingPanel1"  />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    
                </AjaxSettings>
            </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" />                                

                                
                                 <telerik:RadGrid 
                                         AutoGenerateColumns="False" 
                                        ID="tk_Grid" 
                                        AllowPaging="True" 
                                        PageSize="20" 
                                        runat="server" 
                                        GridLines="None" 
                                        Skin="Office2007" 
                                        AllowCustomPaging="false" 
                                        VirtualItemCount="100000"   
                                        AllowMultiRowSelection="true"
                                        onneeddatasource="tk_Grid_NeedDataSource" 
                                        onitemcommand="tk_Grid_ItemCommand"
                                         >
                                        
                                        <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="15" />
                                        <HeaderStyle CssClass="arial10bold" Font-Bold="true"/>
                                        <FooterStyle CssClass="arial10bold" BackColor="AliceBlue"/>
                                        <FilterItemStyle HorizontalAlign="Right" />
                                        <GroupHeaderItemStyle CssClass="arial10px" />
                                        <GroupingSettings CaseSensitive="False" />

                                        <ExportSettings  ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" >
                                            <Pdf PageWidth="480mm" Creator="SGH-Peru" Author="Sistema de Contabilidad" PageBottomMargin="5px" PageTopMargin="5px" PageLeftMargin="5px" PageRightMargin="5px" />
                                        </ExportSettings>
                                       
                                        <MasterTableView DataKeyNames="UsuarioMovimientoID" CellSpacing="0" CommandItemDisplay="Top" >
                                            <Columns>

                                                <telerik:GridBoundColumn HeaderText="UsuarioMovimientoID" DataField="UsuarioMovimientoID" Visible="false"
                                                    UniqueName="UsuarioMovimientoID" SortExpression="UsuarioMovimientoID" AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false">
                                                    <HeaderStyle HorizontalAlign="Center" />
                                                </telerik:GridBoundColumn>

                                                <telerik:GridBoundColumn HeaderStyle-Width="100px" HeaderText="Dia" DataField="Dia"> 
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </telerik:GridBoundColumn>
                                                
                                                <telerik:GridTemplateColumn HeaderStyle-Width="257px" HeaderText="Movimiento">
                                                <ItemStyle HorizontalAlign="Left" />
                                                    <ItemTemplate>
                                                        <asp:TextBox TextMode="MultiLine" id="txtMovimiento" CssClass="cajaformulario" Height="60px" Width="230px" runat="server" Text='<%# Eval("Movimiento")%>' />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
 
                                                <telerik:GridBoundColumn  HeaderStyle-Width="80px" HeaderText="IP Equipo" DataField="IPEquipo">
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                    <ItemStyle HorizontalAlign="Left" />
                                                </telerik:GridBoundColumn>

                                                <telerik:GridTemplateColumn HeaderStyle-Width="257px" HeaderText="Ultimo Movimiento">
                                                    <ItemTemplate>
                                                        <asp:TextBox TextMode="MultiLine" id="txtMovimientoUltimo" CssClass="cajaformulario" Height="60px" Width="230px"  runat="server" Text='<%# Eval("MovimientoUltimo")%>' />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                

                                                <telerik:GridBoundColumn HeaderStyle-Width="100px" HeaderText="Usuario" DataField="BEUsuarios.NombreUsuario">
                                                    <ItemStyle HorizontalAlign="Left" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </telerik:GridBoundColumn>
                                                
                                            </Columns>
                                        
                                            <CommandItemStyle HorizontalAlign="Left" Height="25px" />
                                            <CommandItemTemplate>
                                                <div style="float: right;">
                                                    <asp:ImageButton runat="server" ID="ExcelExport" ImageUrl="~/images/page_excel.png" CommandName="ExportExcel" AlternateText="Excel" ToolTip="Excel" CausesValidation="false" /> 
                                                    <asp:ImageButton runat="server" ID="PDFExport" ImageUrl="~/images/page_acrobat.png" CommandName="ExportPDF" AlternateText="Pdf" ToolTip="Pdf" />
                                                    <asp:ImageButton runat="server" ID="WordExport" ImageUrl="~/images/page_word.png" CommandName="ExportWord" AlternateText="Word" ToolTip="Word" />
                                                    <asp:ImageButton runat="server" ID="CSVExport" ImageUrl="~/images/page_csv.png" CommandName="ExportCSV" AlternateText="CSV" ToolTip="CSV" />
                                                    <asp:ImageButton runat="server" ID="Print" ImageUrl="~/images/printer.png" CommandName="Print" AlternateText="Print" ToolTip="Imprimir" />
                                                </div>
                                                </CommandItemTemplate>
                                        </MasterTableView>
                                        <ClientSettings EnableRowHoverStyle="true">
                                            <Selecting AllowRowSelect="true" />
                                            <Scrolling AllowScroll="true" UseStaticHeaders="true"/>
                                        </ClientSettings>
                                        
                                    </telerik:RadGrid>
                                    
                                </td>
                                
                            </tr>
                        </table>
                        <table id="tblBotones" runat="server" visible="false" cellspacing="0" cellpadding="0" width="100%"
                            border="0">
                            <tr>
                                <td style="width: 88%; height: 22px; padding-right:10px; padding-bottom:10px" align="right">
                                   
                                </td>
                                
                            </tr>
                        </table>   
                   
            </td>
        </tr>
    </table>
              
              
              </td>
            </tr>
            <tr>
              <td colspan="2" style="height:40px">
                  
                  <uc1:pl_pie ID="pl_pie1" runat="server" />
                  
              </td>
            </tr>
          </table>
        </td>
      </tr>
      </table>
      
      <asp:Label id="lblResultado" runat="server"></asp:Label>
      
      
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Office2007">
        <Windows>
            <telerik:RadWindow ID="UserListDialog" runat="server" Behaviors="Move,Close" VisibleStatusbar="false"
                Title="Archivos" AutoSize="false" Width="884px" Height="520px" ReloadOnShow="true"
                ShowContentDuringLoad="true" Modal="true" />
        </Windows>
    </telerik:RadWindowManager>
    
    
    </form>
</body>
</html>
