<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="frm_DepositosConfirmados.aspx.vb" Inherits="SGHweb.frm_DepositosConfirmados" %>

<!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 runat="server">
    <title></title>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    var cell_valor
    var cell_id
    function RadGrid_RowSelected(sender, eventArgs) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView();
        var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
        cell_valor = MasterTable.getCellByColumnUniqueName(row, "<%=  columna_mostrar %>");
        cell_id = eventArgs.getDataKeyValue("<%=  identificador %>");
        cell_valor = cell_valor.innerHTML;
        //alert(cell_id);
        //alert(cell_valor);
        returnToParent();
    }
    //    function OnKeyPress(sender, eventArgs) {
    //        var c = eventArgs.get_keyCode();
    //        if (c == 13) {
    //            __doPostBack('btn_buscar', '');
    //        }
    //    }
    function Todas() {
        cell_valor = 'Todas';
        cell_id = '0';
        returnToParent();
    }
    function returnToParent() {
        //create the argument that will be returned to the parent page
        var oArg = new Object();

        //get the city's name           
        oArg.cell_valor = cell_valor;
        oArg.cell_id = cell_id;


        //get a reference to the current RadWindow
        var oWnd = GetRadWindow();

        //Close the RadWindow and send the argument to the parent page
        if (oArg.cell_valor && oArg.cell_id) {
            oWnd.close(oArg);
        }

    }
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }

    function SizeToFit() {
        window.setTimeout(
        function () {
            var oWnd = GetRadWindow();
            oWnd.SetWidth(document.body.scrollWidth + 25);
            oWnd.SetHeight(document.body.scrollHeight + 39);
            oWnd.center();
        }, 400);

    }
</script> 
</telerik:RadCodeBlock>
<script type="text/javascript" id="telerikClientEvents1">
    function RadAjaxManager1_OnRequestStart(sender, args) {
        if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)
            args.set_enableAjax(false);
    }
    </script>
</head>
<body onload="SizeToFit()">
    <form id="form1" runat="server">
    <div>
        <telerik:RadGrid ID="RadGrid3" runat="server" Skin="Windows7" CellSpacing="0" 
                Culture="es-ES" DataSourceID="SqlDataSource_USP_Voucher_Deposito_Valido" 
                GridLines="None">

            <MasterTableView AutoGenerateColumns="False" DataKeyNames="VoucherID" 
                DataSourceID="SqlDataSource_USP_Voucher_Deposito_Valido"
                HorizontalAlign="NotSet" CommandItemDisplay="Top">
    
            <CommandItemSettings ExportToPdfText="Export to PDF"
                AddNewRecordText="Agregar Nuevo Registro" RefreshText="Recargar" 
                    ShowAddNewRecordButton="False" ShowExportToExcelButton="True" 
                    ShowRefreshButton="False">
            </CommandItemSettings>

            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>

            <ExpandCollapseColumn Visible="True" 
                    FilterControlAltText="Filter ExpandColumn column" Created="True">
            <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>

                <Columns>
                    <telerik:GridTemplateColumn HeaderText="Verificado" UniqueName="Verificado" Display="false">
                      <ItemTemplate>      
                          <asp:CheckBox ID="CheckBox1" runat="server" />  
                      </ItemTemplate>
                      <FooterStyle Width="80px" />
                      <HeaderStyle Width="80px" />
                      <ItemStyle Width="80px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="VoucherID" 
                        FilterControlAltText="Filter VoucherID column" HeaderText="VoucherID" 
                        ReadOnly="True" SortExpression="VoucherID" UniqueName="VoucherID" Display="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="Fecha" HeaderText="Fecha"
                        UniqueName="Fecha" PickerType="DatePicker" 
                        DataFormatString="{0:dd/MM/yy}" > 
                        <ColumnValidationSettings EnableRequiredFieldValidation="True">
                            <RequiredFieldValidator ForeColor="Red" Text="*Campo Obligatorio" Display="Dynamic">
                            </RequiredFieldValidator>
                        </ColumnValidationSettings>
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridNumericColumn DataField="Total" HeaderText="Importe" UniqueName="total">
                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                            <RequiredFieldValidator ForeColor="Red" Text="*Campo Obligatorio" Display="Dynamic">
                            </RequiredFieldValidator>
                        </ColumnValidationSettings>
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn DataField="NroOperacion" 
                        FilterControlAltText="Filter NroOperacion column" HeaderText="NroOperacion" 
                        SortExpression="NroOperacion" UniqueName="NroOperacion">
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Referencia" 
                        FilterControlAltText="Filter Referencia column" HeaderText="Referencia" 
                        SortExpression="Referencia" UniqueName="Referencia">
                        <FooterStyle Width="200px" />
                        <HeaderStyle Width="200px" />
                        <ItemStyle Width="200px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReservaID" 
                        FilterControlAltText="Filter ReservaID column" HeaderText="Reserva" 
                        SortExpression="ReservaID" UniqueName="ReservaID">
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="EmpresaID" 
                        FilterControlAltText="Filter EmpresaID column" HeaderText="EmpresaID" 
                        SortExpression="EmpresaID" UniqueName="EmpresaID" Display="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="razonsocial" 
                        FilterControlAltText="Filter razonsocial column" HeaderText="razonsocial" 
                        SortExpression="razonsocial" UniqueName="razonsocial">
                        <FooterStyle Width="200px" />
                        <HeaderStyle Width="200px" />
                        <ItemStyle Width="200px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UsuarioID" 
                        FilterControlAltText="Filter UsuarioID column" HeaderText="Usuario" 
                        SortExpression="UsuarioID" UniqueName="UsuarioID">
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UsuarioVerifica" 
                        FilterControlAltText="Filter UsuarioVerifica column" HeaderText="Usuario Verfica" 
                        SortExpression="UsuarioVerifica" UniqueName="UsuarioVerifica">
                        <FooterStyle Width="80px" />
                        <HeaderStyle Width="80px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="VerificadoBanco" 
                        FilterControlAltText="Filter VerificadoBanco column" HeaderText="VerificadoBanco" 
                        ReadOnly="True" SortExpression="VerificadoBanco" UniqueName="VerificadoBanco" Display="false">
                    </telerik:GridBoundColumn>
                </Columns>

            <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            </EditFormSettings>

            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
            </MasterTableView>

            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

            <FilterMenu EnableImageSprites="False"></FilterMenu>

        </telerik:RadGrid>
    </div>

    <asp:SqlDataSource ID="SqlDataSource_USP_Voucher_Deposito_Valido" runat="server" 
        SelectCommand="USP_Voucher_Deposito" SelectCommandType="StoredProcedure"> 
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="BancocuentaID" 
                QueryStringField="BancoCuentaID" Type="Int32" />
            <asp:Parameter DefaultValue="3" Name="tipo" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    </form>
</body>
</html>
