<%@ Import Namespace="Seven.Front" %>
<%@ Import Namespace="Seven.Front.Globals" %>
<%@ Import Namespace="Seven.Front.Objects" %>

<%@ Page Language="C#" MasterPageFile="Model.Master" AutoEventWireup="true" CodeBehind="EstadisticasExplotacion.aspx.cs" Inherits="Seven.Front.EstadisticasExplotacion" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">

    <title><%=L.TIT("EstadisticasExplotacion") %> [4.9]</title>

    <script type="text/javascript">

        function Ver() {
            window.open('Informe.aspx?r=16&i=' + $('#cbExplotacionOrden').val()
                + '&s=' + $('#txtInicio').val()
                + '&f=' + $('#txtFin').val()
                + '&m=' + $('#cbMoneda').val()
                + '&t=' + $('#txtTasa').val()
                + '&o=' + $('input[name=rbOrden]:checked').val()
                + '&g=' + $('#cbAgrup:checked').val()
                + "&fe=" + $("input[name=cbFil_id_agen]:checked").val() + "&ve=" + $('#cbEmpresa').val()
                + "&fm=" + $("input[name=cbFil_id_merc]:checked").val() + "&vm=" + $('#cbMercado').val()
                + "&ft=" + $("input[name=cbFil_id_cont]:checked").val() + "&vt=" + $('#cbContrato').val()
                + "&fk=" + $("input[name=cbFil_id_thab]:checked").val() + "&vk=" + $('#cbTipoHabi').val()
                + "&fu=" + $("input[name=cbFil_id_uhab]:checked").val() + "&vu=" + $('#cbUsoHab').val()
                + "&fq=" + $("input[name=cbFil_tipo]:checked").val() + "&vq=" + $('input[name=rbTipo]:checked').val()
           , "_blank");
        }

        function CargarTasa() {
            $('#txtTasa').val($('#HID_MO_tasa_' + $('#cbMoneda').val()).val());
        }

    </script>

    <script type="text/javascript">

        $(document).ready(function () {

            $("#dlgFiltro").dialog({
                autoOpen: false,
                show: "fade",
                hide: "curtain",
                resizable: false,
                height: 270,
                width: 480,
                modal: true,
                buttons: {
                    "<%=L.LBL("LblGENVer") %>": function () {
                        Ver();
                    },
                    "<%=L.LBL("LblGENClose") %>": function () {
                        $(this).dialog("close");
                    }
                }
            });

            $("#SevenMenu").accordion("option", "active", 4);

            $("#EnlaceMaestro").focus();

            $('#cbExplotacionOrden').val(<%=FrontExplotacionOrden %>);

            $('#cbMoneda').val(<%=FrontMoneda %>);

            CargarTasa();

        });

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cpPrincipal" runat="server">

    <div id="SevenBreadcrumb" class="ui-state-default">
        <table style="width: 100%; white-space: nowrap;">
            <tr>
                <td>
                    <div class="SevenEnlaces" onclick="window.location.href='Menu.aspx#M5';" style="cursor: pointer;">
                        <table>
                            <tr>
                                <td>
                                    <img src="img/application-icon-large.png" />
                                </td>
                                <td>
                                    <%=L.LBL("LblGENMenuTactil") %>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>&nbsp;</td>
                <td>
                    <a href="../Inicio.aspx"><%=L.LBL("LblGENInicio") %></a>
                    <img src="../img/arrow.png" alt="" />
                    <a href="#"><%=L.TIT("EstadisticasExplotacion") %> [4.9]</a>
                </td>
                <td style="width: 100%;"></td>
                <td>
                    <%=L.LBL("LblGENLanguage") %>
                </td>
                <td>
                    <!-- #include file="LanguageCombo.html" -->
                </td>
            </tr>
        </table>

    </div>

    <div id="SevenPrincipal">

        <div id="SevenMedio">

            <div id="SevenInterno" style="width: 600px; height: 400px;">

                <div id="dlgFiltro" title="<%=L.LBL("LblGENSearch") %>" style="text-align: center; padding-top: 25px">
                    <table style="text-align: left;">
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_id_agen" name="cbFil_id_agen" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblGENCompany") %>:
                            </td>
                            <td>
                                <%=cbEmpresa %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_id_merc" name="cbFil_id_merc" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblFDKSMercado") %>:
                            </td>
                            <td>
                                <%=cbMercado %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_id_cont" name="cbFil_id_cont" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblGENTarifa") %>:
                            </td>
                            <td>
                                <select name="cbContrato" id="cbContrato" onchange="$('input[name=cbFil_id_cont]').prop('checked', true);" style="width: 150px;">
                                    <option value="0" selected="selected" />
                                    <%
                                        foreach (System.Data.DataRow dr in Contratos.Rows)
                                        {
                                            Response.Write(Utils.GetSelectOption(dr["id_cont"].ToString(), dr["contrato"].ToString().Trim() + " - " + dr["desc_cont"].ToString().Trim(), false));
                                        }
                                    %>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_id_thab" name="cbFil_id_thab" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblGENRoomType") %>:
                            </td>
                            <td>
                                <%=cbTipoHabi %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_id_uhab" name="cbFil_id_uhab" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblGENUsoHab") %>:
                            </td>
                            <td>
                                <%=cbUsoHabi %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cbFil_tipo" name="cbFil_tipo" value="1" />
                            </td>
                            <td>
                                <%=L.LBL("LblGENVer") %>:
                            </td>
                            <td>
                                <input type="radio" name="rbTipo" value="1" onclick="$('input[name=cbFil_tipo]').prop('checked', true);" /><%=L.LBL("LblFDKDirectos") %>
                                <input type="radio" name="rbTipo" value="0" onclick="$('input[name=cbFil_tipo]').prop('checked', true);" /><%=L.LBL("LblGENEmpresas") %>
                            </td>
                        </tr>
                    </table>
                </div>

                <div id="HiddenHive">
                    <%=hidMonedas %>
                </div>

                <br />

                <table>
                    <tr>
                        <td>
                            <span class="SevenTitulo"><%=L.TIT("EstadisticasExplotacion") %> [4.9]</span>
                        </td>
                        <td>&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <div class="SevenEnlaces">
                                <table>
                                    <tr>
                                        <td>
                                            <a href="#" onclick="$('#dlgFiltro').dialog('open');" id="AF">
                                                <img src="../img/funnel.png" />
                                                <%=L.LBL("LblGENFiltrar") %>
                                            </a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                        <td>
                            <div class="SevenEnlaces">
                                <table>
                                    <tr>
                                        <td>
                                            <a href="#" onclick="window.open('http://mysevenmanuales.jimdo.com/front-desk/4-9-estad%C3%ADsticas-de-explotacion/', '_blank');" id="A1">
                                                <img src="../img/question.png" />
                                                <%=L.LBL("LblGENHelp") %>
                                            </a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>

                <br />

                <fieldset>

                    <table width="60%">
                        <tr>
                            <td><%=L.LBL("LblGENType") %>: </td>
                            <td>
                                <%=cbExplotacionOrden %>
                            </td>
                            <td colspan="2">
                                <input type="checkbox" id="cbAgrup" value="1" /><%=L.LBL("LblFDKAgrupMeses") %>
                            </td>
                        </tr>
                        <tr>
                            <td><%=L.LBL("LblGENStart") %>: </td>
                            <td>
                                <input type="text" id="txtInicio" name="txtInicio" class="eligeFecha" value="<% Response.Write(String.Format("{0:dd/MM/yyyy}", FrontInicio)); %>" />
                            </td>
                            <td><%=L.LBL("LblGENEnd") %>: </td>
                            <td>
                                <input type="text" id="txtFin" name="txtFin" class="eligeFecha" value="<% Response.Write(String.Format("{0:dd/MM/yyyy}", FrontFin)); %>" />
                            </td>
                        </tr>
                        <tr>
                            <td><%=L.LBL("LblGENMoney") %>: </td>
                            <td>
                                <%=cbMoneda %>
                            </td>
                            <td><%=L.LBL("LblGENRate") %>: </td>
                            <td>
                                <input type="text" id="txtTasa" name="txtTasa" <% if (FrontTasa == 1)
                                                                                  { %> readonly="readonly" <% } %> value="<% Response.Write(FrontTasa); %>" />
                            </td>
                        </tr>
                        <tr>
                            <td><%=L.LBL("LblGENOrderBy") %>:</td>
                            <td colspan="3">
                                <input type="radio" name="rbOrden" value="0" <% if(FrontESEXOrden == 0){ %> checked="checked" <% } %> /><%=L.LBL("LblGENName") %>
                                <input type="radio" name="rbOrden" value="1" <% if(FrontESEXOrden == 1){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKIngresoHosp") %>
                                <input type="radio" name="rbOrden" value="2" <% if(FrontESEXOrden == 2){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKIngresoReg") %>
                                <input type="radio" name="rbOrden" value="3" <% if(FrontESEXOrden == 3){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKIngresoOtros") %><br />
                                <input type="radio" name="rbOrden" value="4" <% if(FrontESEXOrden == 4){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKEntradasHab") %>
                                <input type="radio" name="rbOrden" value="5" <% if(FrontESEXOrden == 5){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKEstanciasHab") %><br />
                                <input type="radio" name="rbOrden" value="6" <% if(FrontESEXOrden == 6){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKEntradasClie") %>
                                <input type="radio" name="rbOrden" value="7" <% if(FrontESEXOrden == 7){ %> checked="checked" <% } %> /><%=L.LBL("LblFDKEstanciasClie") %>
                            </td>
                            <td>
                                <table style="width: 100%;">
                                    <tr>
                                        <td style="width: 100%;"></td>
                                        <td>
                                            <button type="button" onclick="Ver();">
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <img src="img/magnifier.png" alt="Ver" /></td>
                                                        <td><%=L.LBL("LblGENVer") %></td>
                                                    </tr>
                                                </table>
                                            </button>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>

                </fieldset>

                <br />

                <table style="width: 100%;" class="SevenMsgExito">
                    <tr>
                        <td style="width: 100%;" style="font-size: 10pt; text-align: justify; white-space: normal;">
                            <%=L.REP("ESEXINFO1") %><br /><br />
                            <%=L.REP("ESEXINFO2") %><br /><br />
                            <%=L.REP("ESEXINFO3") %><br /><br />
                            <%=L.REP("ESEXINFO4") %><br />
                        </td>
                    </tr>
                </table>
            </div>

        </div>

    </div>

</asp:Content>
