could anyone help me how to use a date function for reservation on ASP.NET....
thanx
Jump to Postwhat are you trying to acheive? Are you trying to store dates into a table? Search on dates?
Do you have any code that you need help on?
Jump to Postwhat do you mean block the date between?
what are you trying to acheive? Are you trying to store dates into a table? Search on dates?
Do you have any code that you need help on?
i'm just making a small project, and all i have is only the check in date and the check out date. i dont know how to block the date between it.
here are the syntax..
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:tesDB3 %>" DeleteCommand="DELETE FROM [tesDB3] WHERE [IdTamu] = @original_IdTamu AND [Nama] = @original_Nama AND [Tgl_masuk] = @original_Tgl_masuk AND [Tgl_keluar] = @original_Tgl_keluar"
InsertCommand="INSERT INTO [tesDB3] ([Nama], [Tgl_masuk], [Tgl_keluar]) VALUES (@Nama, @Tgl_masuk, @Tgl_keluar)"
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [tesDB3]"
UpdateCommand="UPDATE [tesDB3] SET [Nama] = @Nama, [Tgl_masuk] = @Tgl_masuk, [Tgl_keluar] = @Tgl_keluar WHERE [IdTamu] = @original_IdTamu AND [Nama] = @original_Nama AND [Tgl_masuk] = @original_Tgl_masuk AND [Tgl_keluar] = @original_Tgl_keluar">
<DeleteParameters>
<asp:Parameter Name="original_IdTamu" Type="Int32" />
<asp:Parameter Name="original_Nama" Type="String" />
<asp:Parameter DbType="DateTime" Name="original_Tgl_masuk" />
<asp:Parameter DbType="DateTime" Name="original_Tgl_keluar" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Nama" Type="String" />
<asp:Parameter DbType="DateTime" Name="Tgl_masuk" />
<asp:Parameter DbType="DateTime" Name="Tgl_keluar" />
<asp:Parameter Name="original_IdTamu" Type="Int32" />
<asp:Parameter Name="original_Nama" Type="String" />
<asp:Parameter DbType="DateTime" Name="original_Tgl_masuk" />
<asp:Parameter DbType="DateTime" Name="original_Tgl_keluar" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Nama" Type="String" />
<asp:Parameter DbType="DateTime" Name="Tgl_masuk" />
<asp:Parameter DbType="DateTime" Name="Tgl_keluar" />
</InsertParameters>
</asp:SqlDataSource>
could you add some code to block the date between the booked date....?
sorry if its to much trouble >.<
what do you mean block the date between?
block the date between the reservation date so that no one else can book between that date.
@Ezzaral
sorry.
have a look here:
http://odetocode.com/Articles/223.aspx
not exactly what your trying to do but could give you some ideas on how to display a calendar control which will only display available dates.
@ninjaimp
thank you so much....
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.