1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
| <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/Client.master"
CodeBehind="Reservation.aspx.vb" Inherits="Guadeloup.Reservation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript" src="/Scripts/InitDatePicker.js"></script>
<script type="text/javascript">
$(function () {
var SelectedDates = <%= ser.Serialize(dtvdte)%>;
$("#from").datepicker({
defaultDate: "+1w",
numberOfMonths: 3,
dateFormat: "DD, d MM, yy",
minDate: 0,
onClose: function (selectedDate) {
$("#to").datepicker("option", "minDate", selectedDate);
},
beforeShowDay: function (date) {
return Reservation(date,SelectedDates);
}
});
$("#to").datepicker({
defaultDate: "+1w",
numberOfMonths: 2,
dateFormat: "DD, d MM, yy",
minDate: 0,
onClose: function (selectedDate) {
$("#from").datepicker("option", "maxDate", selectedDate);
},
beforeShowDay: function (date) {
return Reservation(date,SelectedDates);
}
});
});
function Reservation(date,SelectedDates){
var trouve = false;
var row = 0;
while (row< SelectedDates.length && !trouve) {
var dte = SelectedDates[row].split("/");
var d=Date.parse(date);
trouve=(d >= Date.parse(dte[0]) && d <= Date.parse(dte[1]));
row++;
}
if (trouve) {
return [false, "Highlighted", "Réservé"]; // Si met false le CSS de remplacement n'est pas appliquer
}
else {
return [true, '', ''];
}
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
<div style="float: left;">
<center>
<strong class="TxtAppart">Tarifs</strong></center>
<br />
<center>
<table>
<tr class="Ligne">
<td align="left">
Haute saison
</td>
<td>
du 01/01/2013
</td>
<td>
au 30/04/2013
</td>
<td>
1200
</td>
</tr>
<tr class="LigneAlt">
<td align="left">
Moyenne saison
</td>
<td>
du 01/05/2013
</td>
<td>
au 30/09/2013
</td>
<td>
1000
</td>
</tr>
<tr class="Ligne">
<td align="left">
Basse saison
</td>
<td>
du 01/10/2013
</td>
<td>
au 31/12/2013
</td>
<td>
900
</td>
</tr>
</table>
</center>
<asp:Label ID="lblTarif" runat="server" CssClass="TxtAppart"></asp:Label>
</div>
</div>
<div style="float: right; width: 450px;">
<center>
<strong class="TxtAppart">Disponibilités</strong><br />
</center>
<br />
<div>
<div style="float: left;">
<center>
<table>
<tr>
<td>
<input type="text" id="from" width="60" />
</td>
<td>
<input type="text" id="to" width="60" />
</td>
</tr>
</table>
</center>
</div>
</div>
<div class="clear">
</div>
<br />
<br />
</div>
</asp:Content> |
Partager