Commit 1e835c91 by Sujitra

เพิ่มการแสดง booking ที่มี สถานะ deposit

parent 1c75888e
...@@ -104,6 +104,11 @@ Public Class MainBooking ...@@ -104,6 +104,11 @@ Public Class MainBooking
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_Cancel_InPeriod]", par) Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_Cancel_InPeriod]", par)
End Function End Function
Public Function _HistoryLog_BookingDetail_BookingStatusDeposit(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_BookingStatusDeposit]", par)
End Function
End Class End Class
...@@ -344,7 +344,78 @@ ...@@ -344,7 +344,78 @@
<AlternatingRowStyle CssClass="AltRowStyle" /> <AlternatingRowStyle CssClass="AltRowStyle" />
</asp:GridView> </asp:GridView>
<br /> <br />
<b><asp:Label ID="Label6" runat="server" Text="Booking ที่มีสถานะ Deposit ใน period นี้ "></asp:Label></b> :
<asp:Label ID="lblResult_BookingStatusDeposit" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDBookingStatusDeposit" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="No." HeaderStyle-Width="20px">
<ItemTemplate>
<asp:Label ID="lblNo" runat="server"></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PNRCode" SortExpression="PNRCode">
<ItemTemplate>
<asp:Label ID="PNRCode" runat="server" Text='<%#Eval("PNRCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="StatusCode" SortExpression="StatusCode">
<ItemTemplate>
<asp:Label ID="StatusCode" runat="server" Text='<%#Eval("StatusCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Reservation" SortExpression="Reservation">
<ItemTemplate>
<asp:Label ID="Reservation" runat="server" Text='<%#Eval("Reservation")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Pax" SortExpression="Pax">
<ItemTemplate>
<asp:Label ID="Pax" runat="server" Text='<%#Eval("Pax")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="UpdateBy" SortExpression="UpdateBy">
<ItemTemplate>
<asp:Label ID="UpdateBy" runat="server" Text='<%#Eval("UpdateBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="UpdateDate" SortExpression="UpdateDate">
<ItemTemplate>
<asp:Label ID="UpdateDate" runat="server" Text='<%#Eval("UpdateDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="RowStyle" />
<EmptyDataRowStyle CssClass="EmptyRowStyle" />
<PagerStyle CssClass="PagerStyle" />
<SelectedRowStyle CssClass="SelectedRowStyle" />
<HeaderStyle CssClass="HeaderStyle" />
<EditRowStyle CssClass="EditRowStyle" />
<AlternatingRowStyle CssClass="AltRowStyle" />
</asp:GridView>
<br />
<b><asp:Label ID="Label5" runat="server" Text="Booking ที่ถูกยกเลิกใน Period นี้"></asp:Label></b> : <b><asp:Label ID="Label5" runat="server" Text="Booking ที่ถูกยกเลิกใน Period นี้"></asp:Label></b> :
<asp:Label ID="lblResult_BookingInPeriod" runat="server" Text=" 0 items."></asp:Label> <asp:Label ID="lblResult_BookingInPeriod" runat="server" Text=" 0 items."></asp:Label>
<br /> <br />
......
...@@ -27,14 +27,10 @@ Partial Class SystemAdmin_Booking ...@@ -27,14 +27,10 @@ Partial Class SystemAdmin_Booking
If strPNRCode <> "" Then LoadHistoryLog_ActivityLog(strPNRCode) 'GDActivityLog If strPNRCode <> "" Then LoadHistoryLog_ActivityLog(strPNRCode) 'GDActivityLog
If strPNRCode <> "" Then LoadHistoryLog_StatusLog(strPNRCode) 'GDBookingStatusLog If strPNRCode <> "" Then LoadHistoryLog_StatusLog(strPNRCode) 'GDBookingStatusLog
If strPNRCode <> "" Then LoadHistoryLog_BookingInPeriod(strPNRCode) 'GDBookingStatusLog If strPNRCode <> "" Then LoadHistoryLog_BookingInPeriod(strPNRCode) 'GDBookingStatusLog
If strPNRCode <> "" Then LoadHistoryLog_BookingStatusDeposit(strPNRCode)
End If End If
End Sub End Sub
Sub LoadHistoryLog_BookingInPeriod(ByVal strPNRCode As String) 'GDBookingStatusLog Sub LoadHistoryLog_BookingInPeriod(ByVal strPNRCode As String) 'GDBookingStatusLog
Try Try
Dim DtBookingDetail As New DataTable Dim DtBookingDetail As New DataTable
...@@ -111,6 +107,26 @@ Partial Class SystemAdmin_Booking ...@@ -111,6 +107,26 @@ Partial Class SystemAdmin_Booking
writeErrorLog("LoadHistoryLog", ex.Message.ToString()) writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try End Try
End Sub End Sub
Sub LoadHistoryLog_BookingStatusDeposit(ByVal strPNRCode As String) 'GDBookingStatusLog
Try
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_BookingStatusDeposit(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
GDBookingStatusDeposit.DataSource = DtBookingDetail
GDBookingStatusDeposit.DataBind()
lblResult_BookingStatusDeposit.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDBookingStatusDeposit.DataSource = Nothing
GDBookingStatusDeposit.DataBind()
lblResult_BookingInPeriod.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_BookingStatusDeposit", ex.Message.ToString())
End Try
End Sub
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String) Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError lblError.Text = "[" & strFunctionName & "] Err=" & strError
...@@ -174,6 +190,7 @@ Partial Class SystemAdmin_Booking ...@@ -174,6 +190,7 @@ Partial Class SystemAdmin_Booking
End Function End Function
#End Region #End Region
#Region "get Booking Detail" #Region "get Booking Detail"
Function getProductDetail(ByVal strPNRCode As String) As DataTable Function getProductDetail(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable Dim Dt As New DataTable
...@@ -251,6 +268,24 @@ Partial Class SystemAdmin_Booking ...@@ -251,6 +268,24 @@ Partial Class SystemAdmin_Booking
Return Dt Return Dt
End Function End Function
Function getBookingDetail_BookingStatusDeposit(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_BookingStatusDeposit(strPNRCode)
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsMainBooking = Nothing
End Try
Return Dt
End Function
#End Region #End Region
...@@ -269,10 +304,14 @@ Partial Class SystemAdmin_Booking ...@@ -269,10 +304,14 @@ Partial Class SystemAdmin_Booking
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1 e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If End If
End Sub End Sub
Protected Sub GDBookingInPeriod_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingInPeriod.RowDataBound Protected Sub GDBookingInPeriod_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingInPeriod.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1 e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If End If
End Sub End Sub
Protected Sub GDBookingStatusDeposit_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingStatusDeposit.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
End Class End Class
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment