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

<!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">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
   <script type="text/javascript" src="../Scripts/noty/jquery.noty.js"></script>
   <script type="text/javascript" src="../Scripts/noty/layouts/center.js"></script>
   <script type="text/javascript" src="../Scripts/noty/themes/default.js"></script>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            var idcon = 0;
            var idvia = 0;
            var comen = '';
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
            
            function agregaTextoCaja(areaID) {
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                ajaxManager.ajaxRequest("agregaTextoCajaa," + areaID);
                return false;
            }

            function CerrarVentana(indicador) {
                var oWnd = GetRadWindow();
                var oArg = new Object();
                oArg.indicador = indicador;
                oWnd.close(oArg);
            }

            function textoDef(texto,caja) {
                document.getElementById(caja).focus();
                document.getElementById(caja).value = document.getElementById(caja).value + ' ' + texto;
            }

            function enviarID(id, fila) {
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                ajaxManager.ajaxRequest("agregaid," + id + "," + fila);
            }

            function openFormFicha(idreser, fechadia) {
                $('#iframereporte').hide();
                $('#iframereporte').attr("src", "frm_Reporte_fichaEvento.aspx?nroReservaEvento=" + idreser + "&fechadiae=" + fechadia);
                var notificacion = generate('Descargando Reporte <br><img src="../Scripts/noty/ajax-loader.gif" />');
                setTimeout(function () {
                    $.noty.setText(notificacion.options.id, 'Enviando mail <br><img src="../Scripts/noty/ajax-loader.gif" />'); // same as alert.setText('Text Override')
                }, 4000);
                setTimeout(function () {
                    $.noty.setText(notificacion.options.id, 'Mail Enviado: '); // same as alert.setText('Text Override')
                }, 8000);
                setTimeout(function () {
                    $.noty.closeAll();
                                }, 12000);
//                var gadget = new cloudprint.Gadget();
//                gadget.setPrintDocument("url", "Reporte", "frm_Reporte_fichaEvento.aspx?nroReservaEvento=" + idreser + "&fechadiae=" + fechadia);
//                gadget.openPrintDialog();
            }

        </script>
        <%--<script src="https://www.google.com/cloudprint/client/cpgadget.js">
        </script>
        <script>
            window.onload = function () {
                var gadget = new cloudprint.Gadget();
                gadget.setPrintButton(
                cloudprint.Gadget.createDefaultPrintButton("print_button_container")); // div id to contain the button
                gadget.setPrintDocument("url", "Test Page", "https://www.google.com/landing/cloudprint/testpage.pdf");
            }
        </script>--%>
    </telerik:RadCodeBlock>
    <div>
        <center>

         <table cellpadding="0" cellspacing="0" border="0"
                style="border: 1px solid #578533; width:100%; font-family: Arial, Helvetica, sans-serif;" >
            <tr>
                <td colspan="3" style="background-color: #cccccc; height: 5px;">
                </td>
            </tr>
            <tr>
                <td style="width: 5px; background-color: #cccccc; height: 227px;">
                </td>
                <td style="width: 100%; background-color: #ffffff; height: 227px; vertical-align:top;">
                    <table style="font-weight: bold; font-size: 9pt; color: black; width: 100%" border="0">
                        <tr>
                            <td align="right" style="width: 20%">
                                Fecha Actual :&nbsp;
                            </td>
                            <td align="left" style="width: 30%">
                                <asp:Label ID="FactualLB" runat="server" ForeColor="Gray" TabIndex="4"></asp:Label>
                            </td>
                            <td align="right" style="width: 20%">
                                Nro Reserva :&nbsp;
                            </td>
                            <td align="left" style="width: 30%">
                                <asp:Label ID="nroReservaLB" runat="server" ForeColor="Gray" Text="nroReservaLB" ></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                R. Social :&nbsp;
                            </td>
                            <td align="left" colspan="3">
                                <asp:Label ID="razonSocialLB" runat="server" ForeColor="Gray" Text="razonSocialLB" ></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                Direccion :&nbsp;
                            </td>
                            <td align="left" colspan="3">
                                <asp:Label ID="direccionLB" runat="server" Text="direccionLB" ForeColor="Gray"></asp:Label>
                            </td>
                        </tr>
                        <tr> 
                            <td align="right">
                                Distrito :&nbsp;
                            </td>
                            <td align="left">
                                <asp:Label ID="distritoLB" runat="server" ForeColor="Gray" Text="distritoLB" ></asp:Label>
                            </td>
                            <td align="right" style="width: 104px">
                                RUC :&nbsp;
                            </td>
                            <td align="left">
                                <asp:Label ID="rucLB" runat="server" Text="rucLB" ForeColor="Gray"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="4">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%"
                                style="border-right: #578533 1px solid; border-top: #578533 1px solid; border-left: #578533 1px solid; border-bottom: #578533 1px solid; background-color: #63973a;" >
                                    <tr>
                                        <td colspan="3" style="background-color: gainsboro; height: 5px;">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 5px; background-color: gainsboro">
                                        </td>
                                        <td style="width: 410px; background-color: beige;" align="center">
                                            <telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Vista" Width="100%">
                                                <Items>
                                                    <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="8pt" ForeColor="White"
                                                        ImageUrl="~/SIG/Resources/Update_Popup.png" PostBack="True" Text="Guardar" >
                                                    </telerik:RadToolBarButton>
                                                    <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="8pt" ForeColor="White"
                                                        ImageUrl="~/SIG/Resources/Cancel_PopUp.png" PostBack="True" Text="Cancelar">
                                                    </telerik:RadToolBarButton>
                                                    <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="8pt" ForeColor="White"
                                                        ImageUrl="~/SIG/Resources/Update_Popup.png" PostBack="True" Text="Texto Definido" >
                                                    </telerik:RadToolBarButton>
                                                    <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="8pt" ForeColor="White"
                                                        ImageUrl="~/SIG/Resources/impresora.gif" PostBack="True" Text="Imprimir Ficha Evento" >
                                                    </telerik:RadToolBarButton>
                                                </Items>
                                            </telerik:RadToolBar>
                                            <telerik:RadGrid ID="RadGrid1" runat="server" Culture="es-ES" Width="100%"
                                                DataSourceID="SDS_AreasFuncion" CellSpacing="0" GridLines="None" 
                                                Skin="Windows7">
                                                <ExportSettings>
                                                    <Pdf PageWidth="" />
                                                </ExportSettings>
                                                <MasterTableView AutoGenerateColumns="False" 
                                                                DataKeyNames="areaId" DataSourceID="SDS_AreasFuncion">
                                                <CommandItemSettings ExportToPdfText="Export to PDF"></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 DataField="areaId" DataType="System.Int32" 
                                                            FilterControlAltText="Filter areaId column" HeaderText="areaId" 
                                                            SortExpression="areaId" UniqueName="areaId" Visible="False">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="areaIdTextBox1" runat="server" Text='<%# Bind("areaId") %>'></asp:TextBox>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="NombreArea" 
                                                            FilterControlAltText="Filter NombreArea column" HeaderText="Area" 
                                                            SortExpression="NombreArea" UniqueName="NombreArea">
                                                            <HeaderStyle HorizontalAlign="Center" Width="20%"/>
                                                            <ItemStyle HorizontalAlign="Left"/>
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn DataField="Observacion" 
                                                            FilterControlAltText="Filter Observacion column" HeaderText="Observacion" 
                                                            SortExpression="Observacion" UniqueName="Observacion">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="TextBox1" runat="server" 
                                                                    Text='<%# Eval("Observacion") %>' TextMode="MultiLine"
                                                                    Width="100%" Rows="2" ></asp:TextBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Width="80%"/>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                <EditFormSettings>
                                                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                                                </EditFormSettings>
                                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                                </MasterTableView>
                                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                                <FilterMenu EnableImageSprites="False"></FilterMenu>
                                            </telerik:RadGrid>  
                                        </td>
                                        <td style="width: 5px; background-color: gainsboro">
                                        </td>
                                    </tr>   
                                    <tr>
                                        <td colspan="3" style="background-color: gainsboro; height: 5px;">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width: 5px; background-color: #cccccc; height: 227px;">
                </td>
            </tr>
            <tr>
                <td colspan="3" style="background-color: #cccccc; height: 5px;">
                </td>
            </tr>
        </table>
    </center>
    </div>
    <asp:SqlDataSource ID="SDS_AreasFuncion" runat="server" 
        SelectCommand="SWP_AreasFuncionesHojaFuncion" 
        SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="" Name="ReservaId1" 
                QueryStringField="nroReservaEvento" Type="Int32" />
            <asp:QueryStringParameter DefaultValue="" Name="fecha" QueryStringField="diaEvento" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Overlay="True" Skin="WebBlue">
        <Windows>
            <telerik:RadWindow ID="fichaEvento" runat="server" Animation="Fade" Behavior="Close, Move"
                Behaviors="Close, Move" Height="550px" InitialBehavior="Close, Move" InitialBehaviors="Close, Move"
                Left="" Modal="True" NavigateUrl="" ReloadOnShow="True" OnClientClose="CerrarVentana" 
                Skin="WebBlue" Style="display: none;" Top="" VisibleStatusbar="True" Width="900px" 
                Title="Observaciones Por Area" >
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>


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

    <iframe id="iframereporte" width="1px" height="1px" frameborder="0"></iframe>


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