Commit a19705c5 by Sujitra

Create History log

parents
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AnalyzeCall.aspx.vb" Inherits="AnalyzeCall" %>
<!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">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Imports MyGeneration.dOOdads
Imports System.Data
Imports System.Configuration
'----------------------------------------------------------
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Net
Imports Newtonsoft.Json
Imports System.Web.Script.Serialization
Imports System.IO
Partial Class AnalyzeCall
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim strReturn As String = ""
Dim intLogID As Integer = 0
Dim blnInTimeOffice As Boolean = False
Dim strCallerID As String = ""
Dim strUniqueID As String = ""
Dim strStepnumber As String = ""
Dim strCustomerCall As String = "" ' เบอร์ของ Mushroom ที่เรียกมา"
'CallerID=0850968413&UniqueID=150&Stepnumber=1 ข้อมูลที่ใช้ในการทดสอบ
If Not (Page.IsPostBack) Then
'--- เป็นข้อมูลที่ทาง Plextel ส่งมาให้ ---
If Not IsNothing(Request.QueryString("CallerID")) Then strCallerID = Request.QueryString("CallerID")
If Not IsNothing(Request.QueryString("UniqueID")) Then strUniqueID = Request.QueryString("UniqueID")
If Not IsNothing(Request.QueryString("Stepnumber")) Then strStepnumber = Request.QueryString("Stepnumber")
If Not IsNothing(Request.QueryString("CustomerCall")) Then strCustomerCall = Request.QueryString("CustomerCall") ' เบอร์ของ Mushroom ที่เรียกมา
'--- ตรวจสอบเวลา นอกเวลาทำการ จะต้อง Return ค่าเป็น Default ถึงแม้ว่าจะเป็นลูกค้าใหม่ หรือ ลูกค้าเก่าก็ตาม
If CheckTimeInOffice() Then
blnInTimeOffice = True
'--- เป็นการ Return ค่า ----
If Not IsNothing(strCallerID) Then
intLogID = SaveLog(strCallerID, strUniqueID, strStepnumber, strCustomerCall)
strReturn = AnalyzeCall(strCallerID, strUniqueID, strStepnumber, strCustomerCall)
End If
End If
If strReturn = "" Then strReturn = "OK,,,Default,D," & strCustomerCall
'If strCallerID = "1010" Then strReturn = Replace(strReturn, "Default", "newyear") ' กรณีจะเปลี่ยนเสียงได้จะต้องเป็นเฉพาะ วิเคราะห์ด้วย Sale เท่านั้น
updateReturnValue(intLogID, strReturn, blnInTimeOffice)
ReturnToPlexTel(strReturn)
End If
End Sub
Function CheckTimeInOffice() As Boolean
Dim bln As Boolean = True
Try
Dim blnInTime As Boolean = True
Dim DTimeStart, DTimeEnd As DateTime
Dim CurrentDTime As New DateTime()
Dim intDayInWeek As Integer = 0
CurrentDTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")
DTimeStart = DateTime.Now.ToString("yyyy-MM-dd") & " 09:00:00"
DTimeEnd = DateTime.Now.ToString("yyyy-MM-dd") & " 23:00:00"
If DateDiff(DateInterval.Minute, DTimeStart, CurrentDTime) < 1 Then
' ถ้าน้อยกว่า แสดงว่า โทรมาก่อนเวลาทำงาน
blnInTime = False
End If
If blnInTime Then
If DateDiff(DateInterval.Minute, DTimeEnd, CurrentDTime) > 1 Then
' ถ้ามากกว่า แสดงว่า โทรมาหลังเวลาทำงาน
blnInTime = False
End If
End If
'------------------------------------------------------------------------
If blnInTime Then
If DateTime.Now.DayOfWeek <> DayOfWeek.Sunday Then
bln = True
End If
End If
Catch ex As Exception
bln = False
End Try
Return bln
End Function
Sub updateReturnValue(ByVal intLogID As Integer, ByVal strReturn As String, ByVal blnInTimeOffice As Boolean)
Dim ClsC As New CallCenterLog
Try
With ClsC
.Where.WhereClauseReset()
.Where.LogID.Value = intLogID
.Query.Load()
If .DefaultView.Count > 0 Then
.ReturnValue = strReturn
.IsInTimeOffice = blnInTimeOffice
.Save()
End If
End With
Catch ex As Exception
Finally
ClsC = Nothing
End Try
End Sub
Function SaveLog(ByVal strCallerID As String, ByVal strUniqueID As String, ByVal strStepnumber As String, ByVal strCustomerCall As String) As Integer
Dim intLogID As Integer
Dim ClsC As New CallCenterLog
Try
With ClsC
.AddNew()
.CallerID = strCallerID
.UniqueID = strUniqueID
.Stepnumber = strStepnumber
.CallDateTime = DateTime.Now
.CustomerCall = strCustomerCall
.Save()
intLogID = CInt(.LogID)
End With
Catch ex As Exception
Finally
ClsC = Nothing
End Try
Return intLogID
End Function
Function AnalyzeCall(ByVal strCallerID As String, ByVal strUniqueID As String, ByVal strStepnumber As String, ByVal strCustomerCall As String) As String
Dim strReturn As String = ""
Dim intPassengerID As Integer = 0
Dim intCustomerCompamyID As Integer = 0
Dim intSaleID As Integer
Dim strBookingRefNo As String = ""
Dim strTypeProduct As String = ""
Dim strPhoneNumber As String = ""
Dim intWaitingTimeSecond As Integer = GetSetWaitingTime()
Dim blnProcessQueue As Boolean = False
Dim intStep As Integer = 0
Dim strQueueName As String = ""
Dim strMusicName As String = ""
Try
intStep = CInt(strStepnumber)
Catch ex As Exception
intStep = 10 ' เพื่อโยนให้ Queue ไปเลย
End Try
Try
strReturn = "OK,,,Default,D," & strCustomerCall '- -ของเดิม "OK,,,Default,D"
If CheckExistCallerIDInDatabase(strCallerID, intPassengerID, intCustomerCompamyID) Then ' กรณีที่ตรวจสอบแล้วไม่มีใน Database
'-- ได้ข้อมูล ทั้ง Passenger & Cusomter ออกมาแล้ว โดยหาเฉพาะที่ ContactID กับ CustomerCompanyID เท่านั้น
If intPassengerID <> 0 Or intCustomerCompamyID <> 0 Then
' กรณีที่มีเบอร์โทร แต่หา ID ไม่ได้
GetLastBookingByContactAndCompany(intPassengerID, intCustomerCompamyID, strBookingRefNo, intSaleID, strTypeProduct)
'-- 18/07/2018
'If intStep = 1 Then
'-----
If intSaleID > 0 Then
'-- ดำเนินการต่อคือ Sale นี้คือ PhoneNumber อะไร
strPhoneNumber = GetPhoneNumberBySale(intSaleID)
'--- สำหรับ เคสของ 3CX ไม่ต้องเช็ค และ ส่ง Callcenter (DID)
strReturn = "OK,SIP/" & strPhoneNumber & "," & intWaitingTimeSecond & ",Default,N," & strCustomerCall
'-- 18/07/2018 ตรวจสอบฝั่ง PlexTex เรื่องของ PhoneNumber -------------------------
'If CheckPlextel_PhoneNumber(strPhoneNumber) Or strPhoneNumber = "2412" Then '-- fix Or strPhoneNumber = "2412" ( for test 3CX )
' 'OK,ExtensionID (SIP/XXXX),10,Default,N
' strReturn = "OK,SIP/" & strPhoneNumber & "," & intWaitingTimeSecond & ",Default,N"
'Else
' '--ถ้าไม่มี Sale ให้ Check TypeProduct
' blnProcessQueue = True
'End If
'--------------------------------------------------------------------
Else
' strReturn = "OK,,,Default,D"
End If
'-- 18/07/2018
'Else
' blnProcessQueue = True
'End If
'-----
Else ' กรณีที่หา ใครไม่ได้เลย
' strReturn = "OK,,,Default,D"
End If
Else
' strReturn = "OK,,,Default,D"
End If
'------------------------------------------------------------------
'-- 18/07/2018 เมื่อใช้งาน 3CX ก็ไม่ต้องจัดการ Queue แล้ว -------------------------
'If blnProcessQueue Then ' กรณีที่ Process Queue ต่อ ซึ่งสิ่งที่ได้จากส่วนนี้คือ strTypeProduct
' strQueueName = GetQueueName(strTypeProduct)
' If CheckPlextel_QueueName(strQueueName, strMusicName) Then
' 'strReturn = "OK,QUEUE/" & strQueueName & "," & intWaitingTimeSecond & ",Default,N"
' strReturn = "OK,QUEUE/" & strQueueName & ",648000," & strMusicName & ",N" ' กรณีที่โยนสายเข้า Queue ซึ่งจะต้องกำหนด ให้ Queue นั้นๆ ใช้เวลานานๆ ตาม Queue ==> 648000 คือ 3 ชั่วโมง
' Else
' strReturn = "OK,,,Default,D"
' End If
'End If
'--------------------------------------------------------------------------------
'----- Fix Code --------------
'If strStepnumber = "2" Then 'เนื่องจากข้างนอกไม่สามารถเรียก Queu จากตัวนี้ได้ ( for test 3CX )
' strReturn = "OK,Queue_GIT,648000,Default,N"
'End If
'------------------------
Catch ex As Exception
strReturn = ""
End Try
Return strReturn
End Function
Function GetQueueName(ByVal strTypeProduct As String) As String
Dim strQueueName As String = ""
Dim ClsQ As New CallCenter.TypeProduct_QueueName
Try
With ClsQ
.Where.WhereClauseReset()
.Where.TypeProduct.Value = strTypeProduct
.Where.IsActive.Value = True
.Query.Load()
If .DefaultView.Count > 0 Then
strQueueName = .DefaultView(0)("QueueName").ToString()
End If
End With
Catch ex As Exception
strQueueName = ""
Finally
ClsQ = Nothing
End Try
Return strQueueName
End Function
Function GetSetWaitingTime() As Integer ' เป็นการ get ข้อมูลรอสาย
Dim intWaitingTime As Integer = 10
Try
intWaitingTime = System.Configuration.ConfigurationSettings.AppSettings("WaitingTimeSecond")
Catch ex As Exception
intWaitingTime = 10
End Try
Return intWaitingTime
End Function
Function GetPhoneNumberBySale(ByVal intSaleID As Integer) As String
Dim strPhoneNumber As String = ""
Dim ClsSale As New CallCenter.Sale_Phonenumber
Try
With ClsSale
.Where.WhereClauseReset()
.Where.SaleID.Value = intSaleID
.Where.IsActive.Value = True
.Query.Load()
If .DefaultView.Count > 0 Then
'แสดงว่ามีข้อมูล
strPhoneNumber = .DefaultView(0)("PhoneNumber").ToString()
End If
End With
Catch ex As Exception
strPhoneNumber = ""
Finally
ClsSale = Nothing
End Try
Return strPhoneNumber
End Function
Function CheckExistCallerIDInDatabase(ByVal strCallerID As String, ByRef intPassengerID As Integer _
, ByRef intCustomerCompamyID As Integer) As Boolean
Dim bln As Boolean = False
Dim ClsPassenger As New MushroomTravel.Passenger
ClsPassenger.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("MushroomTravel")
Dim Dtable As New DataTable
Try
intPassengerID = 0
intCustomerCompamyID = 0
With ClsPassenger
'-- ตรวจสอบ Passenger & CustomerCompany
.Where.WhereClauseReset()
._Proc_CheckCallerIDInBackOffice(strCallerID) ' เป็นการตรวจสอบข้อมูลทั้ง Passenger และ Customer Company
If .DefaultView.Count > 0 Then
Dtable = .DefaultView.Table
For i As Integer = 0 To Dtable.Rows.Count - 1
Select Case Dtable.Rows(i)("TypeCaller").ToString()
Case "Passenger"
If Not IsDBNull(Dtable.Rows(i)("ID")) Then intPassengerID = CInt(Dtable.Rows(i)("ID").ToString())
Case "CustomerCompany"
If Not IsDBNull(Dtable.Rows(i)("ID")) Then intCustomerCompamyID = CInt(Dtable.Rows(i)("ID").ToString())
End Select
Next
bln = True
End If
End With
Catch ex As Exception
bln = False
Finally
ClsPassenger = Nothing
End Try
Return bln
End Function
Sub GetLastBookingByContactAndCompany(ByVal intPassengerID As Integer, ByVal intCustomerCompamyID As Integer _
, ByRef strBookingRefNo As String, ByRef intSaleID As Integer, ByRef strTypeProduct As String)
Dim ClsP As New MushroomTravel.Passenger
ClsP.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("MushroomTravel")
Dim Dtable As New DataTable
Try
'intBookingID, intSaleID, strTypeProduct
With ClsP
.Where.WhereClauseReset()
._Proc_GetLastBookingInBackOffice(intPassengerID, intCustomerCompamyID)
If .DefaultView.Count > 0 Then
Dtable = .DefaultView.ToTable
strBookingRefNo = Dtable.Rows(0)("BookingCode").ToString()
intSaleID = CInt(Dtable.Rows(0)("SaleID").ToString())
strTypeProduct = Dtable.Rows(0)("TypeProduct").ToString()
End If
End With
Catch ex As Exception
intSaleID = 0
Finally
ClsP = Nothing
End Try
End Sub
Sub ReturnToPlexTel(ByVal strReturn As String)
Response.ContentType = "text/plain"
Response.Write(strReturn)
Response.End()
End Sub
#Region "Function ที่เกี่ยวข้องกับ Plextel"
Function getUserPasswordInSystem(ByVal strURLOLD As String) As String
Dim strURLNew As String = strURLOLD
Dim strUserName As String = ""
Dim strPassword As String = ""
Try
'&username=PlexMItest&plexpass=PlexMItest
strUserName = System.Configuration.ConfigurationSettings.AppSettings("UserName")
strPassword = System.Configuration.ConfigurationSettings.AppSettings("Password")
strURLNew = strURLNew & "&username=" & strUserName & "&plexpass=" & strPassword
Catch ex As Exception
strURLNew = strURLOLD
End Try
Return strURLNew
End Function
Function getDataFromPlexTel(ByVal strURLGet As String) As DataTable
Dim DTable As New DataTable
Try
Dim objSURL As New StringBuilder
Dim objURL As Uri
Dim strURL As String
strURL = getUserPasswordInSystem(strURLGet)
objSURL.Append(strURL)
objURL = New Uri(objSURL.ToString())
Dim request As HttpWebRequest = HttpWebRequest.Create(objURL)
Dim response As HttpWebResponse = request.GetResponse
Dim reader As New StreamReader(response.GetResponseStream())
If Not IsNothing(reader) Then
Dim strResponse = reader.ReadToEnd
DTable = JsonConvert.DeserializeObject(Of DataTable)(strResponse)
'DTable = DirectCast(JsonConvert.DeserializeObject(reader.ReadToEnd, (GetType(DataTable))), DataTable)
'If DTable.Rows.Count > 0 Then
' GridView1.DataSource = DTable
' GridView1.DataBind()
'End If
End If
reader.Close()
response.Close()
Catch ex As Exception
DTable = New DataTable
End Try
Return DTable
End Function
Function CheckPlextel_PhoneNumber(ByVal strPhoneNumber As String) As Boolean
Dim bln As Boolean
Dim Dt As New DataTable
Try
'function showuserall
'URLPlextel_ShowUserAll
Dim URLPlextel_ShowUserAll As String = System.Configuration.ConfigurationSettings.AppSettings("URLPlextel_ShowUserAll")
Dt = getDataFromPlexTel(URLPlextel_ShowUserAll)
If Dt.Rows.Count > 0 Then
Dt.DefaultView.RowFilter = ""
Dt.DefaultView.RowFilter = " phonenumber='" & strPhoneNumber & "' and status='OK' " ' มีอยู่ในระบบจริงๆและสถานะ On
If Dt.DefaultView.Count > 0 Then
' แสดงว่าเจอบุคคลนั้นๆ
bln = True
End If
'bln = True
End If
Catch ex As Exception
bln = False
End Try
Return bln
End Function
Function CheckPlextel_QueueName(ByVal strQueueName As String, ByRef strMusicName As String) As Boolean
Dim bln As Boolean
Dim Dt As New DataTable
Try
Dim URLPlextel_Showqueue As String = System.Configuration.ConfigurationSettings.AppSettings("URLPlextel_Showqueue")
Dt = getDataFromPlexTel(URLPlextel_Showqueue)
If Dt.Rows.Count > 0 Then
Dt.DefaultView.RowFilter = ""
Dt.DefaultView.RowFilter = " queueName='" & strQueueName & "' " ' มีอยู่ในระบบจริงๆและสถานะ On
If Dt.DefaultView.Count > 0 Then
strMusicName = Dt.DefaultView(0)("musiconhold")
bln = True
End If
'bln = True
End If
Catch ex As Exception
bln = False
End Try
Return bln
End Function
#End Region
End Class
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
Public MustInherit Class _CallCenterLog
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "CallCenterLog"
Me.MappingName = "CallCenterLog"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_CallCenterLogLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal LogID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_CallCenterLog.Parameters.LogID, LogID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_CallCenterLogLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property LogID As SqlParameter
Get
Return New SqlParameter("@LogID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property CallerID As SqlParameter
Get
Return New SqlParameter("@CallerID", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property UniqueID As SqlParameter
Get
Return New SqlParameter("@UniqueID", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Stepnumber As SqlParameter
Get
Return New SqlParameter("@Stepnumber", SqlDbType.VarChar, 10)
End Get
End Property
Public Shared ReadOnly Property CallDateTime As SqlParameter
Get
Return New SqlParameter("@CallDateTime", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property ReturnValue As SqlParameter
Get
Return New SqlParameter("@ReturnValue", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property IsInTimeOffice As SqlParameter
Get
Return New SqlParameter("@IsInTimeOffice", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property CustomerCall As SqlParameter
Get
Return New SqlParameter("@CustomerCall", SqlDbType.VarChar, 50)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const LogID As String = "LogID"
Public Const CallerID As String = "CallerID"
Public Const UniqueID As String = "UniqueID"
Public Const Stepnumber As String = "Stepnumber"
Public Const CallDateTime As String = "CallDateTime"
Public Const ReturnValue As String = "ReturnValue"
Public Const IsInTimeOffice As String = "IsInTimeOffice"
Public Const CustomerCall As String = "CustomerCall"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(LogID) = _CallCenterLog.PropertyNames.LogID
ht(CallerID) = _CallCenterLog.PropertyNames.CallerID
ht(UniqueID) = _CallCenterLog.PropertyNames.UniqueID
ht(Stepnumber) = _CallCenterLog.PropertyNames.Stepnumber
ht(CallDateTime) = _CallCenterLog.PropertyNames.CallDateTime
ht(ReturnValue) = _CallCenterLog.PropertyNames.ReturnValue
ht(IsInTimeOffice) = _CallCenterLog.PropertyNames.IsInTimeOffice
ht(CustomerCall) = _CallCenterLog.PropertyNames.CustomerCall
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const LogID As String = "LogID"
Public Const CallerID As String = "CallerID"
Public Const UniqueID As String = "UniqueID"
Public Const Stepnumber As String = "Stepnumber"
Public Const CallDateTime As String = "CallDateTime"
Public Const ReturnValue As String = "ReturnValue"
Public Const IsInTimeOffice As String = "IsInTimeOffice"
Public Const CustomerCall As String = "CustomerCall"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(LogID) = _CallCenterLog.ColumnNames.LogID
ht(CallerID) = _CallCenterLog.ColumnNames.CallerID
ht(UniqueID) = _CallCenterLog.ColumnNames.UniqueID
ht(Stepnumber) = _CallCenterLog.ColumnNames.Stepnumber
ht(CallDateTime) = _CallCenterLog.ColumnNames.CallDateTime
ht(ReturnValue) = _CallCenterLog.ColumnNames.ReturnValue
ht(IsInTimeOffice) = _CallCenterLog.ColumnNames.IsInTimeOffice
ht(CustomerCall) = _CallCenterLog.ColumnNames.CustomerCall
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const LogID As String = "s_LogID"
Public Const CallerID As String = "s_CallerID"
Public Const UniqueID As String = "s_UniqueID"
Public Const Stepnumber As String = "s_Stepnumber"
Public Const CallDateTime As String = "s_CallDateTime"
Public Const ReturnValue As String = "s_ReturnValue"
Public Const IsInTimeOffice As String = "s_IsInTimeOffice"
Public Const CustomerCall As String = "s_CustomerCall"
End Class
#End Region
#Region "Properties"
Public Overridable Property LogID As Integer
Get
Return MyBase.GetInteger(ColumnNames.LogID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.LogID, Value)
End Set
End Property
Public Overridable Property CallerID As String
Get
Return MyBase.GetString(ColumnNames.CallerID)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.CallerID, Value)
End Set
End Property
Public Overridable Property UniqueID As String
Get
Return MyBase.GetString(ColumnNames.UniqueID)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.UniqueID, Value)
End Set
End Property
Public Overridable Property Stepnumber As String
Get
Return MyBase.GetString(ColumnNames.Stepnumber)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Stepnumber, Value)
End Set
End Property
Public Overridable Property CallDateTime As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.CallDateTime)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.CallDateTime, Value)
End Set
End Property
Public Overridable Property ReturnValue As String
Get
Return MyBase.GetString(ColumnNames.ReturnValue)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.ReturnValue, Value)
End Set
End Property
Public Overridable Property IsInTimeOffice As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsInTimeOffice)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsInTimeOffice, Value)
End Set
End Property
Public Overridable Property CustomerCall As String
Get
Return MyBase.GetString(ColumnNames.CustomerCall)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.CustomerCall, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_LogID As String
Get
If Me.IsColumnNull(ColumnNames.LogID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.LogID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.LogID)
Else
Me.LogID = MyBase.SetIntegerAsString(ColumnNames.LogID, Value)
End If
End Set
End Property
Public Overridable Property s_CallerID As String
Get
If Me.IsColumnNull(ColumnNames.CallerID) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.CallerID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CallerID)
Else
Me.CallerID = MyBase.SetStringAsString(ColumnNames.CallerID, Value)
End If
End Set
End Property
Public Overridable Property s_UniqueID As String
Get
If Me.IsColumnNull(ColumnNames.UniqueID) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.UniqueID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UniqueID)
Else
Me.UniqueID = MyBase.SetStringAsString(ColumnNames.UniqueID, Value)
End If
End Set
End Property
Public Overridable Property s_Stepnumber As String
Get
If Me.IsColumnNull(ColumnNames.Stepnumber) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Stepnumber)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Stepnumber)
Else
Me.Stepnumber = MyBase.SetStringAsString(ColumnNames.Stepnumber, Value)
End If
End Set
End Property
Public Overridable Property s_CallDateTime As String
Get
If Me.IsColumnNull(ColumnNames.CallDateTime) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.CallDateTime)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CallDateTime)
Else
Me.CallDateTime = MyBase.SetDateTimeAsString(ColumnNames.CallDateTime, Value)
End If
End Set
End Property
Public Overridable Property s_ReturnValue As String
Get
If Me.IsColumnNull(ColumnNames.ReturnValue) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.ReturnValue)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ReturnValue)
Else
Me.ReturnValue = MyBase.SetStringAsString(ColumnNames.ReturnValue, Value)
End If
End Set
End Property
Public Overridable Property s_IsInTimeOffice As String
Get
If Me.IsColumnNull(ColumnNames.IsInTimeOffice) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsInTimeOffice)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsInTimeOffice)
Else
Me.IsInTimeOffice = MyBase.SetBooleanAsString(ColumnNames.IsInTimeOffice, Value)
End If
End Set
End Property
Public Overridable Property s_CustomerCall As String
Get
If Me.IsColumnNull(ColumnNames.CustomerCall) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.CustomerCall)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CustomerCall)
Else
Me.CustomerCall = MyBase.SetStringAsString(ColumnNames.CustomerCall, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property LogID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.LogID, Parameters.LogID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CallerID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CallerID, Parameters.CallerID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UniqueID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UniqueID, Parameters.UniqueID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Stepnumber() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Stepnumber, Parameters.Stepnumber)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CallDateTime() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CallDateTime, Parameters.CallDateTime)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ReturnValue() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ReturnValue, Parameters.ReturnValue)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsInTimeOffice() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsInTimeOffice, Parameters.IsInTimeOffice)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CustomerCall() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CustomerCall, Parameters.CustomerCall)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property LogID() As WhereParameter
Get
If _LogID_W Is Nothing Then
_LogID_W = TearOff.LogID
End If
Return _LogID_W
End Get
End Property
Public ReadOnly Property CallerID() As WhereParameter
Get
If _CallerID_W Is Nothing Then
_CallerID_W = TearOff.CallerID
End If
Return _CallerID_W
End Get
End Property
Public ReadOnly Property UniqueID() As WhereParameter
Get
If _UniqueID_W Is Nothing Then
_UniqueID_W = TearOff.UniqueID
End If
Return _UniqueID_W
End Get
End Property
Public ReadOnly Property Stepnumber() As WhereParameter
Get
If _Stepnumber_W Is Nothing Then
_Stepnumber_W = TearOff.Stepnumber
End If
Return _Stepnumber_W
End Get
End Property
Public ReadOnly Property CallDateTime() As WhereParameter
Get
If _CallDateTime_W Is Nothing Then
_CallDateTime_W = TearOff.CallDateTime
End If
Return _CallDateTime_W
End Get
End Property
Public ReadOnly Property ReturnValue() As WhereParameter
Get
If _ReturnValue_W Is Nothing Then
_ReturnValue_W = TearOff.ReturnValue
End If
Return _ReturnValue_W
End Get
End Property
Public ReadOnly Property IsInTimeOffice() As WhereParameter
Get
If _IsInTimeOffice_W Is Nothing Then
_IsInTimeOffice_W = TearOff.IsInTimeOffice
End If
Return _IsInTimeOffice_W
End Get
End Property
Public ReadOnly Property CustomerCall() As WhereParameter
Get
If _CustomerCall_W Is Nothing Then
_CustomerCall_W = TearOff.CustomerCall
End If
Return _CustomerCall_W
End Get
End Property
Private _LogID_W As WhereParameter = Nothing
Private _CallerID_W As WhereParameter = Nothing
Private _UniqueID_W As WhereParameter = Nothing
Private _Stepnumber_W As WhereParameter = Nothing
Private _CallDateTime_W As WhereParameter = Nothing
Private _ReturnValue_W As WhereParameter = Nothing
Private _IsInTimeOffice_W As WhereParameter = Nothing
Private _CustomerCall_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_LogID_W = Nothing
_CallerID_W = Nothing
_UniqueID_W = Nothing
_Stepnumber_W = Nothing
_CallDateTime_W = Nothing
_ReturnValue_W = Nothing
_IsInTimeOffice_W = Nothing
_CustomerCall_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property LogID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.LogID, Parameters.LogID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CallerID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CallerID, Parameters.CallerID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UniqueID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UniqueID, Parameters.UniqueID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Stepnumber() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Stepnumber, Parameters.Stepnumber)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CallDateTime() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CallDateTime, Parameters.CallDateTime)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ReturnValue() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ReturnValue, Parameters.ReturnValue)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsInTimeOffice() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsInTimeOffice, Parameters.IsInTimeOffice)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CustomerCall() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CustomerCall, Parameters.CustomerCall)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property LogID() As AggregateParameter
Get
If _LogID_W Is Nothing Then
_LogID_W = TearOff.LogID
End If
Return _LogID_W
End Get
End Property
Public ReadOnly Property CallerID() As AggregateParameter
Get
If _CallerID_W Is Nothing Then
_CallerID_W = TearOff.CallerID
End If
Return _CallerID_W
End Get
End Property
Public ReadOnly Property UniqueID() As AggregateParameter
Get
If _UniqueID_W Is Nothing Then
_UniqueID_W = TearOff.UniqueID
End If
Return _UniqueID_W
End Get
End Property
Public ReadOnly Property Stepnumber() As AggregateParameter
Get
If _Stepnumber_W Is Nothing Then
_Stepnumber_W = TearOff.Stepnumber
End If
Return _Stepnumber_W
End Get
End Property
Public ReadOnly Property CallDateTime() As AggregateParameter
Get
If _CallDateTime_W Is Nothing Then
_CallDateTime_W = TearOff.CallDateTime
End If
Return _CallDateTime_W
End Get
End Property
Public ReadOnly Property ReturnValue() As AggregateParameter
Get
If _ReturnValue_W Is Nothing Then
_ReturnValue_W = TearOff.ReturnValue
End If
Return _ReturnValue_W
End Get
End Property
Public ReadOnly Property IsInTimeOffice() As AggregateParameter
Get
If _IsInTimeOffice_W Is Nothing Then
_IsInTimeOffice_W = TearOff.IsInTimeOffice
End If
Return _IsInTimeOffice_W
End Get
End Property
Public ReadOnly Property CustomerCall() As AggregateParameter
Get
If _CustomerCall_W Is Nothing Then
_CustomerCall_W = TearOff.CustomerCall
End If
Return _CustomerCall_W
End Get
End Property
Private _LogID_W As AggregateParameter = Nothing
Private _CallerID_W As AggregateParameter = Nothing
Private _UniqueID_W As AggregateParameter = Nothing
Private _Stepnumber_W As AggregateParameter = Nothing
Private _CallDateTime_W As AggregateParameter = Nothing
Private _ReturnValue_W As AggregateParameter = Nothing
Private _IsInTimeOffice_W As AggregateParameter = Nothing
Private _CustomerCall_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_LogID_W = Nothing
_CallerID_W = Nothing
_UniqueID_W = Nothing
_Stepnumber_W = Nothing
_CallDateTime_W = Nothing
_ReturnValue_W = Nothing
_IsInTimeOffice_W = Nothing
_CustomerCall_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_CallCenterLogInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.LogID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_CallCenterLogUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_CallCenterLogDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.LogID)
p.SourceColumn = ColumnNames.LogID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.LogID)
p.SourceColumn = ColumnNames.LogID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CallerID)
p.SourceColumn = ColumnNames.CallerID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UniqueID)
p.SourceColumn = ColumnNames.UniqueID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Stepnumber)
p.SourceColumn = ColumnNames.Stepnumber
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CallDateTime)
p.SourceColumn = ColumnNames.CallDateTime
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ReturnValue)
p.SourceColumn = ColumnNames.ReturnValue
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsInTimeOffice)
p.SourceColumn = ColumnNames.IsInTimeOffice
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CustomerCall)
p.SourceColumn = ColumnNames.CustomerCall
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
'oliuy
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
NameSpace MushroomTravel
Public MustInherit Class _M_User
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "M_User"
Me.MappingName = "M_User"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_M_UserLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal UserID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_M_User.Parameters.UserID, UserID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_M_UserLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property UserID As SqlParameter
Get
Return New SqlParameter("@UserID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property MemberID As SqlParameter
Get
Return New SqlParameter("@MemberID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property UserName As SqlParameter
Get
Return New SqlParameter("@UserName", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Password As SqlParameter
Get
Return New SqlParameter("@Password", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property StaffName As SqlParameter
Get
Return New SqlParameter("@StaffName", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Position As SqlParameter
Get
Return New SqlParameter("@Position", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property NickName As SqlParameter
Get
Return New SqlParameter("@NickName", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Picstaff As SqlParameter
Get
Return New SqlParameter("@Picstaff", SqlDbType.VarChar, 200)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const UserID As String = "UserID"
Public Const MemberID As String = "MemberID"
Public Const UserName As String = "UserName"
Public Const Password As String = "Password"
Public Const StaffName As String = "StaffName"
Public Const Position As String = "Position"
Public Const NickName As String = "NickName"
Public Const Picstaff As String = "Picstaff"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(UserID) = _M_User.PropertyNames.UserID
ht(MemberID) = _M_User.PropertyNames.MemberID
ht(UserName) = _M_User.PropertyNames.UserName
ht(Password) = _M_User.PropertyNames.Password
ht(StaffName) = _M_User.PropertyNames.StaffName
ht(Position) = _M_User.PropertyNames.Position
ht(NickName) = _M_User.PropertyNames.NickName
ht(Picstaff) = _M_User.PropertyNames.Picstaff
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const UserID As String = "UserID"
Public Const MemberID As String = "MemberID"
Public Const UserName As String = "UserName"
Public Const Password As String = "Password"
Public Const StaffName As String = "StaffName"
Public Const Position As String = "Position"
Public Const NickName As String = "NickName"
Public Const Picstaff As String = "Picstaff"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(UserID) = _M_User.ColumnNames.UserID
ht(MemberID) = _M_User.ColumnNames.MemberID
ht(UserName) = _M_User.ColumnNames.UserName
ht(Password) = _M_User.ColumnNames.Password
ht(StaffName) = _M_User.ColumnNames.StaffName
ht(Position) = _M_User.ColumnNames.Position
ht(NickName) = _M_User.ColumnNames.NickName
ht(Picstaff) = _M_User.ColumnNames.Picstaff
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const UserID As String = "s_UserID"
Public Const MemberID As String = "s_MemberID"
Public Const UserName As String = "s_UserName"
Public Const Password As String = "s_Password"
Public Const StaffName As String = "s_StaffName"
Public Const Position As String = "s_Position"
Public Const NickName As String = "s_NickName"
Public Const Picstaff As String = "s_Picstaff"
End Class
#End Region
#Region "Properties"
Public Overridable Property UserID As Integer
Get
Return MyBase.GetInteger(ColumnNames.UserID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.UserID, Value)
End Set
End Property
Public Overridable Property MemberID As Integer
Get
Return MyBase.GetInteger(ColumnNames.MemberID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.MemberID, Value)
End Set
End Property
Public Overridable Property UserName As String
Get
Return MyBase.GetString(ColumnNames.UserName)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.UserName, Value)
End Set
End Property
Public Overridable Property Password As String
Get
Return MyBase.GetString(ColumnNames.Password)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Password, Value)
End Set
End Property
Public Overridable Property StaffName As String
Get
Return MyBase.GetString(ColumnNames.StaffName)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.StaffName, Value)
End Set
End Property
Public Overridable Property Position As String
Get
Return MyBase.GetString(ColumnNames.Position)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Position, Value)
End Set
End Property
Public Overridable Property NickName As String
Get
Return MyBase.GetString(ColumnNames.NickName)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.NickName, Value)
End Set
End Property
Public Overridable Property Picstaff As String
Get
Return MyBase.GetString(ColumnNames.Picstaff)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Picstaff, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_UserID As String
Get
If Me.IsColumnNull(ColumnNames.UserID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.UserID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UserID)
Else
Me.UserID = MyBase.SetIntegerAsString(ColumnNames.UserID, Value)
End If
End Set
End Property
Public Overridable Property s_MemberID As String
Get
If Me.IsColumnNull(ColumnNames.MemberID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.MemberID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.MemberID)
Else
Me.MemberID = MyBase.SetIntegerAsString(ColumnNames.MemberID, Value)
End If
End Set
End Property
Public Overridable Property s_UserName As String
Get
If Me.IsColumnNull(ColumnNames.UserName) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.UserName)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UserName)
Else
Me.UserName = MyBase.SetStringAsString(ColumnNames.UserName, Value)
End If
End Set
End Property
Public Overridable Property s_Password As String
Get
If Me.IsColumnNull(ColumnNames.Password) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Password)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Password)
Else
Me.Password = MyBase.SetStringAsString(ColumnNames.Password, Value)
End If
End Set
End Property
Public Overridable Property s_StaffName As String
Get
If Me.IsColumnNull(ColumnNames.StaffName) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.StaffName)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.StaffName)
Else
Me.StaffName = MyBase.SetStringAsString(ColumnNames.StaffName, Value)
End If
End Set
End Property
Public Overridable Property s_Position As String
Get
If Me.IsColumnNull(ColumnNames.Position) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Position)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Position)
Else
Me.Position = MyBase.SetStringAsString(ColumnNames.Position, Value)
End If
End Set
End Property
Public Overridable Property s_NickName As String
Get
If Me.IsColumnNull(ColumnNames.NickName) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.NickName)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.NickName)
Else
Me.NickName = MyBase.SetStringAsString(ColumnNames.NickName, Value)
End If
End Set
End Property
Public Overridable Property s_Picstaff As String
Get
If Me.IsColumnNull(ColumnNames.Picstaff) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Picstaff)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Picstaff)
Else
Me.Picstaff = MyBase.SetStringAsString(ColumnNames.Picstaff, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property UserID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UserID, Parameters.UserID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property MemberID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.MemberID, Parameters.MemberID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UserName() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UserName, Parameters.UserName)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Password() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Password, Parameters.Password)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property StaffName() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.StaffName, Parameters.StaffName)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Position() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Position, Parameters.Position)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property NickName() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.NickName, Parameters.NickName)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Picstaff() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Picstaff, Parameters.Picstaff)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property UserID() As WhereParameter
Get
If _UserID_W Is Nothing Then
_UserID_W = TearOff.UserID
End If
Return _UserID_W
End Get
End Property
Public ReadOnly Property MemberID() As WhereParameter
Get
If _MemberID_W Is Nothing Then
_MemberID_W = TearOff.MemberID
End If
Return _MemberID_W
End Get
End Property
Public ReadOnly Property UserName() As WhereParameter
Get
If _UserName_W Is Nothing Then
_UserName_W = TearOff.UserName
End If
Return _UserName_W
End Get
End Property
Public ReadOnly Property Password() As WhereParameter
Get
If _Password_W Is Nothing Then
_Password_W = TearOff.Password
End If
Return _Password_W
End Get
End Property
Public ReadOnly Property StaffName() As WhereParameter
Get
If _StaffName_W Is Nothing Then
_StaffName_W = TearOff.StaffName
End If
Return _StaffName_W
End Get
End Property
Public ReadOnly Property Position() As WhereParameter
Get
If _Position_W Is Nothing Then
_Position_W = TearOff.Position
End If
Return _Position_W
End Get
End Property
Public ReadOnly Property NickName() As WhereParameter
Get
If _NickName_W Is Nothing Then
_NickName_W = TearOff.NickName
End If
Return _NickName_W
End Get
End Property
Public ReadOnly Property Picstaff() As WhereParameter
Get
If _Picstaff_W Is Nothing Then
_Picstaff_W = TearOff.Picstaff
End If
Return _Picstaff_W
End Get
End Property
Private _UserID_W As WhereParameter = Nothing
Private _MemberID_W As WhereParameter = Nothing
Private _UserName_W As WhereParameter = Nothing
Private _Password_W As WhereParameter = Nothing
Private _StaffName_W As WhereParameter = Nothing
Private _Position_W As WhereParameter = Nothing
Private _NickName_W As WhereParameter = Nothing
Private _Picstaff_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_UserID_W = Nothing
_MemberID_W = Nothing
_UserName_W = Nothing
_Password_W = Nothing
_StaffName_W = Nothing
_Position_W = Nothing
_NickName_W = Nothing
_Picstaff_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property UserID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UserID, Parameters.UserID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property MemberID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.MemberID, Parameters.MemberID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UserName() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UserName, Parameters.UserName)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Password() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Password, Parameters.Password)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property StaffName() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.StaffName, Parameters.StaffName)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Position() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Position, Parameters.Position)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property NickName() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.NickName, Parameters.NickName)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Picstaff() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Picstaff, Parameters.Picstaff)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property UserID() As AggregateParameter
Get
If _UserID_W Is Nothing Then
_UserID_W = TearOff.UserID
End If
Return _UserID_W
End Get
End Property
Public ReadOnly Property MemberID() As AggregateParameter
Get
If _MemberID_W Is Nothing Then
_MemberID_W = TearOff.MemberID
End If
Return _MemberID_W
End Get
End Property
Public ReadOnly Property UserName() As AggregateParameter
Get
If _UserName_W Is Nothing Then
_UserName_W = TearOff.UserName
End If
Return _UserName_W
End Get
End Property
Public ReadOnly Property Password() As AggregateParameter
Get
If _Password_W Is Nothing Then
_Password_W = TearOff.Password
End If
Return _Password_W
End Get
End Property
Public ReadOnly Property StaffName() As AggregateParameter
Get
If _StaffName_W Is Nothing Then
_StaffName_W = TearOff.StaffName
End If
Return _StaffName_W
End Get
End Property
Public ReadOnly Property Position() As AggregateParameter
Get
If _Position_W Is Nothing Then
_Position_W = TearOff.Position
End If
Return _Position_W
End Get
End Property
Public ReadOnly Property NickName() As AggregateParameter
Get
If _NickName_W Is Nothing Then
_NickName_W = TearOff.NickName
End If
Return _NickName_W
End Get
End Property
Public ReadOnly Property Picstaff() As AggregateParameter
Get
If _Picstaff_W Is Nothing Then
_Picstaff_W = TearOff.Picstaff
End If
Return _Picstaff_W
End Get
End Property
Private _UserID_W As AggregateParameter = Nothing
Private _MemberID_W As AggregateParameter = Nothing
Private _UserName_W As AggregateParameter = Nothing
Private _Password_W As AggregateParameter = Nothing
Private _StaffName_W As AggregateParameter = Nothing
Private _Position_W As AggregateParameter = Nothing
Private _NickName_W As AggregateParameter = Nothing
Private _Picstaff_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_UserID_W = Nothing
_MemberID_W = Nothing
_UserName_W = Nothing
_Password_W = Nothing
_StaffName_W = Nothing
_Position_W = Nothing
_NickName_W = Nothing
_Picstaff_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_M_UserInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.UserID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_M_UserUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_M_UserDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.UserID)
p.SourceColumn = ColumnNames.UserID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.UserID)
p.SourceColumn = ColumnNames.UserID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.MemberID)
p.SourceColumn = ColumnNames.MemberID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UserName)
p.SourceColumn = ColumnNames.UserName
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Password)
p.SourceColumn = ColumnNames.Password
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.StaffName)
p.SourceColumn = ColumnNames.StaffName
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Position)
p.SourceColumn = ColumnNames.Position
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.NickName)
p.SourceColumn = ColumnNames.NickName
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Picstaff)
p.SourceColumn = ColumnNames.Picstaff
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
End NameSpace
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
Public MustInherit Class _MainBooking
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "MainBooking"
Me.MappingName = "MainBooking"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_MainBookingLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal MainBookingID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_MainBooking.Parameters.MainBookingID, MainBookingID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_MainBookingLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property MainBookingID As SqlParameter
Get
Return New SqlParameter("@MainBookingID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property AgentID_Owner As SqlParameter
Get
Return New SqlParameter("@AgentID_Owner", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property PNRCode As SqlParameter
Get
Return New SqlParameter("@PNRCode", SqlDbType.VarChar, 20)
End Get
End Property
Public Shared ReadOnly Property ParentID As SqlParameter
Get
Return New SqlParameter("@ParentID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property ContactID As SqlParameter
Get
Return New SqlParameter("@ContactID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property IsCustomerCompany As SqlParameter
Get
Return New SqlParameter("@IsCustomerCompany", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property IsSubAgent As SqlParameter
Get
Return New SqlParameter("@IsSubAgent", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property CustomerCompanyID As SqlParameter
Get
Return New SqlParameter("@CustomerCompanyID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property ReservationID As SqlParameter
Get
Return New SqlParameter("@ReservationID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property CreateBy As SqlParameter
Get
Return New SqlParameter("@CreateBy", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property CreateDate As SqlParameter
Get
Return New SqlParameter("@CreateDate", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property UpdateBy As SqlParameter
Get
Return New SqlParameter("@UpdateBy", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property UpdateDate As SqlParameter
Get
Return New SqlParameter("@UpdateDate", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property IsFavorites As SqlParameter
Get
Return New SqlParameter("@IsFavorites", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property IsWebsite As SqlParameter
Get
Return New SqlParameter("@IsWebsite", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property CommentUnread As SqlParameter
Get
Return New SqlParameter("@CommentUnread", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property TypeBooking As SqlParameter
Get
Return New SqlParameter("@TypeBooking", SqlDbType.VarChar, 20)
End Get
End Property
Public Shared ReadOnly Property APIKey As SqlParameter
Get
Return New SqlParameter("@APIKey", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Remark As SqlParameter
Get
Return New SqlParameter("@Remark", SqlDbType.NVarChar, 1000)
End Get
End Property
Public Shared ReadOnly Property AssignReservationID As SqlParameter
Get
Return New SqlParameter("@AssignReservationID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property AssingBookingReservationID As SqlParameter
Get
Return New SqlParameter("@AssingBookingReservationID", SqlDbType.VarChar, 8000)
End Get
End Property
Public Shared ReadOnly Property ContactSupplier As SqlParameter
Get
Return New SqlParameter("@ContactSupplier", SqlDbType.NVarChar, 50)
End Get
End Property
Public Shared ReadOnly Property RefBookingSupplier As SqlParameter
Get
Return New SqlParameter("@RefBookingSupplier", SqlDbType.NVarChar, 20)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const MainBookingID As String = "MainBookingID"
Public Const AgentID_Owner As String = "AgentID_Owner"
Public Const PNRCode As String = "PNRCode"
Public Const ParentID As String = "ParentID"
Public Const ContactID As String = "ContactID"
Public Const IsCustomerCompany As String = "IsCustomerCompany"
Public Const IsSubAgent As String = "IsSubAgent"
Public Const CustomerCompanyID As String = "CustomerCompanyID"
Public Const ReservationID As String = "ReservationID"
Public Const CreateBy As String = "CreateBy"
Public Const CreateDate As String = "CreateDate"
Public Const UpdateBy As String = "UpdateBy"
Public Const UpdateDate As String = "UpdateDate"
Public Const IsFavorites As String = "IsFavorites"
Public Const IsWebsite As String = "IsWebsite"
Public Const CommentUnread As String = "CommentUnread"
Public Const TypeBooking As String = "TypeBooking"
Public Const APIKey As String = "APIKey"
Public Const Remark As String = "Remark"
Public Const AssignReservationID As String = "AssignReservationID"
Public Const AssingBookingReservationID As String = "AssingBookingReservationID"
Public Const ContactSupplier As String = "ContactSupplier"
Public Const RefBookingSupplier As String = "RefBookingSupplier"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(MainBookingID) = _MainBooking.PropertyNames.MainBookingID
ht(AgentID_Owner) = _MainBooking.PropertyNames.AgentID_Owner
ht(PNRCode) = _MainBooking.PropertyNames.PNRCode
ht(ParentID) = _MainBooking.PropertyNames.ParentID
ht(ContactID) = _MainBooking.PropertyNames.ContactID
ht(IsCustomerCompany) = _MainBooking.PropertyNames.IsCustomerCompany
ht(IsSubAgent) = _MainBooking.PropertyNames.IsSubAgent
ht(CustomerCompanyID) = _MainBooking.PropertyNames.CustomerCompanyID
ht(ReservationID) = _MainBooking.PropertyNames.ReservationID
ht(CreateBy) = _MainBooking.PropertyNames.CreateBy
ht(CreateDate) = _MainBooking.PropertyNames.CreateDate
ht(UpdateBy) = _MainBooking.PropertyNames.UpdateBy
ht(UpdateDate) = _MainBooking.PropertyNames.UpdateDate
ht(IsFavorites) = _MainBooking.PropertyNames.IsFavorites
ht(IsWebsite) = _MainBooking.PropertyNames.IsWebsite
ht(CommentUnread) = _MainBooking.PropertyNames.CommentUnread
ht(TypeBooking) = _MainBooking.PropertyNames.TypeBooking
ht(APIKey) = _MainBooking.PropertyNames.APIKey
ht(Remark) = _MainBooking.PropertyNames.Remark
ht(AssignReservationID) = _MainBooking.PropertyNames.AssignReservationID
ht(AssingBookingReservationID) = _MainBooking.PropertyNames.AssingBookingReservationID
ht(ContactSupplier) = _MainBooking.PropertyNames.ContactSupplier
ht(RefBookingSupplier) = _MainBooking.PropertyNames.RefBookingSupplier
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const MainBookingID As String = "MainBookingID"
Public Const AgentID_Owner As String = "AgentID_Owner"
Public Const PNRCode As String = "PNRCode"
Public Const ParentID As String = "ParentID"
Public Const ContactID As String = "ContactID"
Public Const IsCustomerCompany As String = "IsCustomerCompany"
Public Const IsSubAgent As String = "IsSubAgent"
Public Const CustomerCompanyID As String = "CustomerCompanyID"
Public Const ReservationID As String = "ReservationID"
Public Const CreateBy As String = "CreateBy"
Public Const CreateDate As String = "CreateDate"
Public Const UpdateBy As String = "UpdateBy"
Public Const UpdateDate As String = "UpdateDate"
Public Const IsFavorites As String = "IsFavorites"
Public Const IsWebsite As String = "IsWebsite"
Public Const CommentUnread As String = "CommentUnread"
Public Const TypeBooking As String = "TypeBooking"
Public Const APIKey As String = "APIKey"
Public Const Remark As String = "Remark"
Public Const AssignReservationID As String = "AssignReservationID"
Public Const AssingBookingReservationID As String = "AssingBookingReservationID"
Public Const ContactSupplier As String = "ContactSupplier"
Public Const RefBookingSupplier As String = "RefBookingSupplier"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(MainBookingID) = _MainBooking.ColumnNames.MainBookingID
ht(AgentID_Owner) = _MainBooking.ColumnNames.AgentID_Owner
ht(PNRCode) = _MainBooking.ColumnNames.PNRCode
ht(ParentID) = _MainBooking.ColumnNames.ParentID
ht(ContactID) = _MainBooking.ColumnNames.ContactID
ht(IsCustomerCompany) = _MainBooking.ColumnNames.IsCustomerCompany
ht(IsSubAgent) = _MainBooking.ColumnNames.IsSubAgent
ht(CustomerCompanyID) = _MainBooking.ColumnNames.CustomerCompanyID
ht(ReservationID) = _MainBooking.ColumnNames.ReservationID
ht(CreateBy) = _MainBooking.ColumnNames.CreateBy
ht(CreateDate) = _MainBooking.ColumnNames.CreateDate
ht(UpdateBy) = _MainBooking.ColumnNames.UpdateBy
ht(UpdateDate) = _MainBooking.ColumnNames.UpdateDate
ht(IsFavorites) = _MainBooking.ColumnNames.IsFavorites
ht(IsWebsite) = _MainBooking.ColumnNames.IsWebsite
ht(CommentUnread) = _MainBooking.ColumnNames.CommentUnread
ht(TypeBooking) = _MainBooking.ColumnNames.TypeBooking
ht(APIKey) = _MainBooking.ColumnNames.APIKey
ht(Remark) = _MainBooking.ColumnNames.Remark
ht(AssignReservationID) = _MainBooking.ColumnNames.AssignReservationID
ht(AssingBookingReservationID) = _MainBooking.ColumnNames.AssingBookingReservationID
ht(ContactSupplier) = _MainBooking.ColumnNames.ContactSupplier
ht(RefBookingSupplier) = _MainBooking.ColumnNames.RefBookingSupplier
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const MainBookingID As String = "s_MainBookingID"
Public Const AgentID_Owner As String = "s_AgentID_Owner"
Public Const PNRCode As String = "s_PNRCode"
Public Const ParentID As String = "s_ParentID"
Public Const ContactID As String = "s_ContactID"
Public Const IsCustomerCompany As String = "s_IsCustomerCompany"
Public Const IsSubAgent As String = "s_IsSubAgent"
Public Const CustomerCompanyID As String = "s_CustomerCompanyID"
Public Const ReservationID As String = "s_ReservationID"
Public Const CreateBy As String = "s_CreateBy"
Public Const CreateDate As String = "s_CreateDate"
Public Const UpdateBy As String = "s_UpdateBy"
Public Const UpdateDate As String = "s_UpdateDate"
Public Const IsFavorites As String = "s_IsFavorites"
Public Const IsWebsite As String = "s_IsWebsite"
Public Const CommentUnread As String = "s_CommentUnread"
Public Const TypeBooking As String = "s_TypeBooking"
Public Const APIKey As String = "s_APIKey"
Public Const Remark As String = "s_Remark"
Public Const AssignReservationID As String = "s_AssignReservationID"
Public Const AssingBookingReservationID As String = "s_AssingBookingReservationID"
Public Const ContactSupplier As String = "s_ContactSupplier"
Public Const RefBookingSupplier As String = "s_RefBookingSupplier"
End Class
#End Region
#Region "Properties"
Public Overridable Property MainBookingID As Integer
Get
Return MyBase.GetInteger(ColumnNames.MainBookingID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.MainBookingID, Value)
End Set
End Property
Public Overridable Property AgentID_Owner As Integer
Get
Return MyBase.GetInteger(ColumnNames.AgentID_Owner)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.AgentID_Owner, Value)
End Set
End Property
Public Overridable Property PNRCode As String
Get
Return MyBase.GetString(ColumnNames.PNRCode)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.PNRCode, Value)
End Set
End Property
Public Overridable Property ParentID As Integer
Get
Return MyBase.GetInteger(ColumnNames.ParentID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.ParentID, Value)
End Set
End Property
Public Overridable Property ContactID As Integer
Get
Return MyBase.GetInteger(ColumnNames.ContactID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.ContactID, Value)
End Set
End Property
Public Overridable Property IsCustomerCompany As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsCustomerCompany)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsCustomerCompany, Value)
End Set
End Property
Public Overridable Property IsSubAgent As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsSubAgent)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsSubAgent, Value)
End Set
End Property
Public Overridable Property CustomerCompanyID As Integer
Get
Return MyBase.GetInteger(ColumnNames.CustomerCompanyID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.CustomerCompanyID, Value)
End Set
End Property
Public Overridable Property ReservationID As Integer
Get
Return MyBase.GetInteger(ColumnNames.ReservationID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.ReservationID, Value)
End Set
End Property
Public Overridable Property CreateBy As Integer
Get
Return MyBase.GetInteger(ColumnNames.CreateBy)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.CreateBy, Value)
End Set
End Property
Public Overridable Property CreateDate As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.CreateDate)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.CreateDate, Value)
End Set
End Property
Public Overridable Property UpdateBy As Integer
Get
Return MyBase.GetInteger(ColumnNames.UpdateBy)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.UpdateBy, Value)
End Set
End Property
Public Overridable Property UpdateDate As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.UpdateDate)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.UpdateDate, Value)
End Set
End Property
Public Overridable Property IsFavorites As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsFavorites)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsFavorites, Value)
End Set
End Property
Public Overridable Property IsWebsite As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsWebsite)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsWebsite, Value)
End Set
End Property
Public Overridable Property CommentUnread As Integer
Get
Return MyBase.GetInteger(ColumnNames.CommentUnread)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.CommentUnread, Value)
End Set
End Property
Public Overridable Property TypeBooking As String
Get
Return MyBase.GetString(ColumnNames.TypeBooking)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.TypeBooking, Value)
End Set
End Property
Public Overridable Property APIKey As String
Get
Return MyBase.GetString(ColumnNames.APIKey)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.APIKey, Value)
End Set
End Property
Public Overridable Property Remark As String
Get
Return MyBase.GetString(ColumnNames.Remark)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Remark, Value)
End Set
End Property
Public Overridable Property AssignReservationID As Integer
Get
Return MyBase.GetInteger(ColumnNames.AssignReservationID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.AssignReservationID, Value)
End Set
End Property
Public Overridable Property AssingBookingReservationID As String
Get
Return MyBase.GetString(ColumnNames.AssingBookingReservationID)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.AssingBookingReservationID, Value)
End Set
End Property
Public Overridable Property ContactSupplier As String
Get
Return MyBase.GetString(ColumnNames.ContactSupplier)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.ContactSupplier, Value)
End Set
End Property
Public Overridable Property RefBookingSupplier As String
Get
Return MyBase.GetString(ColumnNames.RefBookingSupplier)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.RefBookingSupplier, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_MainBookingID As String
Get
If Me.IsColumnNull(ColumnNames.MainBookingID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.MainBookingID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.MainBookingID)
Else
Me.MainBookingID = MyBase.SetIntegerAsString(ColumnNames.MainBookingID, Value)
End If
End Set
End Property
Public Overridable Property s_AgentID_Owner As String
Get
If Me.IsColumnNull(ColumnNames.AgentID_Owner) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.AgentID_Owner)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.AgentID_Owner)
Else
Me.AgentID_Owner = MyBase.SetIntegerAsString(ColumnNames.AgentID_Owner, Value)
End If
End Set
End Property
Public Overridable Property s_PNRCode As String
Get
If Me.IsColumnNull(ColumnNames.PNRCode) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.PNRCode)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.PNRCode)
Else
Me.PNRCode = MyBase.SetStringAsString(ColumnNames.PNRCode, Value)
End If
End Set
End Property
Public Overridable Property s_ParentID As String
Get
If Me.IsColumnNull(ColumnNames.ParentID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.ParentID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ParentID)
Else
Me.ParentID = MyBase.SetIntegerAsString(ColumnNames.ParentID, Value)
End If
End Set
End Property
Public Overridable Property s_ContactID As String
Get
If Me.IsColumnNull(ColumnNames.ContactID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.ContactID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ContactID)
Else
Me.ContactID = MyBase.SetIntegerAsString(ColumnNames.ContactID, Value)
End If
End Set
End Property
Public Overridable Property s_IsCustomerCompany As String
Get
If Me.IsColumnNull(ColumnNames.IsCustomerCompany) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsCustomerCompany)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsCustomerCompany)
Else
Me.IsCustomerCompany = MyBase.SetBooleanAsString(ColumnNames.IsCustomerCompany, Value)
End If
End Set
End Property
Public Overridable Property s_IsSubAgent As String
Get
If Me.IsColumnNull(ColumnNames.IsSubAgent) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsSubAgent)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsSubAgent)
Else
Me.IsSubAgent = MyBase.SetBooleanAsString(ColumnNames.IsSubAgent, Value)
End If
End Set
End Property
Public Overridable Property s_CustomerCompanyID As String
Get
If Me.IsColumnNull(ColumnNames.CustomerCompanyID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.CustomerCompanyID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CustomerCompanyID)
Else
Me.CustomerCompanyID = MyBase.SetIntegerAsString(ColumnNames.CustomerCompanyID, Value)
End If
End Set
End Property
Public Overridable Property s_ReservationID As String
Get
If Me.IsColumnNull(ColumnNames.ReservationID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.ReservationID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ReservationID)
Else
Me.ReservationID = MyBase.SetIntegerAsString(ColumnNames.ReservationID, Value)
End If
End Set
End Property
Public Overridable Property s_CreateBy As String
Get
If Me.IsColumnNull(ColumnNames.CreateBy) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.CreateBy)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CreateBy)
Else
Me.CreateBy = MyBase.SetIntegerAsString(ColumnNames.CreateBy, Value)
End If
End Set
End Property
Public Overridable Property s_CreateDate As String
Get
If Me.IsColumnNull(ColumnNames.CreateDate) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.CreateDate)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CreateDate)
Else
Me.CreateDate = MyBase.SetDateTimeAsString(ColumnNames.CreateDate, Value)
End If
End Set
End Property
Public Overridable Property s_UpdateBy As String
Get
If Me.IsColumnNull(ColumnNames.UpdateBy) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.UpdateBy)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UpdateBy)
Else
Me.UpdateBy = MyBase.SetIntegerAsString(ColumnNames.UpdateBy, Value)
End If
End Set
End Property
Public Overridable Property s_UpdateDate As String
Get
If Me.IsColumnNull(ColumnNames.UpdateDate) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.UpdateDate)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UpdateDate)
Else
Me.UpdateDate = MyBase.SetDateTimeAsString(ColumnNames.UpdateDate, Value)
End If
End Set
End Property
Public Overridable Property s_IsFavorites As String
Get
If Me.IsColumnNull(ColumnNames.IsFavorites) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsFavorites)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsFavorites)
Else
Me.IsFavorites = MyBase.SetBooleanAsString(ColumnNames.IsFavorites, Value)
End If
End Set
End Property
Public Overridable Property s_IsWebsite As String
Get
If Me.IsColumnNull(ColumnNames.IsWebsite) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsWebsite)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsWebsite)
Else
Me.IsWebsite = MyBase.SetBooleanAsString(ColumnNames.IsWebsite, Value)
End If
End Set
End Property
Public Overridable Property s_CommentUnread As String
Get
If Me.IsColumnNull(ColumnNames.CommentUnread) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.CommentUnread)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CommentUnread)
Else
Me.CommentUnread = MyBase.SetIntegerAsString(ColumnNames.CommentUnread, Value)
End If
End Set
End Property
Public Overridable Property s_TypeBooking As String
Get
If Me.IsColumnNull(ColumnNames.TypeBooking) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.TypeBooking)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.TypeBooking)
Else
Me.TypeBooking = MyBase.SetStringAsString(ColumnNames.TypeBooking, Value)
End If
End Set
End Property
Public Overridable Property s_APIKey As String
Get
If Me.IsColumnNull(ColumnNames.APIKey) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.APIKey)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.APIKey)
Else
Me.APIKey = MyBase.SetStringAsString(ColumnNames.APIKey, Value)
End If
End Set
End Property
Public Overridable Property s_Remark As String
Get
If Me.IsColumnNull(ColumnNames.Remark) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Remark)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Remark)
Else
Me.Remark = MyBase.SetStringAsString(ColumnNames.Remark, Value)
End If
End Set
End Property
Public Overridable Property s_AssignReservationID As String
Get
If Me.IsColumnNull(ColumnNames.AssignReservationID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.AssignReservationID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.AssignReservationID)
Else
Me.AssignReservationID = MyBase.SetIntegerAsString(ColumnNames.AssignReservationID, Value)
End If
End Set
End Property
Public Overridable Property s_AssingBookingReservationID As String
Get
If Me.IsColumnNull(ColumnNames.AssingBookingReservationID) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.AssingBookingReservationID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.AssingBookingReservationID)
Else
Me.AssingBookingReservationID = MyBase.SetStringAsString(ColumnNames.AssingBookingReservationID, Value)
End If
End Set
End Property
Public Overridable Property s_ContactSupplier As String
Get
If Me.IsColumnNull(ColumnNames.ContactSupplier) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.ContactSupplier)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ContactSupplier)
Else
Me.ContactSupplier = MyBase.SetStringAsString(ColumnNames.ContactSupplier, Value)
End If
End Set
End Property
Public Overridable Property s_RefBookingSupplier As String
Get
If Me.IsColumnNull(ColumnNames.RefBookingSupplier) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.RefBookingSupplier)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.RefBookingSupplier)
Else
Me.RefBookingSupplier = MyBase.SetStringAsString(ColumnNames.RefBookingSupplier, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property MainBookingID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.MainBookingID, Parameters.MainBookingID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property AgentID_Owner() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.AgentID_Owner, Parameters.AgentID_Owner)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property PNRCode() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.PNRCode, Parameters.PNRCode)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ParentID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ParentID, Parameters.ParentID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ContactID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ContactID, Parameters.ContactID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsCustomerCompany() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsCustomerCompany, Parameters.IsCustomerCompany)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsSubAgent() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsSubAgent, Parameters.IsSubAgent)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CustomerCompanyID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CustomerCompanyID, Parameters.CustomerCompanyID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ReservationID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ReservationID, Parameters.ReservationID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CreateBy() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CreateBy, Parameters.CreateBy)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CreateDate() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CreateDate, Parameters.CreateDate)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateBy() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UpdateBy, Parameters.UpdateBy)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateDate() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UpdateDate, Parameters.UpdateDate)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsFavorites() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsFavorites, Parameters.IsFavorites)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsWebsite() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsWebsite, Parameters.IsWebsite)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CommentUnread() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CommentUnread, Parameters.CommentUnread)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property TypeBooking() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.TypeBooking, Parameters.TypeBooking)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property APIKey() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.APIKey, Parameters.APIKey)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Remark() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Remark, Parameters.Remark)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property AssignReservationID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.AssignReservationID, Parameters.AssignReservationID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property AssingBookingReservationID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.AssingBookingReservationID, Parameters.AssingBookingReservationID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ContactSupplier() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ContactSupplier, Parameters.ContactSupplier)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property RefBookingSupplier() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.RefBookingSupplier, Parameters.RefBookingSupplier)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property MainBookingID() As WhereParameter
Get
If _MainBookingID_W Is Nothing Then
_MainBookingID_W = TearOff.MainBookingID
End If
Return _MainBookingID_W
End Get
End Property
Public ReadOnly Property AgentID_Owner() As WhereParameter
Get
If _AgentID_Owner_W Is Nothing Then
_AgentID_Owner_W = TearOff.AgentID_Owner
End If
Return _AgentID_Owner_W
End Get
End Property
Public ReadOnly Property PNRCode() As WhereParameter
Get
If _PNRCode_W Is Nothing Then
_PNRCode_W = TearOff.PNRCode
End If
Return _PNRCode_W
End Get
End Property
Public ReadOnly Property ParentID() As WhereParameter
Get
If _ParentID_W Is Nothing Then
_ParentID_W = TearOff.ParentID
End If
Return _ParentID_W
End Get
End Property
Public ReadOnly Property ContactID() As WhereParameter
Get
If _ContactID_W Is Nothing Then
_ContactID_W = TearOff.ContactID
End If
Return _ContactID_W
End Get
End Property
Public ReadOnly Property IsCustomerCompany() As WhereParameter
Get
If _IsCustomerCompany_W Is Nothing Then
_IsCustomerCompany_W = TearOff.IsCustomerCompany
End If
Return _IsCustomerCompany_W
End Get
End Property
Public ReadOnly Property IsSubAgent() As WhereParameter
Get
If _IsSubAgent_W Is Nothing Then
_IsSubAgent_W = TearOff.IsSubAgent
End If
Return _IsSubAgent_W
End Get
End Property
Public ReadOnly Property CustomerCompanyID() As WhereParameter
Get
If _CustomerCompanyID_W Is Nothing Then
_CustomerCompanyID_W = TearOff.CustomerCompanyID
End If
Return _CustomerCompanyID_W
End Get
End Property
Public ReadOnly Property ReservationID() As WhereParameter
Get
If _ReservationID_W Is Nothing Then
_ReservationID_W = TearOff.ReservationID
End If
Return _ReservationID_W
End Get
End Property
Public ReadOnly Property CreateBy() As WhereParameter
Get
If _CreateBy_W Is Nothing Then
_CreateBy_W = TearOff.CreateBy
End If
Return _CreateBy_W
End Get
End Property
Public ReadOnly Property CreateDate() As WhereParameter
Get
If _CreateDate_W Is Nothing Then
_CreateDate_W = TearOff.CreateDate
End If
Return _CreateDate_W
End Get
End Property
Public ReadOnly Property UpdateBy() As WhereParameter
Get
If _UpdateBy_W Is Nothing Then
_UpdateBy_W = TearOff.UpdateBy
End If
Return _UpdateBy_W
End Get
End Property
Public ReadOnly Property UpdateDate() As WhereParameter
Get
If _UpdateDate_W Is Nothing Then
_UpdateDate_W = TearOff.UpdateDate
End If
Return _UpdateDate_W
End Get
End Property
Public ReadOnly Property IsFavorites() As WhereParameter
Get
If _IsFavorites_W Is Nothing Then
_IsFavorites_W = TearOff.IsFavorites
End If
Return _IsFavorites_W
End Get
End Property
Public ReadOnly Property IsWebsite() As WhereParameter
Get
If _IsWebsite_W Is Nothing Then
_IsWebsite_W = TearOff.IsWebsite
End If
Return _IsWebsite_W
End Get
End Property
Public ReadOnly Property CommentUnread() As WhereParameter
Get
If _CommentUnread_W Is Nothing Then
_CommentUnread_W = TearOff.CommentUnread
End If
Return _CommentUnread_W
End Get
End Property
Public ReadOnly Property TypeBooking() As WhereParameter
Get
If _TypeBooking_W Is Nothing Then
_TypeBooking_W = TearOff.TypeBooking
End If
Return _TypeBooking_W
End Get
End Property
Public ReadOnly Property APIKey() As WhereParameter
Get
If _APIKey_W Is Nothing Then
_APIKey_W = TearOff.APIKey
End If
Return _APIKey_W
End Get
End Property
Public ReadOnly Property Remark() As WhereParameter
Get
If _Remark_W Is Nothing Then
_Remark_W = TearOff.Remark
End If
Return _Remark_W
End Get
End Property
Public ReadOnly Property AssignReservationID() As WhereParameter
Get
If _AssignReservationID_W Is Nothing Then
_AssignReservationID_W = TearOff.AssignReservationID
End If
Return _AssignReservationID_W
End Get
End Property
Public ReadOnly Property AssingBookingReservationID() As WhereParameter
Get
If _AssingBookingReservationID_W Is Nothing Then
_AssingBookingReservationID_W = TearOff.AssingBookingReservationID
End If
Return _AssingBookingReservationID_W
End Get
End Property
Public ReadOnly Property ContactSupplier() As WhereParameter
Get
If _ContactSupplier_W Is Nothing Then
_ContactSupplier_W = TearOff.ContactSupplier
End If
Return _ContactSupplier_W
End Get
End Property
Public ReadOnly Property RefBookingSupplier() As WhereParameter
Get
If _RefBookingSupplier_W Is Nothing Then
_RefBookingSupplier_W = TearOff.RefBookingSupplier
End If
Return _RefBookingSupplier_W
End Get
End Property
Private _MainBookingID_W As WhereParameter = Nothing
Private _AgentID_Owner_W As WhereParameter = Nothing
Private _PNRCode_W As WhereParameter = Nothing
Private _ParentID_W As WhereParameter = Nothing
Private _ContactID_W As WhereParameter = Nothing
Private _IsCustomerCompany_W As WhereParameter = Nothing
Private _IsSubAgent_W As WhereParameter = Nothing
Private _CustomerCompanyID_W As WhereParameter = Nothing
Private _ReservationID_W As WhereParameter = Nothing
Private _CreateBy_W As WhereParameter = Nothing
Private _CreateDate_W As WhereParameter = Nothing
Private _UpdateBy_W As WhereParameter = Nothing
Private _UpdateDate_W As WhereParameter = Nothing
Private _IsFavorites_W As WhereParameter = Nothing
Private _IsWebsite_W As WhereParameter = Nothing
Private _CommentUnread_W As WhereParameter = Nothing
Private _TypeBooking_W As WhereParameter = Nothing
Private _APIKey_W As WhereParameter = Nothing
Private _Remark_W As WhereParameter = Nothing
Private _AssignReservationID_W As WhereParameter = Nothing
Private _AssingBookingReservationID_W As WhereParameter = Nothing
Private _ContactSupplier_W As WhereParameter = Nothing
Private _RefBookingSupplier_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_MainBookingID_W = Nothing
_AgentID_Owner_W = Nothing
_PNRCode_W = Nothing
_ParentID_W = Nothing
_ContactID_W = Nothing
_IsCustomerCompany_W = Nothing
_IsSubAgent_W = Nothing
_CustomerCompanyID_W = Nothing
_ReservationID_W = Nothing
_CreateBy_W = Nothing
_CreateDate_W = Nothing
_UpdateBy_W = Nothing
_UpdateDate_W = Nothing
_IsFavorites_W = Nothing
_IsWebsite_W = Nothing
_CommentUnread_W = Nothing
_TypeBooking_W = Nothing
_APIKey_W = Nothing
_Remark_W = Nothing
_AssignReservationID_W = Nothing
_AssingBookingReservationID_W = Nothing
_ContactSupplier_W = Nothing
_RefBookingSupplier_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property MainBookingID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.MainBookingID, Parameters.MainBookingID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property AgentID_Owner() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.AgentID_Owner, Parameters.AgentID_Owner)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property PNRCode() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.PNRCode, Parameters.PNRCode)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ParentID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ParentID, Parameters.ParentID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ContactID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ContactID, Parameters.ContactID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsCustomerCompany() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsCustomerCompany, Parameters.IsCustomerCompany)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsSubAgent() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsSubAgent, Parameters.IsSubAgent)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CustomerCompanyID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CustomerCompanyID, Parameters.CustomerCompanyID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ReservationID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ReservationID, Parameters.ReservationID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CreateBy() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CreateBy, Parameters.CreateBy)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CreateDate() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CreateDate, Parameters.CreateDate)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateBy() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UpdateBy, Parameters.UpdateBy)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateDate() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UpdateDate, Parameters.UpdateDate)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsFavorites() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsFavorites, Parameters.IsFavorites)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsWebsite() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsWebsite, Parameters.IsWebsite)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CommentUnread() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CommentUnread, Parameters.CommentUnread)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property TypeBooking() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TypeBooking, Parameters.TypeBooking)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property APIKey() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.APIKey, Parameters.APIKey)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Remark() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Remark, Parameters.Remark)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property AssignReservationID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.AssignReservationID, Parameters.AssignReservationID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property AssingBookingReservationID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.AssingBookingReservationID, Parameters.AssingBookingReservationID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ContactSupplier() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ContactSupplier, Parameters.ContactSupplier)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property RefBookingSupplier() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.RefBookingSupplier, Parameters.RefBookingSupplier)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property MainBookingID() As AggregateParameter
Get
If _MainBookingID_W Is Nothing Then
_MainBookingID_W = TearOff.MainBookingID
End If
Return _MainBookingID_W
End Get
End Property
Public ReadOnly Property AgentID_Owner() As AggregateParameter
Get
If _AgentID_Owner_W Is Nothing Then
_AgentID_Owner_W = TearOff.AgentID_Owner
End If
Return _AgentID_Owner_W
End Get
End Property
Public ReadOnly Property PNRCode() As AggregateParameter
Get
If _PNRCode_W Is Nothing Then
_PNRCode_W = TearOff.PNRCode
End If
Return _PNRCode_W
End Get
End Property
Public ReadOnly Property ParentID() As AggregateParameter
Get
If _ParentID_W Is Nothing Then
_ParentID_W = TearOff.ParentID
End If
Return _ParentID_W
End Get
End Property
Public ReadOnly Property ContactID() As AggregateParameter
Get
If _ContactID_W Is Nothing Then
_ContactID_W = TearOff.ContactID
End If
Return _ContactID_W
End Get
End Property
Public ReadOnly Property IsCustomerCompany() As AggregateParameter
Get
If _IsCustomerCompany_W Is Nothing Then
_IsCustomerCompany_W = TearOff.IsCustomerCompany
End If
Return _IsCustomerCompany_W
End Get
End Property
Public ReadOnly Property IsSubAgent() As AggregateParameter
Get
If _IsSubAgent_W Is Nothing Then
_IsSubAgent_W = TearOff.IsSubAgent
End If
Return _IsSubAgent_W
End Get
End Property
Public ReadOnly Property CustomerCompanyID() As AggregateParameter
Get
If _CustomerCompanyID_W Is Nothing Then
_CustomerCompanyID_W = TearOff.CustomerCompanyID
End If
Return _CustomerCompanyID_W
End Get
End Property
Public ReadOnly Property ReservationID() As AggregateParameter
Get
If _ReservationID_W Is Nothing Then
_ReservationID_W = TearOff.ReservationID
End If
Return _ReservationID_W
End Get
End Property
Public ReadOnly Property CreateBy() As AggregateParameter
Get
If _CreateBy_W Is Nothing Then
_CreateBy_W = TearOff.CreateBy
End If
Return _CreateBy_W
End Get
End Property
Public ReadOnly Property CreateDate() As AggregateParameter
Get
If _CreateDate_W Is Nothing Then
_CreateDate_W = TearOff.CreateDate
End If
Return _CreateDate_W
End Get
End Property
Public ReadOnly Property UpdateBy() As AggregateParameter
Get
If _UpdateBy_W Is Nothing Then
_UpdateBy_W = TearOff.UpdateBy
End If
Return _UpdateBy_W
End Get
End Property
Public ReadOnly Property UpdateDate() As AggregateParameter
Get
If _UpdateDate_W Is Nothing Then
_UpdateDate_W = TearOff.UpdateDate
End If
Return _UpdateDate_W
End Get
End Property
Public ReadOnly Property IsFavorites() As AggregateParameter
Get
If _IsFavorites_W Is Nothing Then
_IsFavorites_W = TearOff.IsFavorites
End If
Return _IsFavorites_W
End Get
End Property
Public ReadOnly Property IsWebsite() As AggregateParameter
Get
If _IsWebsite_W Is Nothing Then
_IsWebsite_W = TearOff.IsWebsite
End If
Return _IsWebsite_W
End Get
End Property
Public ReadOnly Property CommentUnread() As AggregateParameter
Get
If _CommentUnread_W Is Nothing Then
_CommentUnread_W = TearOff.CommentUnread
End If
Return _CommentUnread_W
End Get
End Property
Public ReadOnly Property TypeBooking() As AggregateParameter
Get
If _TypeBooking_W Is Nothing Then
_TypeBooking_W = TearOff.TypeBooking
End If
Return _TypeBooking_W
End Get
End Property
Public ReadOnly Property APIKey() As AggregateParameter
Get
If _APIKey_W Is Nothing Then
_APIKey_W = TearOff.APIKey
End If
Return _APIKey_W
End Get
End Property
Public ReadOnly Property Remark() As AggregateParameter
Get
If _Remark_W Is Nothing Then
_Remark_W = TearOff.Remark
End If
Return _Remark_W
End Get
End Property
Public ReadOnly Property AssignReservationID() As AggregateParameter
Get
If _AssignReservationID_W Is Nothing Then
_AssignReservationID_W = TearOff.AssignReservationID
End If
Return _AssignReservationID_W
End Get
End Property
Public ReadOnly Property AssingBookingReservationID() As AggregateParameter
Get
If _AssingBookingReservationID_W Is Nothing Then
_AssingBookingReservationID_W = TearOff.AssingBookingReservationID
End If
Return _AssingBookingReservationID_W
End Get
End Property
Public ReadOnly Property ContactSupplier() As AggregateParameter
Get
If _ContactSupplier_W Is Nothing Then
_ContactSupplier_W = TearOff.ContactSupplier
End If
Return _ContactSupplier_W
End Get
End Property
Public ReadOnly Property RefBookingSupplier() As AggregateParameter
Get
If _RefBookingSupplier_W Is Nothing Then
_RefBookingSupplier_W = TearOff.RefBookingSupplier
End If
Return _RefBookingSupplier_W
End Get
End Property
Private _MainBookingID_W As AggregateParameter = Nothing
Private _AgentID_Owner_W As AggregateParameter = Nothing
Private _PNRCode_W As AggregateParameter = Nothing
Private _ParentID_W As AggregateParameter = Nothing
Private _ContactID_W As AggregateParameter = Nothing
Private _IsCustomerCompany_W As AggregateParameter = Nothing
Private _IsSubAgent_W As AggregateParameter = Nothing
Private _CustomerCompanyID_W As AggregateParameter = Nothing
Private _ReservationID_W As AggregateParameter = Nothing
Private _CreateBy_W As AggregateParameter = Nothing
Private _CreateDate_W As AggregateParameter = Nothing
Private _UpdateBy_W As AggregateParameter = Nothing
Private _UpdateDate_W As AggregateParameter = Nothing
Private _IsFavorites_W As AggregateParameter = Nothing
Private _IsWebsite_W As AggregateParameter = Nothing
Private _CommentUnread_W As AggregateParameter = Nothing
Private _TypeBooking_W As AggregateParameter = Nothing
Private _APIKey_W As AggregateParameter = Nothing
Private _Remark_W As AggregateParameter = Nothing
Private _AssignReservationID_W As AggregateParameter = Nothing
Private _AssingBookingReservationID_W As AggregateParameter = Nothing
Private _ContactSupplier_W As AggregateParameter = Nothing
Private _RefBookingSupplier_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_MainBookingID_W = Nothing
_AgentID_Owner_W = Nothing
_PNRCode_W = Nothing
_ParentID_W = Nothing
_ContactID_W = Nothing
_IsCustomerCompany_W = Nothing
_IsSubAgent_W = Nothing
_CustomerCompanyID_W = Nothing
_ReservationID_W = Nothing
_CreateBy_W = Nothing
_CreateDate_W = Nothing
_UpdateBy_W = Nothing
_UpdateDate_W = Nothing
_IsFavorites_W = Nothing
_IsWebsite_W = Nothing
_CommentUnread_W = Nothing
_TypeBooking_W = Nothing
_APIKey_W = Nothing
_Remark_W = Nothing
_AssignReservationID_W = Nothing
_AssingBookingReservationID_W = Nothing
_ContactSupplier_W = Nothing
_RefBookingSupplier_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MainBookingInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.MainBookingID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MainBookingUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MainBookingDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.MainBookingID)
p.SourceColumn = ColumnNames.MainBookingID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.MainBookingID)
p.SourceColumn = ColumnNames.MainBookingID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.AgentID_Owner)
p.SourceColumn = ColumnNames.AgentID_Owner
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.PNRCode)
p.SourceColumn = ColumnNames.PNRCode
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ParentID)
p.SourceColumn = ColumnNames.ParentID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ContactID)
p.SourceColumn = ColumnNames.ContactID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsCustomerCompany)
p.SourceColumn = ColumnNames.IsCustomerCompany
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsSubAgent)
p.SourceColumn = ColumnNames.IsSubAgent
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CustomerCompanyID)
p.SourceColumn = ColumnNames.CustomerCompanyID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ReservationID)
p.SourceColumn = ColumnNames.ReservationID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CreateBy)
p.SourceColumn = ColumnNames.CreateBy
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CreateDate)
p.SourceColumn = ColumnNames.CreateDate
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UpdateBy)
p.SourceColumn = ColumnNames.UpdateBy
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UpdateDate)
p.SourceColumn = ColumnNames.UpdateDate
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsFavorites)
p.SourceColumn = ColumnNames.IsFavorites
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsWebsite)
p.SourceColumn = ColumnNames.IsWebsite
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CommentUnread)
p.SourceColumn = ColumnNames.CommentUnread
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.TypeBooking)
p.SourceColumn = ColumnNames.TypeBooking
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.APIKey)
p.SourceColumn = ColumnNames.APIKey
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Remark)
p.SourceColumn = ColumnNames.Remark
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.AssignReservationID)
p.SourceColumn = ColumnNames.AssignReservationID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.AssingBookingReservationID)
p.SourceColumn = ColumnNames.AssingBookingReservationID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ContactSupplier)
p.SourceColumn = ColumnNames.ContactSupplier
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.RefBookingSupplier)
p.SourceColumn = ColumnNames.RefBookingSupplier
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
'oliuy
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
NameSpace MushroomTravel
Public MustInherit Class _Member
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "Member"
Me.MappingName = "Member"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_MemberLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal MemberID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_Member.Parameters.MemberID, MemberID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_MemberLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property MemberID As SqlParameter
Get
Return New SqlParameter("@MemberID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property RoleID As SqlParameter
Get
Return New SqlParameter("@RoleID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property FNameTH As SqlParameter
Get
Return New SqlParameter("@FNameTH", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property FNameEN As SqlParameter
Get
Return New SqlParameter("@FNameEN", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property LNameTH As SqlParameter
Get
Return New SqlParameter("@LNameTH", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property LNameEN As SqlParameter
Get
Return New SqlParameter("@LNameEN", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Birthday As SqlParameter
Get
Return New SqlParameter("@Birthday", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property Sex As SqlParameter
Get
Return New SqlParameter("@Sex", SqlDbType.VarChar, 20)
End Get
End Property
Public Shared ReadOnly Property Mobile As SqlParameter
Get
Return New SqlParameter("@Mobile", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Email As SqlParameter
Get
Return New SqlParameter("@Email", SqlDbType.VarChar, 100)
End Get
End Property
Public Shared ReadOnly Property Address As SqlParameter
Get
Return New SqlParameter("@Address", SqlDbType.VarChar, 70)
End Get
End Property
Public Shared ReadOnly Property CompanyName As SqlParameter
Get
Return New SqlParameter("@CompanyName", SqlDbType.VarChar, 100)
End Get
End Property
Public Shared ReadOnly Property Position As SqlParameter
Get
Return New SqlParameter("@Position", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Other As SqlParameter
Get
Return New SqlParameter("@Other", SqlDbType.VarChar, 2147483647)
End Get
End Property
Public Shared ReadOnly Property IsAcitive As SqlParameter
Get
Return New SqlParameter("@IsAcitive", SqlDbType.Bit, 0)
End Get
End Property
Public Shared ReadOnly Property UpdateDate As SqlParameter
Get
Return New SqlParameter("@UpdateDate", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property UpdateBy As SqlParameter
Get
Return New SqlParameter("@UpdateBy", SqlDbType.VarChar, 100)
End Get
End Property
Public Shared ReadOnly Property ColStatus As SqlParameter
Get
Return New SqlParameter("@ColStatus", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property Religious As SqlParameter
Get
Return New SqlParameter("@Religious", SqlDbType.VarChar, 100)
End Get
End Property
Public Shared ReadOnly Property Natinality As SqlParameter
Get
Return New SqlParameter("@Natinality", SqlDbType.VarChar, 100)
End Get
End Property
Public Shared ReadOnly Property Education As SqlParameter
Get
Return New SqlParameter("@Education", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property Occupation As SqlParameter
Get
Return New SqlParameter("@Occupation", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property Income As SqlParameter
Get
Return New SqlParameter("@Income", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property InformationMediaKey As SqlParameter
Get
Return New SqlParameter("@InformationMediaKey", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property InformationMedia As SqlParameter
Get
Return New SqlParameter("@InformationMedia", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property Tourismplace As SqlParameter
Get
Return New SqlParameter("@Tourismplace", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property Budget As SqlParameter
Get
Return New SqlParameter("@Budget", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property CodeCustomer As SqlParameter
Get
Return New SqlParameter("@CodeCustomer", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property RegisDate As SqlParameter
Get
Return New SqlParameter("@RegisDate", SqlDbType.DateTime, 0)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const MemberID As String = "MemberID"
Public Const RoleID As String = "RoleID"
Public Const FNameTH As String = "FNameTH"
Public Const FNameEN As String = "FNameEN"
Public Const LNameTH As String = "LNameTH"
Public Const LNameEN As String = "LNameEN"
Public Const Birthday As String = "Birthday"
Public Const Sex As String = "Sex"
Public Const Mobile As String = "Mobile"
Public Const Email As String = "Email"
Public Const Address As String = "Address"
Public Const CompanyName As String = "CompanyName"
Public Const Position As String = "Position"
Public Const Other As String = "Other"
Public Const IsAcitive As String = "IsAcitive"
Public Const UpdateDate As String = "UpdateDate"
Public Const UpdateBy As String = "UpdateBy"
Public Const ColStatus As String = "ColStatus"
Public Const Religious As String = "Religious"
Public Const Natinality As String = "Natinality"
Public Const Education As String = "Education"
Public Const Occupation As String = "Occupation"
Public Const Income As String = "Income"
Public Const InformationMediaKey As String = "InformationMediaKey"
Public Const InformationMedia As String = "InformationMedia"
Public Const Tourismplace As String = "Tourismplace"
Public Const Budget As String = "Budget"
Public Const CodeCustomer As String = "CodeCustomer"
Public Const RegisDate As String = "RegisDate"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(MemberID) = _Member.PropertyNames.MemberID
ht(RoleID) = _Member.PropertyNames.RoleID
ht(FNameTH) = _Member.PropertyNames.FNameTH
ht(FNameEN) = _Member.PropertyNames.FNameEN
ht(LNameTH) = _Member.PropertyNames.LNameTH
ht(LNameEN) = _Member.PropertyNames.LNameEN
ht(Birthday) = _Member.PropertyNames.Birthday
ht(Sex) = _Member.PropertyNames.Sex
ht(Mobile) = _Member.PropertyNames.Mobile
ht(Email) = _Member.PropertyNames.Email
ht(Address) = _Member.PropertyNames.Address
ht(CompanyName) = _Member.PropertyNames.CompanyName
ht(Position) = _Member.PropertyNames.Position
ht(Other) = _Member.PropertyNames.Other
ht(IsAcitive) = _Member.PropertyNames.IsAcitive
ht(UpdateDate) = _Member.PropertyNames.UpdateDate
ht(UpdateBy) = _Member.PropertyNames.UpdateBy
ht(ColStatus) = _Member.PropertyNames.ColStatus
ht(Religious) = _Member.PropertyNames.Religious
ht(Natinality) = _Member.PropertyNames.Natinality
ht(Education) = _Member.PropertyNames.Education
ht(Occupation) = _Member.PropertyNames.Occupation
ht(Income) = _Member.PropertyNames.Income
ht(InformationMediaKey) = _Member.PropertyNames.InformationMediaKey
ht(InformationMedia) = _Member.PropertyNames.InformationMedia
ht(Tourismplace) = _Member.PropertyNames.Tourismplace
ht(Budget) = _Member.PropertyNames.Budget
ht(CodeCustomer) = _Member.PropertyNames.CodeCustomer
ht(RegisDate) = _Member.PropertyNames.RegisDate
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const MemberID As String = "MemberID"
Public Const RoleID As String = "RoleID"
Public Const FNameTH As String = "FNameTH"
Public Const FNameEN As String = "FNameEN"
Public Const LNameTH As String = "LNameTH"
Public Const LNameEN As String = "LNameEN"
Public Const Birthday As String = "Birthday"
Public Const Sex As String = "Sex"
Public Const Mobile As String = "Mobile"
Public Const Email As String = "Email"
Public Const Address As String = "Address"
Public Const CompanyName As String = "CompanyName"
Public Const Position As String = "Position"
Public Const Other As String = "Other"
Public Const IsAcitive As String = "IsAcitive"
Public Const UpdateDate As String = "UpdateDate"
Public Const UpdateBy As String = "UpdateBy"
Public Const ColStatus As String = "ColStatus"
Public Const Religious As String = "Religious"
Public Const Natinality As String = "Natinality"
Public Const Education As String = "Education"
Public Const Occupation As String = "Occupation"
Public Const Income As String = "Income"
Public Const InformationMediaKey As String = "InformationMediaKey"
Public Const InformationMedia As String = "InformationMedia"
Public Const Tourismplace As String = "Tourismplace"
Public Const Budget As String = "Budget"
Public Const CodeCustomer As String = "CodeCustomer"
Public Const RegisDate As String = "RegisDate"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(MemberID) = _Member.ColumnNames.MemberID
ht(RoleID) = _Member.ColumnNames.RoleID
ht(FNameTH) = _Member.ColumnNames.FNameTH
ht(FNameEN) = _Member.ColumnNames.FNameEN
ht(LNameTH) = _Member.ColumnNames.LNameTH
ht(LNameEN) = _Member.ColumnNames.LNameEN
ht(Birthday) = _Member.ColumnNames.Birthday
ht(Sex) = _Member.ColumnNames.Sex
ht(Mobile) = _Member.ColumnNames.Mobile
ht(Email) = _Member.ColumnNames.Email
ht(Address) = _Member.ColumnNames.Address
ht(CompanyName) = _Member.ColumnNames.CompanyName
ht(Position) = _Member.ColumnNames.Position
ht(Other) = _Member.ColumnNames.Other
ht(IsAcitive) = _Member.ColumnNames.IsAcitive
ht(UpdateDate) = _Member.ColumnNames.UpdateDate
ht(UpdateBy) = _Member.ColumnNames.UpdateBy
ht(ColStatus) = _Member.ColumnNames.ColStatus
ht(Religious) = _Member.ColumnNames.Religious
ht(Natinality) = _Member.ColumnNames.Natinality
ht(Education) = _Member.ColumnNames.Education
ht(Occupation) = _Member.ColumnNames.Occupation
ht(Income) = _Member.ColumnNames.Income
ht(InformationMediaKey) = _Member.ColumnNames.InformationMediaKey
ht(InformationMedia) = _Member.ColumnNames.InformationMedia
ht(Tourismplace) = _Member.ColumnNames.Tourismplace
ht(Budget) = _Member.ColumnNames.Budget
ht(CodeCustomer) = _Member.ColumnNames.CodeCustomer
ht(RegisDate) = _Member.ColumnNames.RegisDate
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const MemberID As String = "s_MemberID"
Public Const RoleID As String = "s_RoleID"
Public Const FNameTH As String = "s_FNameTH"
Public Const FNameEN As String = "s_FNameEN"
Public Const LNameTH As String = "s_LNameTH"
Public Const LNameEN As String = "s_LNameEN"
Public Const Birthday As String = "s_Birthday"
Public Const Sex As String = "s_Sex"
Public Const Mobile As String = "s_Mobile"
Public Const Email As String = "s_Email"
Public Const Address As String = "s_Address"
Public Const CompanyName As String = "s_CompanyName"
Public Const Position As String = "s_Position"
Public Const Other As String = "s_Other"
Public Const IsAcitive As String = "s_IsAcitive"
Public Const UpdateDate As String = "s_UpdateDate"
Public Const UpdateBy As String = "s_UpdateBy"
Public Const ColStatus As String = "s_ColStatus"
Public Const Religious As String = "s_Religious"
Public Const Natinality As String = "s_Natinality"
Public Const Education As String = "s_Education"
Public Const Occupation As String = "s_Occupation"
Public Const Income As String = "s_Income"
Public Const InformationMediaKey As String = "s_InformationMediaKey"
Public Const InformationMedia As String = "s_InformationMedia"
Public Const Tourismplace As String = "s_Tourismplace"
Public Const Budget As String = "s_Budget"
Public Const CodeCustomer As String = "s_CodeCustomer"
Public Const RegisDate As String = "s_RegisDate"
End Class
#End Region
#Region "Properties"
Public Overridable Property MemberID As Integer
Get
Return MyBase.GetInteger(ColumnNames.MemberID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.MemberID, Value)
End Set
End Property
Public Overridable Property RoleID As Integer
Get
Return MyBase.GetInteger(ColumnNames.RoleID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.RoleID, Value)
End Set
End Property
Public Overridable Property FNameTH As String
Get
Return MyBase.GetString(ColumnNames.FNameTH)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.FNameTH, Value)
End Set
End Property
Public Overridable Property FNameEN As String
Get
Return MyBase.GetString(ColumnNames.FNameEN)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.FNameEN, Value)
End Set
End Property
Public Overridable Property LNameTH As String
Get
Return MyBase.GetString(ColumnNames.LNameTH)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.LNameTH, Value)
End Set
End Property
Public Overridable Property LNameEN As String
Get
Return MyBase.GetString(ColumnNames.LNameEN)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.LNameEN, Value)
End Set
End Property
Public Overridable Property Birthday As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.Birthday)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.Birthday, Value)
End Set
End Property
Public Overridable Property Sex As String
Get
Return MyBase.GetString(ColumnNames.Sex)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Sex, Value)
End Set
End Property
Public Overridable Property Mobile As String
Get
Return MyBase.GetString(ColumnNames.Mobile)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Mobile, Value)
End Set
End Property
Public Overridable Property Email As String
Get
Return MyBase.GetString(ColumnNames.Email)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Email, Value)
End Set
End Property
Public Overridable Property Address As String
Get
Return MyBase.GetString(ColumnNames.Address)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Address, Value)
End Set
End Property
Public Overridable Property CompanyName As String
Get
Return MyBase.GetString(ColumnNames.CompanyName)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.CompanyName, Value)
End Set
End Property
Public Overridable Property Position As String
Get
Return MyBase.GetString(ColumnNames.Position)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Position, Value)
End Set
End Property
Public Overridable Property Other As String
Get
Return MyBase.GetString(ColumnNames.Other)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Other, Value)
End Set
End Property
Public Overridable Property IsAcitive As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsAcitive)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsAcitive, Value)
End Set
End Property
Public Overridable Property UpdateDate As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.UpdateDate)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.UpdateDate, Value)
End Set
End Property
Public Overridable Property UpdateBy As String
Get
Return MyBase.GetString(ColumnNames.UpdateBy)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.UpdateBy, Value)
End Set
End Property
Public Overridable Property ColStatus As String
Get
Return MyBase.GetString(ColumnNames.ColStatus)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.ColStatus, Value)
End Set
End Property
Public Overridable Property Religious As String
Get
Return MyBase.GetString(ColumnNames.Religious)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Religious, Value)
End Set
End Property
Public Overridable Property Natinality As String
Get
Return MyBase.GetString(ColumnNames.Natinality)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Natinality, Value)
End Set
End Property
Public Overridable Property Education As String
Get
Return MyBase.GetString(ColumnNames.Education)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Education, Value)
End Set
End Property
Public Overridable Property Occupation As String
Get
Return MyBase.GetString(ColumnNames.Occupation)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Occupation, Value)
End Set
End Property
Public Overridable Property Income As String
Get
Return MyBase.GetString(ColumnNames.Income)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Income, Value)
End Set
End Property
Public Overridable Property InformationMediaKey As String
Get
Return MyBase.GetString(ColumnNames.InformationMediaKey)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.InformationMediaKey, Value)
End Set
End Property
Public Overridable Property InformationMedia As String
Get
Return MyBase.GetString(ColumnNames.InformationMedia)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.InformationMedia, Value)
End Set
End Property
Public Overridable Property Tourismplace As String
Get
Return MyBase.GetString(ColumnNames.Tourismplace)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Tourismplace, Value)
End Set
End Property
Public Overridable Property Budget As String
Get
Return MyBase.GetString(ColumnNames.Budget)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.Budget, Value)
End Set
End Property
Public Overridable Property CodeCustomer As String
Get
Return MyBase.GetString(ColumnNames.CodeCustomer)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.CodeCustomer, Value)
End Set
End Property
Public Overridable Property RegisDate As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.RegisDate)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.RegisDate, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_MemberID As String
Get
If Me.IsColumnNull(ColumnNames.MemberID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.MemberID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.MemberID)
Else
Me.MemberID = MyBase.SetIntegerAsString(ColumnNames.MemberID, Value)
End If
End Set
End Property
Public Overridable Property s_RoleID As String
Get
If Me.IsColumnNull(ColumnNames.RoleID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.RoleID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.RoleID)
Else
Me.RoleID = MyBase.SetIntegerAsString(ColumnNames.RoleID, Value)
End If
End Set
End Property
Public Overridable Property s_FNameTH As String
Get
If Me.IsColumnNull(ColumnNames.FNameTH) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.FNameTH)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.FNameTH)
Else
Me.FNameTH = MyBase.SetStringAsString(ColumnNames.FNameTH, Value)
End If
End Set
End Property
Public Overridable Property s_FNameEN As String
Get
If Me.IsColumnNull(ColumnNames.FNameEN) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.FNameEN)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.FNameEN)
Else
Me.FNameEN = MyBase.SetStringAsString(ColumnNames.FNameEN, Value)
End If
End Set
End Property
Public Overridable Property s_LNameTH As String
Get
If Me.IsColumnNull(ColumnNames.LNameTH) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.LNameTH)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.LNameTH)
Else
Me.LNameTH = MyBase.SetStringAsString(ColumnNames.LNameTH, Value)
End If
End Set
End Property
Public Overridable Property s_LNameEN As String
Get
If Me.IsColumnNull(ColumnNames.LNameEN) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.LNameEN)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.LNameEN)
Else
Me.LNameEN = MyBase.SetStringAsString(ColumnNames.LNameEN, Value)
End If
End Set
End Property
Public Overridable Property s_Birthday As String
Get
If Me.IsColumnNull(ColumnNames.Birthday) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.Birthday)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Birthday)
Else
Me.Birthday = MyBase.SetDateTimeAsString(ColumnNames.Birthday, Value)
End If
End Set
End Property
Public Overridable Property s_Sex As String
Get
If Me.IsColumnNull(ColumnNames.Sex) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Sex)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Sex)
Else
Me.Sex = MyBase.SetStringAsString(ColumnNames.Sex, Value)
End If
End Set
End Property
Public Overridable Property s_Mobile As String
Get
If Me.IsColumnNull(ColumnNames.Mobile) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Mobile)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Mobile)
Else
Me.Mobile = MyBase.SetStringAsString(ColumnNames.Mobile, Value)
End If
End Set
End Property
Public Overridable Property s_Email As String
Get
If Me.IsColumnNull(ColumnNames.Email) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Email)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Email)
Else
Me.Email = MyBase.SetStringAsString(ColumnNames.Email, Value)
End If
End Set
End Property
Public Overridable Property s_Address As String
Get
If Me.IsColumnNull(ColumnNames.Address) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Address)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Address)
Else
Me.Address = MyBase.SetStringAsString(ColumnNames.Address, Value)
End If
End Set
End Property
Public Overridable Property s_CompanyName As String
Get
If Me.IsColumnNull(ColumnNames.CompanyName) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.CompanyName)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CompanyName)
Else
Me.CompanyName = MyBase.SetStringAsString(ColumnNames.CompanyName, Value)
End If
End Set
End Property
Public Overridable Property s_Position As String
Get
If Me.IsColumnNull(ColumnNames.Position) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Position)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Position)
Else
Me.Position = MyBase.SetStringAsString(ColumnNames.Position, Value)
End If
End Set
End Property
Public Overridable Property s_Other As String
Get
If Me.IsColumnNull(ColumnNames.Other) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Other)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Other)
Else
Me.Other = MyBase.SetStringAsString(ColumnNames.Other, Value)
End If
End Set
End Property
Public Overridable Property s_IsAcitive As String
Get
If Me.IsColumnNull(ColumnNames.IsAcitive) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsAcitive)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsAcitive)
Else
Me.IsAcitive = MyBase.SetBooleanAsString(ColumnNames.IsAcitive, Value)
End If
End Set
End Property
Public Overridable Property s_UpdateDate As String
Get
If Me.IsColumnNull(ColumnNames.UpdateDate) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.UpdateDate)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UpdateDate)
Else
Me.UpdateDate = MyBase.SetDateTimeAsString(ColumnNames.UpdateDate, Value)
End If
End Set
End Property
Public Overridable Property s_UpdateBy As String
Get
If Me.IsColumnNull(ColumnNames.UpdateBy) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.UpdateBy)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.UpdateBy)
Else
Me.UpdateBy = MyBase.SetStringAsString(ColumnNames.UpdateBy, Value)
End If
End Set
End Property
Public Overridable Property s_ColStatus As String
Get
If Me.IsColumnNull(ColumnNames.ColStatus) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.ColStatus)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ColStatus)
Else
Me.ColStatus = MyBase.SetStringAsString(ColumnNames.ColStatus, Value)
End If
End Set
End Property
Public Overridable Property s_Religious As String
Get
If Me.IsColumnNull(ColumnNames.Religious) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Religious)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Religious)
Else
Me.Religious = MyBase.SetStringAsString(ColumnNames.Religious, Value)
End If
End Set
End Property
Public Overridable Property s_Natinality As String
Get
If Me.IsColumnNull(ColumnNames.Natinality) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Natinality)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Natinality)
Else
Me.Natinality = MyBase.SetStringAsString(ColumnNames.Natinality, Value)
End If
End Set
End Property
Public Overridable Property s_Education As String
Get
If Me.IsColumnNull(ColumnNames.Education) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Education)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Education)
Else
Me.Education = MyBase.SetStringAsString(ColumnNames.Education, Value)
End If
End Set
End Property
Public Overridable Property s_Occupation As String
Get
If Me.IsColumnNull(ColumnNames.Occupation) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Occupation)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Occupation)
Else
Me.Occupation = MyBase.SetStringAsString(ColumnNames.Occupation, Value)
End If
End Set
End Property
Public Overridable Property s_Income As String
Get
If Me.IsColumnNull(ColumnNames.Income) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Income)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Income)
Else
Me.Income = MyBase.SetStringAsString(ColumnNames.Income, Value)
End If
End Set
End Property
Public Overridable Property s_InformationMediaKey As String
Get
If Me.IsColumnNull(ColumnNames.InformationMediaKey) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.InformationMediaKey)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.InformationMediaKey)
Else
Me.InformationMediaKey = MyBase.SetStringAsString(ColumnNames.InformationMediaKey, Value)
End If
End Set
End Property
Public Overridable Property s_InformationMedia As String
Get
If Me.IsColumnNull(ColumnNames.InformationMedia) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.InformationMedia)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.InformationMedia)
Else
Me.InformationMedia = MyBase.SetStringAsString(ColumnNames.InformationMedia, Value)
End If
End Set
End Property
Public Overridable Property s_Tourismplace As String
Get
If Me.IsColumnNull(ColumnNames.Tourismplace) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Tourismplace)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Tourismplace)
Else
Me.Tourismplace = MyBase.SetStringAsString(ColumnNames.Tourismplace, Value)
End If
End Set
End Property
Public Overridable Property s_Budget As String
Get
If Me.IsColumnNull(ColumnNames.Budget) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.Budget)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.Budget)
Else
Me.Budget = MyBase.SetStringAsString(ColumnNames.Budget, Value)
End If
End Set
End Property
Public Overridable Property s_CodeCustomer As String
Get
If Me.IsColumnNull(ColumnNames.CodeCustomer) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.CodeCustomer)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.CodeCustomer)
Else
Me.CodeCustomer = MyBase.SetStringAsString(ColumnNames.CodeCustomer, Value)
End If
End Set
End Property
Public Overridable Property s_RegisDate As String
Get
If Me.IsColumnNull(ColumnNames.RegisDate) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.RegisDate)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.RegisDate)
Else
Me.RegisDate = MyBase.SetDateTimeAsString(ColumnNames.RegisDate, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property MemberID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.MemberID, Parameters.MemberID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property RoleID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.RoleID, Parameters.RoleID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property FNameTH() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.FNameTH, Parameters.FNameTH)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property FNameEN() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.FNameEN, Parameters.FNameEN)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property LNameTH() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.LNameTH, Parameters.LNameTH)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property LNameEN() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.LNameEN, Parameters.LNameEN)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Birthday() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Birthday, Parameters.Birthday)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Sex() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Sex, Parameters.Sex)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Mobile() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Mobile, Parameters.Mobile)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Email() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Email, Parameters.Email)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Address() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Address, Parameters.Address)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CompanyName() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CompanyName, Parameters.CompanyName)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Position() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Position, Parameters.Position)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Other() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Other, Parameters.Other)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsAcitive() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsAcitive, Parameters.IsAcitive)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateDate() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UpdateDate, Parameters.UpdateDate)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateBy() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.UpdateBy, Parameters.UpdateBy)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ColStatus() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ColStatus, Parameters.ColStatus)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Religious() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Religious, Parameters.Religious)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Natinality() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Natinality, Parameters.Natinality)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Education() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Education, Parameters.Education)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Occupation() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Occupation, Parameters.Occupation)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Income() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Income, Parameters.Income)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property InformationMediaKey() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.InformationMediaKey, Parameters.InformationMediaKey)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property InformationMedia() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.InformationMedia, Parameters.InformationMedia)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Tourismplace() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Tourismplace, Parameters.Tourismplace)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property Budget() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.Budget, Parameters.Budget)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property CodeCustomer() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.CodeCustomer, Parameters.CodeCustomer)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property RegisDate() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.RegisDate, Parameters.RegisDate)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property MemberID() As WhereParameter
Get
If _MemberID_W Is Nothing Then
_MemberID_W = TearOff.MemberID
End If
Return _MemberID_W
End Get
End Property
Public ReadOnly Property RoleID() As WhereParameter
Get
If _RoleID_W Is Nothing Then
_RoleID_W = TearOff.RoleID
End If
Return _RoleID_W
End Get
End Property
Public ReadOnly Property FNameTH() As WhereParameter
Get
If _FNameTH_W Is Nothing Then
_FNameTH_W = TearOff.FNameTH
End If
Return _FNameTH_W
End Get
End Property
Public ReadOnly Property FNameEN() As WhereParameter
Get
If _FNameEN_W Is Nothing Then
_FNameEN_W = TearOff.FNameEN
End If
Return _FNameEN_W
End Get
End Property
Public ReadOnly Property LNameTH() As WhereParameter
Get
If _LNameTH_W Is Nothing Then
_LNameTH_W = TearOff.LNameTH
End If
Return _LNameTH_W
End Get
End Property
Public ReadOnly Property LNameEN() As WhereParameter
Get
If _LNameEN_W Is Nothing Then
_LNameEN_W = TearOff.LNameEN
End If
Return _LNameEN_W
End Get
End Property
Public ReadOnly Property Birthday() As WhereParameter
Get
If _Birthday_W Is Nothing Then
_Birthday_W = TearOff.Birthday
End If
Return _Birthday_W
End Get
End Property
Public ReadOnly Property Sex() As WhereParameter
Get
If _Sex_W Is Nothing Then
_Sex_W = TearOff.Sex
End If
Return _Sex_W
End Get
End Property
Public ReadOnly Property Mobile() As WhereParameter
Get
If _Mobile_W Is Nothing Then
_Mobile_W = TearOff.Mobile
End If
Return _Mobile_W
End Get
End Property
Public ReadOnly Property Email() As WhereParameter
Get
If _Email_W Is Nothing Then
_Email_W = TearOff.Email
End If
Return _Email_W
End Get
End Property
Public ReadOnly Property Address() As WhereParameter
Get
If _Address_W Is Nothing Then
_Address_W = TearOff.Address
End If
Return _Address_W
End Get
End Property
Public ReadOnly Property CompanyName() As WhereParameter
Get
If _CompanyName_W Is Nothing Then
_CompanyName_W = TearOff.CompanyName
End If
Return _CompanyName_W
End Get
End Property
Public ReadOnly Property Position() As WhereParameter
Get
If _Position_W Is Nothing Then
_Position_W = TearOff.Position
End If
Return _Position_W
End Get
End Property
Public ReadOnly Property Other() As WhereParameter
Get
If _Other_W Is Nothing Then
_Other_W = TearOff.Other
End If
Return _Other_W
End Get
End Property
Public ReadOnly Property IsAcitive() As WhereParameter
Get
If _IsAcitive_W Is Nothing Then
_IsAcitive_W = TearOff.IsAcitive
End If
Return _IsAcitive_W
End Get
End Property
Public ReadOnly Property UpdateDate() As WhereParameter
Get
If _UpdateDate_W Is Nothing Then
_UpdateDate_W = TearOff.UpdateDate
End If
Return _UpdateDate_W
End Get
End Property
Public ReadOnly Property UpdateBy() As WhereParameter
Get
If _UpdateBy_W Is Nothing Then
_UpdateBy_W = TearOff.UpdateBy
End If
Return _UpdateBy_W
End Get
End Property
Public ReadOnly Property ColStatus() As WhereParameter
Get
If _ColStatus_W Is Nothing Then
_ColStatus_W = TearOff.ColStatus
End If
Return _ColStatus_W
End Get
End Property
Public ReadOnly Property Religious() As WhereParameter
Get
If _Religious_W Is Nothing Then
_Religious_W = TearOff.Religious
End If
Return _Religious_W
End Get
End Property
Public ReadOnly Property Natinality() As WhereParameter
Get
If _Natinality_W Is Nothing Then
_Natinality_W = TearOff.Natinality
End If
Return _Natinality_W
End Get
End Property
Public ReadOnly Property Education() As WhereParameter
Get
If _Education_W Is Nothing Then
_Education_W = TearOff.Education
End If
Return _Education_W
End Get
End Property
Public ReadOnly Property Occupation() As WhereParameter
Get
If _Occupation_W Is Nothing Then
_Occupation_W = TearOff.Occupation
End If
Return _Occupation_W
End Get
End Property
Public ReadOnly Property Income() As WhereParameter
Get
If _Income_W Is Nothing Then
_Income_W = TearOff.Income
End If
Return _Income_W
End Get
End Property
Public ReadOnly Property InformationMediaKey() As WhereParameter
Get
If _InformationMediaKey_W Is Nothing Then
_InformationMediaKey_W = TearOff.InformationMediaKey
End If
Return _InformationMediaKey_W
End Get
End Property
Public ReadOnly Property InformationMedia() As WhereParameter
Get
If _InformationMedia_W Is Nothing Then
_InformationMedia_W = TearOff.InformationMedia
End If
Return _InformationMedia_W
End Get
End Property
Public ReadOnly Property Tourismplace() As WhereParameter
Get
If _Tourismplace_W Is Nothing Then
_Tourismplace_W = TearOff.Tourismplace
End If
Return _Tourismplace_W
End Get
End Property
Public ReadOnly Property Budget() As WhereParameter
Get
If _Budget_W Is Nothing Then
_Budget_W = TearOff.Budget
End If
Return _Budget_W
End Get
End Property
Public ReadOnly Property CodeCustomer() As WhereParameter
Get
If _CodeCustomer_W Is Nothing Then
_CodeCustomer_W = TearOff.CodeCustomer
End If
Return _CodeCustomer_W
End Get
End Property
Public ReadOnly Property RegisDate() As WhereParameter
Get
If _RegisDate_W Is Nothing Then
_RegisDate_W = TearOff.RegisDate
End If
Return _RegisDate_W
End Get
End Property
Private _MemberID_W As WhereParameter = Nothing
Private _RoleID_W As WhereParameter = Nothing
Private _FNameTH_W As WhereParameter = Nothing
Private _FNameEN_W As WhereParameter = Nothing
Private _LNameTH_W As WhereParameter = Nothing
Private _LNameEN_W As WhereParameter = Nothing
Private _Birthday_W As WhereParameter = Nothing
Private _Sex_W As WhereParameter = Nothing
Private _Mobile_W As WhereParameter = Nothing
Private _Email_W As WhereParameter = Nothing
Private _Address_W As WhereParameter = Nothing
Private _CompanyName_W As WhereParameter = Nothing
Private _Position_W As WhereParameter = Nothing
Private _Other_W As WhereParameter = Nothing
Private _IsAcitive_W As WhereParameter = Nothing
Private _UpdateDate_W As WhereParameter = Nothing
Private _UpdateBy_W As WhereParameter = Nothing
Private _ColStatus_W As WhereParameter = Nothing
Private _Religious_W As WhereParameter = Nothing
Private _Natinality_W As WhereParameter = Nothing
Private _Education_W As WhereParameter = Nothing
Private _Occupation_W As WhereParameter = Nothing
Private _Income_W As WhereParameter = Nothing
Private _InformationMediaKey_W As WhereParameter = Nothing
Private _InformationMedia_W As WhereParameter = Nothing
Private _Tourismplace_W As WhereParameter = Nothing
Private _Budget_W As WhereParameter = Nothing
Private _CodeCustomer_W As WhereParameter = Nothing
Private _RegisDate_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_MemberID_W = Nothing
_RoleID_W = Nothing
_FNameTH_W = Nothing
_FNameEN_W = Nothing
_LNameTH_W = Nothing
_LNameEN_W = Nothing
_Birthday_W = Nothing
_Sex_W = Nothing
_Mobile_W = Nothing
_Email_W = Nothing
_Address_W = Nothing
_CompanyName_W = Nothing
_Position_W = Nothing
_Other_W = Nothing
_IsAcitive_W = Nothing
_UpdateDate_W = Nothing
_UpdateBy_W = Nothing
_ColStatus_W = Nothing
_Religious_W = Nothing
_Natinality_W = Nothing
_Education_W = Nothing
_Occupation_W = Nothing
_Income_W = Nothing
_InformationMediaKey_W = Nothing
_InformationMedia_W = Nothing
_Tourismplace_W = Nothing
_Budget_W = Nothing
_CodeCustomer_W = Nothing
_RegisDate_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property MemberID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.MemberID, Parameters.MemberID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property RoleID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.RoleID, Parameters.RoleID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property FNameTH() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.FNameTH, Parameters.FNameTH)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property FNameEN() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.FNameEN, Parameters.FNameEN)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property LNameTH() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.LNameTH, Parameters.LNameTH)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property LNameEN() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.LNameEN, Parameters.LNameEN)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Birthday() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Birthday, Parameters.Birthday)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Sex() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Sex, Parameters.Sex)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Mobile() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Mobile, Parameters.Mobile)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Email() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Email, Parameters.Email)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Address() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Address, Parameters.Address)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CompanyName() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CompanyName, Parameters.CompanyName)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Position() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Position, Parameters.Position)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Other() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Other, Parameters.Other)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsAcitive() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsAcitive, Parameters.IsAcitive)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateDate() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UpdateDate, Parameters.UpdateDate)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property UpdateBy() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.UpdateBy, Parameters.UpdateBy)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ColStatus() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ColStatus, Parameters.ColStatus)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Religious() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Religious, Parameters.Religious)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Natinality() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Natinality, Parameters.Natinality)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Education() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Education, Parameters.Education)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Occupation() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Occupation, Parameters.Occupation)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Income() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Income, Parameters.Income)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property InformationMediaKey() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.InformationMediaKey, Parameters.InformationMediaKey)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property InformationMedia() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.InformationMedia, Parameters.InformationMedia)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Tourismplace() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Tourismplace, Parameters.Tourismplace)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property Budget() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Budget, Parameters.Budget)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property CodeCustomer() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.CodeCustomer, Parameters.CodeCustomer)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property RegisDate() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.RegisDate, Parameters.RegisDate)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property MemberID() As AggregateParameter
Get
If _MemberID_W Is Nothing Then
_MemberID_W = TearOff.MemberID
End If
Return _MemberID_W
End Get
End Property
Public ReadOnly Property RoleID() As AggregateParameter
Get
If _RoleID_W Is Nothing Then
_RoleID_W = TearOff.RoleID
End If
Return _RoleID_W
End Get
End Property
Public ReadOnly Property FNameTH() As AggregateParameter
Get
If _FNameTH_W Is Nothing Then
_FNameTH_W = TearOff.FNameTH
End If
Return _FNameTH_W
End Get
End Property
Public ReadOnly Property FNameEN() As AggregateParameter
Get
If _FNameEN_W Is Nothing Then
_FNameEN_W = TearOff.FNameEN
End If
Return _FNameEN_W
End Get
End Property
Public ReadOnly Property LNameTH() As AggregateParameter
Get
If _LNameTH_W Is Nothing Then
_LNameTH_W = TearOff.LNameTH
End If
Return _LNameTH_W
End Get
End Property
Public ReadOnly Property LNameEN() As AggregateParameter
Get
If _LNameEN_W Is Nothing Then
_LNameEN_W = TearOff.LNameEN
End If
Return _LNameEN_W
End Get
End Property
Public ReadOnly Property Birthday() As AggregateParameter
Get
If _Birthday_W Is Nothing Then
_Birthday_W = TearOff.Birthday
End If
Return _Birthday_W
End Get
End Property
Public ReadOnly Property Sex() As AggregateParameter
Get
If _Sex_W Is Nothing Then
_Sex_W = TearOff.Sex
End If
Return _Sex_W
End Get
End Property
Public ReadOnly Property Mobile() As AggregateParameter
Get
If _Mobile_W Is Nothing Then
_Mobile_W = TearOff.Mobile
End If
Return _Mobile_W
End Get
End Property
Public ReadOnly Property Email() As AggregateParameter
Get
If _Email_W Is Nothing Then
_Email_W = TearOff.Email
End If
Return _Email_W
End Get
End Property
Public ReadOnly Property Address() As AggregateParameter
Get
If _Address_W Is Nothing Then
_Address_W = TearOff.Address
End If
Return _Address_W
End Get
End Property
Public ReadOnly Property CompanyName() As AggregateParameter
Get
If _CompanyName_W Is Nothing Then
_CompanyName_W = TearOff.CompanyName
End If
Return _CompanyName_W
End Get
End Property
Public ReadOnly Property Position() As AggregateParameter
Get
If _Position_W Is Nothing Then
_Position_W = TearOff.Position
End If
Return _Position_W
End Get
End Property
Public ReadOnly Property Other() As AggregateParameter
Get
If _Other_W Is Nothing Then
_Other_W = TearOff.Other
End If
Return _Other_W
End Get
End Property
Public ReadOnly Property IsAcitive() As AggregateParameter
Get
If _IsAcitive_W Is Nothing Then
_IsAcitive_W = TearOff.IsAcitive
End If
Return _IsAcitive_W
End Get
End Property
Public ReadOnly Property UpdateDate() As AggregateParameter
Get
If _UpdateDate_W Is Nothing Then
_UpdateDate_W = TearOff.UpdateDate
End If
Return _UpdateDate_W
End Get
End Property
Public ReadOnly Property UpdateBy() As AggregateParameter
Get
If _UpdateBy_W Is Nothing Then
_UpdateBy_W = TearOff.UpdateBy
End If
Return _UpdateBy_W
End Get
End Property
Public ReadOnly Property ColStatus() As AggregateParameter
Get
If _ColStatus_W Is Nothing Then
_ColStatus_W = TearOff.ColStatus
End If
Return _ColStatus_W
End Get
End Property
Public ReadOnly Property Religious() As AggregateParameter
Get
If _Religious_W Is Nothing Then
_Religious_W = TearOff.Religious
End If
Return _Religious_W
End Get
End Property
Public ReadOnly Property Natinality() As AggregateParameter
Get
If _Natinality_W Is Nothing Then
_Natinality_W = TearOff.Natinality
End If
Return _Natinality_W
End Get
End Property
Public ReadOnly Property Education() As AggregateParameter
Get
If _Education_W Is Nothing Then
_Education_W = TearOff.Education
End If
Return _Education_W
End Get
End Property
Public ReadOnly Property Occupation() As AggregateParameter
Get
If _Occupation_W Is Nothing Then
_Occupation_W = TearOff.Occupation
End If
Return _Occupation_W
End Get
End Property
Public ReadOnly Property Income() As AggregateParameter
Get
If _Income_W Is Nothing Then
_Income_W = TearOff.Income
End If
Return _Income_W
End Get
End Property
Public ReadOnly Property InformationMediaKey() As AggregateParameter
Get
If _InformationMediaKey_W Is Nothing Then
_InformationMediaKey_W = TearOff.InformationMediaKey
End If
Return _InformationMediaKey_W
End Get
End Property
Public ReadOnly Property InformationMedia() As AggregateParameter
Get
If _InformationMedia_W Is Nothing Then
_InformationMedia_W = TearOff.InformationMedia
End If
Return _InformationMedia_W
End Get
End Property
Public ReadOnly Property Tourismplace() As AggregateParameter
Get
If _Tourismplace_W Is Nothing Then
_Tourismplace_W = TearOff.Tourismplace
End If
Return _Tourismplace_W
End Get
End Property
Public ReadOnly Property Budget() As AggregateParameter
Get
If _Budget_W Is Nothing Then
_Budget_W = TearOff.Budget
End If
Return _Budget_W
End Get
End Property
Public ReadOnly Property CodeCustomer() As AggregateParameter
Get
If _CodeCustomer_W Is Nothing Then
_CodeCustomer_W = TearOff.CodeCustomer
End If
Return _CodeCustomer_W
End Get
End Property
Public ReadOnly Property RegisDate() As AggregateParameter
Get
If _RegisDate_W Is Nothing Then
_RegisDate_W = TearOff.RegisDate
End If
Return _RegisDate_W
End Get
End Property
Private _MemberID_W As AggregateParameter = Nothing
Private _RoleID_W As AggregateParameter = Nothing
Private _FNameTH_W As AggregateParameter = Nothing
Private _FNameEN_W As AggregateParameter = Nothing
Private _LNameTH_W As AggregateParameter = Nothing
Private _LNameEN_W As AggregateParameter = Nothing
Private _Birthday_W As AggregateParameter = Nothing
Private _Sex_W As AggregateParameter = Nothing
Private _Mobile_W As AggregateParameter = Nothing
Private _Email_W As AggregateParameter = Nothing
Private _Address_W As AggregateParameter = Nothing
Private _CompanyName_W As AggregateParameter = Nothing
Private _Position_W As AggregateParameter = Nothing
Private _Other_W As AggregateParameter = Nothing
Private _IsAcitive_W As AggregateParameter = Nothing
Private _UpdateDate_W As AggregateParameter = Nothing
Private _UpdateBy_W As AggregateParameter = Nothing
Private _ColStatus_W As AggregateParameter = Nothing
Private _Religious_W As AggregateParameter = Nothing
Private _Natinality_W As AggregateParameter = Nothing
Private _Education_W As AggregateParameter = Nothing
Private _Occupation_W As AggregateParameter = Nothing
Private _Income_W As AggregateParameter = Nothing
Private _InformationMediaKey_W As AggregateParameter = Nothing
Private _InformationMedia_W As AggregateParameter = Nothing
Private _Tourismplace_W As AggregateParameter = Nothing
Private _Budget_W As AggregateParameter = Nothing
Private _CodeCustomer_W As AggregateParameter = Nothing
Private _RegisDate_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_MemberID_W = Nothing
_RoleID_W = Nothing
_FNameTH_W = Nothing
_FNameEN_W = Nothing
_LNameTH_W = Nothing
_LNameEN_W = Nothing
_Birthday_W = Nothing
_Sex_W = Nothing
_Mobile_W = Nothing
_Email_W = Nothing
_Address_W = Nothing
_CompanyName_W = Nothing
_Position_W = Nothing
_Other_W = Nothing
_IsAcitive_W = Nothing
_UpdateDate_W = Nothing
_UpdateBy_W = Nothing
_ColStatus_W = Nothing
_Religious_W = Nothing
_Natinality_W = Nothing
_Education_W = Nothing
_Occupation_W = Nothing
_Income_W = Nothing
_InformationMediaKey_W = Nothing
_InformationMedia_W = Nothing
_Tourismplace_W = Nothing
_Budget_W = Nothing
_CodeCustomer_W = Nothing
_RegisDate_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MemberInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.MemberID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MemberUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_MemberDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.MemberID)
p.SourceColumn = ColumnNames.MemberID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.MemberID)
p.SourceColumn = ColumnNames.MemberID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.RoleID)
p.SourceColumn = ColumnNames.RoleID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.FNameTH)
p.SourceColumn = ColumnNames.FNameTH
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.FNameEN)
p.SourceColumn = ColumnNames.FNameEN
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.LNameTH)
p.SourceColumn = ColumnNames.LNameTH
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.LNameEN)
p.SourceColumn = ColumnNames.LNameEN
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Birthday)
p.SourceColumn = ColumnNames.Birthday
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Sex)
p.SourceColumn = ColumnNames.Sex
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Mobile)
p.SourceColumn = ColumnNames.Mobile
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Email)
p.SourceColumn = ColumnNames.Email
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Address)
p.SourceColumn = ColumnNames.Address
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CompanyName)
p.SourceColumn = ColumnNames.CompanyName
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Position)
p.SourceColumn = ColumnNames.Position
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Other)
p.SourceColumn = ColumnNames.Other
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsAcitive)
p.SourceColumn = ColumnNames.IsAcitive
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UpdateDate)
p.SourceColumn = ColumnNames.UpdateDate
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.UpdateBy)
p.SourceColumn = ColumnNames.UpdateBy
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ColStatus)
p.SourceColumn = ColumnNames.ColStatus
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Religious)
p.SourceColumn = ColumnNames.Religious
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Natinality)
p.SourceColumn = ColumnNames.Natinality
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Education)
p.SourceColumn = ColumnNames.Education
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Occupation)
p.SourceColumn = ColumnNames.Occupation
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Income)
p.SourceColumn = ColumnNames.Income
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.InformationMediaKey)
p.SourceColumn = ColumnNames.InformationMediaKey
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.InformationMedia)
p.SourceColumn = ColumnNames.InformationMedia
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Tourismplace)
p.SourceColumn = ColumnNames.Tourismplace
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.Budget)
p.SourceColumn = ColumnNames.Budget
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.CodeCustomer)
p.SourceColumn = ColumnNames.CodeCustomer
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.RegisDate)
p.SourceColumn = ColumnNames.RegisDate
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
End NameSpace
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
NameSpace CallCenter
Public MustInherit Class _Sale_Phonenumber
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "Sale_Phonenumber"
Me.MappingName = "Sale_Phonenumber"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_Sale_PhonenumberLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal SaleExtensionID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_Sale_Phonenumber.Parameters.SaleExtensionID, SaleExtensionID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_Sale_PhonenumberLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property SaleExtensionID As SqlParameter
Get
Return New SqlParameter("@SaleExtensionID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property SaleID As SqlParameter
Get
Return New SqlParameter("@SaleID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property PhoneNumber As SqlParameter
Get
Return New SqlParameter("@PhoneNumber", SqlDbType.VarChar, 10)
End Get
End Property
Public Shared ReadOnly Property ModifyDateTime As SqlParameter
Get
Return New SqlParameter("@ModifyDateTime", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property IsActive As SqlParameter
Get
Return New SqlParameter("@IsActive", SqlDbType.Bit, 0)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const SaleExtensionID As String = "SaleExtensionID"
Public Const SaleID As String = "SaleID"
Public Const PhoneNumber As String = "PhoneNumber"
Public Const ModifyDateTime As String = "ModifyDateTime"
Public Const IsActive As String = "IsActive"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(SaleExtensionID) = _Sale_Phonenumber.PropertyNames.SaleExtensionID
ht(SaleID) = _Sale_Phonenumber.PropertyNames.SaleID
ht(PhoneNumber) = _Sale_Phonenumber.PropertyNames.PhoneNumber
ht(ModifyDateTime) = _Sale_Phonenumber.PropertyNames.ModifyDateTime
ht(IsActive) = _Sale_Phonenumber.PropertyNames.IsActive
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const SaleExtensionID As String = "SaleExtensionID"
Public Const SaleID As String = "SaleID"
Public Const PhoneNumber As String = "PhoneNumber"
Public Const ModifyDateTime As String = "ModifyDateTime"
Public Const IsActive As String = "IsActive"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(SaleExtensionID) = _Sale_Phonenumber.ColumnNames.SaleExtensionID
ht(SaleID) = _Sale_Phonenumber.ColumnNames.SaleID
ht(PhoneNumber) = _Sale_Phonenumber.ColumnNames.PhoneNumber
ht(ModifyDateTime) = _Sale_Phonenumber.ColumnNames.ModifyDateTime
ht(IsActive) = _Sale_Phonenumber.ColumnNames.IsActive
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const SaleExtensionID As String = "s_SaleExtensionID"
Public Const SaleID As String = "s_SaleID"
Public Const PhoneNumber As String = "s_PhoneNumber"
Public Const ModifyDateTime As String = "s_ModifyDateTime"
Public Const IsActive As String = "s_IsActive"
End Class
#End Region
#Region "Properties"
Public Overridable Property SaleExtensionID As Integer
Get
Return MyBase.GetInteger(ColumnNames.SaleExtensionID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.SaleExtensionID, Value)
End Set
End Property
Public Overridable Property SaleID As Integer
Get
Return MyBase.GetInteger(ColumnNames.SaleID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.SaleID, Value)
End Set
End Property
Public Overridable Property PhoneNumber As String
Get
Return MyBase.GetString(ColumnNames.PhoneNumber)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.PhoneNumber, Value)
End Set
End Property
Public Overridable Property ModifyDateTime As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.ModifyDateTime)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.ModifyDateTime, Value)
End Set
End Property
Public Overridable Property IsActive As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsActive)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsActive, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_SaleExtensionID As String
Get
If Me.IsColumnNull(ColumnNames.SaleExtensionID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.SaleExtensionID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.SaleExtensionID)
Else
Me.SaleExtensionID = MyBase.SetIntegerAsString(ColumnNames.SaleExtensionID, Value)
End If
End Set
End Property
Public Overridable Property s_SaleID As String
Get
If Me.IsColumnNull(ColumnNames.SaleID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.SaleID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.SaleID)
Else
Me.SaleID = MyBase.SetIntegerAsString(ColumnNames.SaleID, Value)
End If
End Set
End Property
Public Overridable Property s_PhoneNumber As String
Get
If Me.IsColumnNull(ColumnNames.PhoneNumber) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.PhoneNumber)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.PhoneNumber)
Else
Me.PhoneNumber = MyBase.SetStringAsString(ColumnNames.PhoneNumber, Value)
End If
End Set
End Property
Public Overridable Property s_ModifyDateTime As String
Get
If Me.IsColumnNull(ColumnNames.ModifyDateTime) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.ModifyDateTime)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ModifyDateTime)
Else
Me.ModifyDateTime = MyBase.SetDateTimeAsString(ColumnNames.ModifyDateTime, Value)
End If
End Set
End Property
Public Overridable Property s_IsActive As String
Get
If Me.IsColumnNull(ColumnNames.IsActive) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsActive)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsActive)
Else
Me.IsActive = MyBase.SetBooleanAsString(ColumnNames.IsActive, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property SaleExtensionID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.SaleExtensionID, Parameters.SaleExtensionID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property SaleID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.SaleID, Parameters.SaleID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property PhoneNumber() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.PhoneNumber, Parameters.PhoneNumber)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ModifyDateTime() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ModifyDateTime, Parameters.ModifyDateTime)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsActive() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsActive, Parameters.IsActive)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property SaleExtensionID() As WhereParameter
Get
If _SaleExtensionID_W Is Nothing Then
_SaleExtensionID_W = TearOff.SaleExtensionID
End If
Return _SaleExtensionID_W
End Get
End Property
Public ReadOnly Property SaleID() As WhereParameter
Get
If _SaleID_W Is Nothing Then
_SaleID_W = TearOff.SaleID
End If
Return _SaleID_W
End Get
End Property
Public ReadOnly Property PhoneNumber() As WhereParameter
Get
If _PhoneNumber_W Is Nothing Then
_PhoneNumber_W = TearOff.PhoneNumber
End If
Return _PhoneNumber_W
End Get
End Property
Public ReadOnly Property ModifyDateTime() As WhereParameter
Get
If _ModifyDateTime_W Is Nothing Then
_ModifyDateTime_W = TearOff.ModifyDateTime
End If
Return _ModifyDateTime_W
End Get
End Property
Public ReadOnly Property IsActive() As WhereParameter
Get
If _IsActive_W Is Nothing Then
_IsActive_W = TearOff.IsActive
End If
Return _IsActive_W
End Get
End Property
Private _SaleExtensionID_W As WhereParameter = Nothing
Private _SaleID_W As WhereParameter = Nothing
Private _PhoneNumber_W As WhereParameter = Nothing
Private _ModifyDateTime_W As WhereParameter = Nothing
Private _IsActive_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_SaleExtensionID_W = Nothing
_SaleID_W = Nothing
_PhoneNumber_W = Nothing
_ModifyDateTime_W = Nothing
_IsActive_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property SaleExtensionID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.SaleExtensionID, Parameters.SaleExtensionID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property SaleID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.SaleID, Parameters.SaleID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property PhoneNumber() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.PhoneNumber, Parameters.PhoneNumber)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ModifyDateTime() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ModifyDateTime, Parameters.ModifyDateTime)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsActive() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsActive, Parameters.IsActive)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property SaleExtensionID() As AggregateParameter
Get
If _SaleExtensionID_W Is Nothing Then
_SaleExtensionID_W = TearOff.SaleExtensionID
End If
Return _SaleExtensionID_W
End Get
End Property
Public ReadOnly Property SaleID() As AggregateParameter
Get
If _SaleID_W Is Nothing Then
_SaleID_W = TearOff.SaleID
End If
Return _SaleID_W
End Get
End Property
Public ReadOnly Property PhoneNumber() As AggregateParameter
Get
If _PhoneNumber_W Is Nothing Then
_PhoneNumber_W = TearOff.PhoneNumber
End If
Return _PhoneNumber_W
End Get
End Property
Public ReadOnly Property ModifyDateTime() As AggregateParameter
Get
If _ModifyDateTime_W Is Nothing Then
_ModifyDateTime_W = TearOff.ModifyDateTime
End If
Return _ModifyDateTime_W
End Get
End Property
Public ReadOnly Property IsActive() As AggregateParameter
Get
If _IsActive_W Is Nothing Then
_IsActive_W = TearOff.IsActive
End If
Return _IsActive_W
End Get
End Property
Private _SaleExtensionID_W As AggregateParameter = Nothing
Private _SaleID_W As AggregateParameter = Nothing
Private _PhoneNumber_W As AggregateParameter = Nothing
Private _ModifyDateTime_W As AggregateParameter = Nothing
Private _IsActive_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_SaleExtensionID_W = Nothing
_SaleID_W = Nothing
_PhoneNumber_W = Nothing
_ModifyDateTime_W = Nothing
_IsActive_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_Sale_PhonenumberInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.SaleExtensionID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_Sale_PhonenumberUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_Sale_PhonenumberDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.SaleExtensionID)
p.SourceColumn = ColumnNames.SaleExtensionID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.SaleExtensionID)
p.SourceColumn = ColumnNames.SaleExtensionID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.SaleID)
p.SourceColumn = ColumnNames.SaleID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.PhoneNumber)
p.SourceColumn = ColumnNames.PhoneNumber
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ModifyDateTime)
p.SourceColumn = ColumnNames.ModifyDateTime
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsActive)
p.SourceColumn = ColumnNames.IsActive
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
End NameSpace
'===============================================================================
' Generated From - VbNet_SQL_dOOdads_BusinessEntity.vbgen
'
' ** IMPORTANT **
' How to Generate your stored procedures:
'
' SQL = SQL_StoredProcs.vbgen
' ACCESS = Access_StoredProcs.vbgen
' ORACLE = Oracle_StoredProcs.vbgen
' FIREBIRD = FirebirdStoredProcs.vbgen
' POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
' The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
' This object is 'MustInherit' which means you need to inherit from it to be able
' to instantiate it. This is very easilly done. You can Override properties and
' methods in your derived class, this allows you to regenerate this class at any
' time and not worry about overwriting custom code.
'
' NEVER EDIT THIS FILE.
'
' Public Class YourObject
' Inherits _YourObject
'
' End Class
'
'===============================================================================
' Generated by MyGeneration Version # (1.3.0.3)
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized
Imports MyGeneration.dOOdads
NameSpace CallCenter
Public MustInherit Class _TypeProduct_QueueName
Inherits SqlClientEntity
Public Sub New()
Me.QuerySource = "TypeProduct_QueueName"
Me.MappingName = "TypeProduct_QueueName"
End Sub
'=================================================================
' Public Overrides Sub AddNew()
'=================================================================
'
'=================================================================
Public Overrides Sub AddNew()
MyBase.AddNew()
End Sub
Public Overrides Sub FlushData()
Me._whereClause = nothing
Me._aggregateClause = nothing
MyBase.FlushData()
End Sub
'=================================================================
' Public Function LoadAll() As Boolean
'=================================================================
' Loads all of the records in the database, and sets the currentRow to the first row
'=================================================================
Public Function LoadAll() As Boolean
Dim parameters As ListDictionary = Nothing
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_TypeProduct_QueueNameLoadAll]", parameters)
End Function
'=================================================================
' Public Overridable Function LoadByPrimaryKey() As Boolean
'=================================================================
' Loads a single row of via the primary key
'=================================================================
Public Overridable Function LoadByPrimaryKey(ByVal TypeProductQueueID As Integer) As Boolean
Dim parameters As ListDictionary = New ListDictionary()
parameters.Add(_TypeProduct_QueueName.Parameters.TypeProductQueueID, TypeProductQueueID)
Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_TypeProduct_QueueNameLoadByPrimaryKey]", parameters)
End Function
#Region "Parameters"
Protected class Parameters
Public Shared ReadOnly Property TypeProductQueueID As SqlParameter
Get
Return New SqlParameter("@TypeProductQueueID", SqlDbType.Int, 0)
End Get
End Property
Public Shared ReadOnly Property TypeProduct As SqlParameter
Get
Return New SqlParameter("@TypeProduct", SqlDbType.VarChar, 20)
End Get
End Property
Public Shared ReadOnly Property QueueName As SqlParameter
Get
Return New SqlParameter("@QueueName", SqlDbType.VarChar, 50)
End Get
End Property
Public Shared ReadOnly Property URLOutput As SqlParameter
Get
Return New SqlParameter("@URLOutput", SqlDbType.VarChar, 255)
End Get
End Property
Public Shared ReadOnly Property ModifyDateTime As SqlParameter
Get
Return New SqlParameter("@ModifyDateTime", SqlDbType.DateTime, 0)
End Get
End Property
Public Shared ReadOnly Property IsActive As SqlParameter
Get
Return New SqlParameter("@IsActive", SqlDbType.Bit, 0)
End Get
End Property
End Class
#End Region
#Region "ColumnNames"
Public class ColumnNames
Public Const TypeProductQueueID As String = "TypeProductQueueID"
Public Const TypeProduct As String = "TypeProduct"
Public Const QueueName As String = "QueueName"
Public Const URLOutput As String = "URLOutput"
Public Const ModifyDateTime As String = "ModifyDateTime"
Public Const IsActive As String = "IsActive"
Shared Public Function ToPropertyName(ByVal columnName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(TypeProductQueueID) = _TypeProduct_QueueName.PropertyNames.TypeProductQueueID
ht(TypeProduct) = _TypeProduct_QueueName.PropertyNames.TypeProduct
ht(QueueName) = _TypeProduct_QueueName.PropertyNames.QueueName
ht(URLOutput) = _TypeProduct_QueueName.PropertyNames.URLOutput
ht(ModifyDateTime) = _TypeProduct_QueueName.PropertyNames.ModifyDateTime
ht(IsActive) = _TypeProduct_QueueName.PropertyNames.IsActive
End If
Return CType(ht(columnName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "PropertyNames"
Public class PropertyNames
Public Const TypeProductQueueID As String = "TypeProductQueueID"
Public Const TypeProduct As String = "TypeProduct"
Public Const QueueName As String = "QueueName"
Public Const URLOutput As String = "URLOutput"
Public Const ModifyDateTime As String = "ModifyDateTime"
Public Const IsActive As String = "IsActive"
Shared Public Function ToColumnName(ByVal propertyName As String) As String
If ht Is Nothing Then
ht = new Hashtable
ht(TypeProductQueueID) = _TypeProduct_QueueName.ColumnNames.TypeProductQueueID
ht(TypeProduct) = _TypeProduct_QueueName.ColumnNames.TypeProduct
ht(QueueName) = _TypeProduct_QueueName.ColumnNames.QueueName
ht(URLOutput) = _TypeProduct_QueueName.ColumnNames.URLOutput
ht(ModifyDateTime) = _TypeProduct_QueueName.ColumnNames.ModifyDateTime
ht(IsActive) = _TypeProduct_QueueName.ColumnNames.IsActive
End If
Return CType(ht(propertyName), String)
End Function
Shared Private ht As Hashtable = Nothing
End Class
#End Region
#Region "StringPropertyNames"
Public class StringPropertyNames
Public Const TypeProductQueueID As String = "s_TypeProductQueueID"
Public Const TypeProduct As String = "s_TypeProduct"
Public Const QueueName As String = "s_QueueName"
Public Const URLOutput As String = "s_URLOutput"
Public Const ModifyDateTime As String = "s_ModifyDateTime"
Public Const IsActive As String = "s_IsActive"
End Class
#End Region
#Region "Properties"
Public Overridable Property TypeProductQueueID As Integer
Get
Return MyBase.GetInteger(ColumnNames.TypeProductQueueID)
End Get
Set(ByVal Value As Integer)
MyBase.SetInteger(ColumnNames.TypeProductQueueID, Value)
End Set
End Property
Public Overridable Property TypeProduct As String
Get
Return MyBase.GetString(ColumnNames.TypeProduct)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.TypeProduct, Value)
End Set
End Property
Public Overridable Property QueueName As String
Get
Return MyBase.GetString(ColumnNames.QueueName)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.QueueName, Value)
End Set
End Property
Public Overridable Property URLOutput As String
Get
Return MyBase.GetString(ColumnNames.URLOutput)
End Get
Set(ByVal Value As String)
MyBase.SetString(ColumnNames.URLOutput, Value)
End Set
End Property
Public Overridable Property ModifyDateTime As DateTime
Get
Return MyBase.GetDateTime(ColumnNames.ModifyDateTime)
End Get
Set(ByVal Value As DateTime)
MyBase.SetDateTime(ColumnNames.ModifyDateTime, Value)
End Set
End Property
Public Overridable Property IsActive As Boolean
Get
Return MyBase.GetBoolean(ColumnNames.IsActive)
End Get
Set(ByVal Value As Boolean)
MyBase.SetBoolean(ColumnNames.IsActive, Value)
End Set
End Property
#End Region
#Region "String Properties"
Public Overridable Property s_TypeProductQueueID As String
Get
If Me.IsColumnNull(ColumnNames.TypeProductQueueID) Then
Return String.Empty
Else
Return MyBase.GetIntegerAsString(ColumnNames.TypeProductQueueID)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.TypeProductQueueID)
Else
Me.TypeProductQueueID = MyBase.SetIntegerAsString(ColumnNames.TypeProductQueueID, Value)
End If
End Set
End Property
Public Overridable Property s_TypeProduct As String
Get
If Me.IsColumnNull(ColumnNames.TypeProduct) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.TypeProduct)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.TypeProduct)
Else
Me.TypeProduct = MyBase.SetStringAsString(ColumnNames.TypeProduct, Value)
End If
End Set
End Property
Public Overridable Property s_QueueName As String
Get
If Me.IsColumnNull(ColumnNames.QueueName) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.QueueName)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.QueueName)
Else
Me.QueueName = MyBase.SetStringAsString(ColumnNames.QueueName, Value)
End If
End Set
End Property
Public Overridable Property s_URLOutput As String
Get
If Me.IsColumnNull(ColumnNames.URLOutput) Then
Return String.Empty
Else
Return MyBase.GetStringAsString(ColumnNames.URLOutput)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.URLOutput)
Else
Me.URLOutput = MyBase.SetStringAsString(ColumnNames.URLOutput, Value)
End If
End Set
End Property
Public Overridable Property s_ModifyDateTime As String
Get
If Me.IsColumnNull(ColumnNames.ModifyDateTime) Then
Return String.Empty
Else
Return MyBase.GetDateTimeAsString(ColumnNames.ModifyDateTime)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.ModifyDateTime)
Else
Me.ModifyDateTime = MyBase.SetDateTimeAsString(ColumnNames.ModifyDateTime, Value)
End If
End Set
End Property
Public Overridable Property s_IsActive As String
Get
If Me.IsColumnNull(ColumnNames.IsActive) Then
Return String.Empty
Else
Return MyBase.GetBooleanAsString(ColumnNames.IsActive)
End If
End Get
Set(ByVal Value As String)
If String.Empty = value Then
Me.SetColumnNull(ColumnNames.IsActive)
Else
Me.IsActive = MyBase.SetBooleanAsString(ColumnNames.IsActive, Value)
End If
End Set
End Property
#End Region
#Region "Where Clause"
Public Class WhereClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffWhereParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffWhereParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "TearOff's"
Public class TearOffWhereParameter
Public Sub New(ByVal clause As WhereClause)
Me._clause = clause
End Sub
Public ReadOnly Property TypeProductQueueID() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.TypeProductQueueID, Parameters.TypeProductQueueID)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property TypeProduct() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.TypeProduct, Parameters.TypeProduct)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property QueueName() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.QueueName, Parameters.QueueName)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property URLOutput() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.URLOutput, Parameters.URLOutput)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property ModifyDateTime() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.ModifyDateTime, Parameters.ModifyDateTime)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Public ReadOnly Property IsActive() As WhereParameter
Get
Dim where As WhereParameter = New WhereParameter(ColumnNames.IsActive, Parameters.IsActive)
Me._clause._entity.Query.AddWhereParemeter(where)
Return where
End Get
End Property
Private _clause as WhereClause
End Class
#End Region
Public ReadOnly Property TypeProductQueueID() As WhereParameter
Get
If _TypeProductQueueID_W Is Nothing Then
_TypeProductQueueID_W = TearOff.TypeProductQueueID
End If
Return _TypeProductQueueID_W
End Get
End Property
Public ReadOnly Property TypeProduct() As WhereParameter
Get
If _TypeProduct_W Is Nothing Then
_TypeProduct_W = TearOff.TypeProduct
End If
Return _TypeProduct_W
End Get
End Property
Public ReadOnly Property QueueName() As WhereParameter
Get
If _QueueName_W Is Nothing Then
_QueueName_W = TearOff.QueueName
End If
Return _QueueName_W
End Get
End Property
Public ReadOnly Property URLOutput() As WhereParameter
Get
If _URLOutput_W Is Nothing Then
_URLOutput_W = TearOff.URLOutput
End If
Return _URLOutput_W
End Get
End Property
Public ReadOnly Property ModifyDateTime() As WhereParameter
Get
If _ModifyDateTime_W Is Nothing Then
_ModifyDateTime_W = TearOff.ModifyDateTime
End If
Return _ModifyDateTime_W
End Get
End Property
Public ReadOnly Property IsActive() As WhereParameter
Get
If _IsActive_W Is Nothing Then
_IsActive_W = TearOff.IsActive
End If
Return _IsActive_W
End Get
End Property
Private _TypeProductQueueID_W As WhereParameter = Nothing
Private _TypeProduct_W As WhereParameter = Nothing
Private _QueueName_W As WhereParameter = Nothing
Private _URLOutput_W As WhereParameter = Nothing
Private _ModifyDateTime_W As WhereParameter = Nothing
Private _IsActive_W As WhereParameter = Nothing
Public Sub WhereClauseReset()
_TypeProductQueueID_W = Nothing
_TypeProduct_W = Nothing
_QueueName_W = Nothing
_URLOutput_W = Nothing
_ModifyDateTime_W = Nothing
_IsActive_W = Nothing
Me._entity.Query.FlushWhereParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffWhereParameter
End Class
Public ReadOnly Property Where() As WhereClause
Get
If _whereClause Is Nothing Then
_whereClause = New WhereClause(Me)
End If
Return _whereClause
End Get
End Property
Private _whereClause As WhereClause = Nothing
#End Region
#Region "Aggregate Clause"
Public Class AggregateClause
Public Sub New(ByVal entity As BusinessEntity)
Me._entity = entity
End Sub
Public ReadOnly Property TearOff As TearOffAggregateParameter
Get
If _tearOff Is Nothing Then
_tearOff = new TearOffAggregateParameter(Me)
End If
Return _tearOff
End Get
End Property
#Region "AggregateParameter TearOff's"
Public class TearOffAggregateParameter
Public Sub New(ByVal clause As AggregateClause)
Me._clause = clause
End Sub
Public ReadOnly Property TypeProductQueueID() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TypeProductQueueID, Parameters.TypeProductQueueID)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property TypeProduct() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TypeProduct, Parameters.TypeProduct)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property QueueName() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.QueueName, Parameters.QueueName)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property URLOutput() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.URLOutput, Parameters.URLOutput)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property ModifyDateTime() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ModifyDateTime, Parameters.ModifyDateTime)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Public ReadOnly Property IsActive() As AggregateParameter
Get
Dim where As AggregateParameter = New AggregateParameter(ColumnNames.IsActive, Parameters.IsActive)
Me._clause._entity.Query.AddAggregateParameter(where)
Return where
End Get
End Property
Private _clause as AggregateClause
End Class
#End Region
Public ReadOnly Property TypeProductQueueID() As AggregateParameter
Get
If _TypeProductQueueID_W Is Nothing Then
_TypeProductQueueID_W = TearOff.TypeProductQueueID
End If
Return _TypeProductQueueID_W
End Get
End Property
Public ReadOnly Property TypeProduct() As AggregateParameter
Get
If _TypeProduct_W Is Nothing Then
_TypeProduct_W = TearOff.TypeProduct
End If
Return _TypeProduct_W
End Get
End Property
Public ReadOnly Property QueueName() As AggregateParameter
Get
If _QueueName_W Is Nothing Then
_QueueName_W = TearOff.QueueName
End If
Return _QueueName_W
End Get
End Property
Public ReadOnly Property URLOutput() As AggregateParameter
Get
If _URLOutput_W Is Nothing Then
_URLOutput_W = TearOff.URLOutput
End If
Return _URLOutput_W
End Get
End Property
Public ReadOnly Property ModifyDateTime() As AggregateParameter
Get
If _ModifyDateTime_W Is Nothing Then
_ModifyDateTime_W = TearOff.ModifyDateTime
End If
Return _ModifyDateTime_W
End Get
End Property
Public ReadOnly Property IsActive() As AggregateParameter
Get
If _IsActive_W Is Nothing Then
_IsActive_W = TearOff.IsActive
End If
Return _IsActive_W
End Get
End Property
Private _TypeProductQueueID_W As AggregateParameter = Nothing
Private _TypeProduct_W As AggregateParameter = Nothing
Private _QueueName_W As AggregateParameter = Nothing
Private _URLOutput_W As AggregateParameter = Nothing
Private _ModifyDateTime_W As AggregateParameter = Nothing
Private _IsActive_W As AggregateParameter = Nothing
Public Sub AggregateClauseReset()
_TypeProductQueueID_W = Nothing
_TypeProduct_W = Nothing
_QueueName_W = Nothing
_URLOutput_W = Nothing
_ModifyDateTime_W = Nothing
_IsActive_W = Nothing
Me._entity.Query.FlushAggregateParameters()
End Sub
Private _entity As BusinessEntity
Private _tearOff As TearOffAggregateParameter
End Class
Public ReadOnly Property Aggregate() As AggregateClause
Get
If _aggregateClause Is Nothing Then
_aggregateClause = New AggregateClause(Me)
End If
Return _aggregateClause
End Get
End Property
Private _aggregateClause As AggregateClause = Nothing
#End Region
Protected Overrides Function GetInsertCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_TypeProduct_QueueNameInsert]"
CreateParameters(cmd)
Dim p As SqlParameter
p = cmd.Parameters(Parameters.TypeProductQueueID.ParameterName)
p.Direction = ParameterDirection.Output
Return cmd
End Function
Protected Overrides Function GetUpdateCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_TypeProduct_QueueNameUpdate]"
CreateParameters(cmd)
Return cmd
End Function
Protected Overrides Function GetDeleteCommand() As IDbCommand
Dim cmd As SqlCommand = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_TypeProduct_QueueNameDelete]"
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.TypeProductQueueID)
p.SourceColumn = ColumnNames.TypeProductQueueID
p.SourceVersion = DataRowVersion.Current
Return cmd
End Function
Private Sub CreateParameters(ByVal cmd As SqlCommand)
Dim p As SqlParameter
p = cmd.Parameters.Add(Parameters.TypeProductQueueID)
p.SourceColumn = ColumnNames.TypeProductQueueID
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.TypeProduct)
p.SourceColumn = ColumnNames.TypeProduct
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.QueueName)
p.SourceColumn = ColumnNames.QueueName
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.URLOutput)
p.SourceColumn = ColumnNames.URLOutput
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.ModifyDateTime)
p.SourceColumn = ColumnNames.ModifyDateTime
p.SourceVersion = DataRowVersion.Current
p = cmd.Parameters.Add(Parameters.IsActive)
p.SourceColumn = ColumnNames.IsActive
p.SourceVersion = DataRowVersion.Current
End Sub
End Class
End NameSpace
' Generated by MyGeneration Version # (1.3.0.3)
Public Class CallCenterLog
Inherits _CallCenterLog
Private par As New Specialized.ListDictionary
Public Function _Proc_LoadHistoryLogByDate(ByVal strDate As String) As Boolean
par.Clear()
par.Add("@strDate", strDate)
Return MyBase.LoadFromSql("[_Proc_LoadHistoryLogByDate]", par)
End Function
End Class
' Generated by MyGeneration Version # (1.3.0.3)
NameSpace MushroomTravel
Public Class M_User
Inherits _M_User
End Class
End NameSpace
' Generated by MyGeneration Version # (1.3.0.3)
Public Class MainBooking
Inherits _MainBooking
Private par As New Specialized.ListDictionary
'--- Get Agent --------
Public Function _HistoryLog_Agent_BookingDelete(ByVal strAgentID As String, ByVal strBookingDel As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
par.Add("@DeleteDate", strBookingDel)
Return MyBase.LoadFromSql("[_HistoryLog_Agent_BookingDelete]", par)
End Function
Public Function _HistoryLog_AgentDetail_FindURL(ByVal strAgentID As String, ByVal strURLWebsite As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
par.Add("@URLWebsite", strURLWebsite)
Return MyBase.LoadFromSql("[_HistoryLog_AgentDetail_FindURL]", par)
End Function
Public Function _HistoryLog_Agent_WebHomeProduct(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_Agent_WebHomeProduct]", par)
End Function
Public Function _HistoryLog_AgentDetail(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_AgentDetail]", par)
End Function
#Region "'-- Delete Data --" '
Public Function _HistoryLog_DelBookingByAgentID(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_DelBookingByAgentID]", par)
End Function
Public Function _HistoryLog_DelProductByAgentID_byProductCode(ByVal strAgentID As String,byval strProductCodeNews As String ) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
par.Add("@ProductCodeNews", strProductCodeNews)
Return MyBase.LoadFromSql("[_HistoryLog_DelProductByAgentID_byProductCode]", par)
End Function
Public Function _HistoryLog_DelProductByAgentID(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_DelProductByAgentID]", par)
End Function
Public Function _HistoryLog_DelPassengerByAgentID(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_DelPassengerByAgentID]", par)
End Function
Public Function _HistoryLog_DelCustomerCompanyByAgentID(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_DelCustomerCompanyByAgentID]", par)
End Function
Public Function _HistoryLog_DelSupplierByAgentID(ByVal strAgentID As String) As Boolean
par.Clear()
par.Add("@AgentID", CInt(strAgentID))
Return MyBase.LoadFromSql("[_HistoryLog_DelSupplierByAgentID]", par)
End Function
#End Region
Public Function _HistoryLog_BookingDetail_Payment_Log(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_Payment_Log]", par)
End Function
Public Function _HistoryLog_BookingDetail_Payment_Current(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_Payment_Current]", par)
End Function
Public Function _HistoryLog_BookingDetail(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail]", par)
End Function
Public Function _HistoryLog_BookingDetail_ActivityLog(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_ActivityLog]", par)
End Function
Public Function _HistoryLog_BookingDetail_StatusLog(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_StatusLog]", par)
End Function
Public Function _HistoryLog_BookingDetail_BookingInPeriod(ByVal strPNRCode As String) As Boolean
par.Clear()
par.Add("@PNRCode", strPNRCode)
Return MyBase.LoadFromSql("[_HistoryLog_BookingDetail_Cancel_InPeriod]", par)
End Function
End Class
' Generated by MyGeneration Version # (1.3.0.3)
NameSpace MushroomTravel
Public Class Member
Inherits _Member
End Class
End NameSpace
' Generated by MyGeneration Version # (1.3.0.3)
Namespace MushroomTravel
Public Class Passenger
Inherits _Passenger
Private par As New Specialized.ListDictionary
Public Function _Proc_CheckCallerIDInBackOffice(ByVal strCallerID As String) As Boolean
par.Clear()
par.Add("@strCallerID", strCallerID)
Return MyBase.LoadFromSql("[_Proc_CheckCallerIDInBackOffice]", par)
End Function
Public Function _Proc_GetLastBookingInBackOffice(ByVal intPassengerID As Integer, ByVal intCustomerCompamyID As Integer) As Boolean
par.Clear()
par.Add("@intPassengerID", intPassengerID)
par.Add("@intCustomerCompamyID", intCustomerCompamyID)
Return MyBase.LoadFromSql("[_Proc_GetLastBookingInBackOffice]", par)
End Function
End Class
End Namespace
' Generated by MyGeneration Version # (1.3.0.3)
Public Class Product
Inherits _Product
Private par As New Specialized.ListDictionary
Public Function _HistoryLog_GetProductCodeNewOriginal_WH(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_GetProductCodeNewOriginal_WH]", par)
End Function
Public Function _HistoryLog_ProductDetail_Country(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_ProductDetail_Country]", par)
End Function
Public Function _HistoryLog_ProductDetail(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_ProductDetail]", par)
End Function
Public Function _HistoryLog_ProductDetail_Period(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_ProductDetail_Period]", par)
End Function
Public Function _HistoryLog_ProductDetail_PeriodDetailLog(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_ProductDetail_PeriodDetailLog]", par)
End Function
Public Function _HistoryLog_ProductDetail_PeriodStatusLog(ByVal strProductCode As String) As Boolean
par.Clear()
par.Add("@tourcode", strProductCode)
Return MyBase.LoadFromSql("[_HistoryLog_ProductDetail_PeriodStatusLog]", par)
End Function
Public Function _Proc_LoadHistoryLog_ProductScrape(ByVal strProductnameSupplier As String) As Boolean
par.Clear()
par.Add("@strProductnameSupplier", strProductnameSupplier)
Return MyBase.LoadFromSql("[_Proc_LoadHistoryLog_ProductScrape]", par)
End Function
End Class
' Generated by MyGeneration Version # (1.3.0.3)
NameSpace CallCenter
Public Class Sale_Phonenumber
Inherits _Sale_Phonenumber
End Class
End NameSpace
' Generated by MyGeneration Version # (1.3.0.3)
NameSpace CallCenter
Public Class TypeProduct_QueueName
Inherits _TypeProduct_QueueName
End Class
End NameSpace
/* aea modify 30-05-2012 */
/*GridViewCSS*/
.GridViewStyle
{
font-family: Arial, Sans-Serif;
font-size:small;
table-layout: auto;
border-collapse: collapse;
border: #E4E4E4 2px solid;
}
.HeaderStyle, .PagerStyle /*Common Styles*/
{
background-image: url(../Image/HeaderGlassBlack.jpg); /* HeaderGlassBlack.jpg aea add */
background-position:center;
background-repeat:repeat-x;
background-color:#CCCCCC;}
.HeaderStyle th
{
padding: 5px;
color: #000000;}
.HeaderStyle a
{
text-decoration:none;
color:#666666;
display:block;
text-align:left;
/*font-weight:normal;*/
}
.PagerStyle table
{
text-align:Right;
margin:auto;}
.PagerStyle table td
{
border:0px;
padding:5px;}
.PagerStyle td
{
border-top: #CCCCCC 3px solid;}
.PagerStyle a
{
color:#666666;
text-decoration:none;
padding:2px 10px 2px 10px;
border-top:solid 1px #E2E2E2;
border-right:solid 1px #DDDDDD;
border-bottom:solid 1px #DDDDDD;
border-left:solid 1px #E2E2E2;}
.PagerStyle span
{
font-weight:bold;
color:#000000;
text-decoration:none;
padding:2px 10px 2px 10px;}/*RowStyles*/
.RowStyle td, .AltRowStyle td, .SelectedRowStyle td, .EditRowStyle td /*Common Styles*/
{
padding: 5px;
border-right: solid 1px #CCCCCC;}
.RowStyle td
{
background-color: #F8F8F8;}
.AltRowStyle td
{
background-color: #f0f0f0;}
.SelectedRowStyle td
{
background-color: #ffff66;}
/*CSS GridView for ListProduct2*/
.GridViewStyle2
{
font-family: Arial, Sans-Serif;
font-size:14px;
table-layout: auto;
border-collapse: collapse;
border: #E4E4E4 2px solid;
}
.HeaderStyle2
{
background-position:center;
background-color:#02288e;
color:#ffff66;
}
.RowStyle2 td
{
background-color: #091ade;
color:#ffffff;
}
.AltRowStyle2 td
{
background-color: #02288e;
color:#ffff66;
}
/*End CSS GridView for ListProduct2*/
#Benefits34{background:url('../image/Benefits34.jpg') no-repeat;}
#Benefits34EN{background:url('../image/Benefits34_e.jpg') no-repeat;}
#Benefits38{background:url('../image/Benefits38.jpg') no-repeat;}
#Benefits38EN{background:url('../image/Benefits38_e.jpg') no-repeat;}
#Benefits39{background:url('../image/Benefits39.jpg') no-repeat;}
#Benefits39EN{background:url('../image/Benefits39_e.jpg') no-repeat;}
#Benefits40{background:url('../image/Benefits40.jpg') no-repeat;}
#Benefits40EN{background:url('../image/Benefits40_e.jpg') no-repeat;}
#Benefits41{background:url('../image/Benefits41.jpg') no-repeat;}
#Benefits41EN{background:url('../image/Benefits41_e.jpg') no-repeat;}
#Benefits42{background:url('../image/Benefits42.jpg') no-repeat;}
#Benefits42EN{background:url('../image/Benefits42_e.jpg') no-repeat;}
#Benefits43{background:url('../image/Benefits43.jpg') no-repeat;}
#Card_Kid{background:url('../image/icon_re.png') 0 -370px;float:left;height:43px;margin:0 5px;width:68px;}
#Card_kbank{background:url('../image/icon_re.png') 0 -318px;float:left;height:42px;margin:0 5px;width:69px;}
#CreateYourOwnTrip{background:url('../image/Master_re.png') 0 -690px;height:45px;width:252px; background-repeat:no-repeat;}
#FT_711{background:url('../image/Master_re.png') 0 -296px;float:left;height:40px;margin-left:5px;width:41px;}
#FT_AmericanExpress{background:url('../image/Master_re.png') 0 -196px;float:left;height:40px;margin-left:5px;width:54px;}
#FT_CounterService{background:url('../image/Master_re.png') 0 -246px;float:left;height:40px;margin-left:5px;width:54px;}
#FT_MasterCard{background:url('../image/Master_re.png') 0 -96px;float:left;height:40px;margin-left:5px;width:95px;}
#FT_TAT{background:url('../image/Master_re.png') 0 -48px;float:left;height:38px;margin-left:5px;width:40px;}
#FT_Visa{background:url('../image/Master_re.png') 0 -146px;float:left;height:40px;margin-left:5px;width:88px;}
#FT_atta{background:url('../image/Master_re.png') 0 0;float:left;height:38px;margin-left:120px;width:40px;}
#FT_dbd{background:url('../image/Master_re.png') 0 -403px;float:left;height:40px;margin-left:5px;width:84px;}
#FT_paypal{background:url('../image/Master_re.png') 0 -346px;float:left;height:47px;margin-left:5px;width:122px;}
#Facebook_250{background:url('../image/facebook_250.png') no-repeat;float:left;height:90px;margin:10px 0 10px 30px;padding:10px 0 0 15px;text-align:left;width:260px;}
#FlightBar29{background:url('../image/Bar.png') 0 -992px;height:38px;width:296px;}
#FreeBar36{background:url('../image/Bar.png') 0 -808px;height:51px;padding:5px 0 0;text-align:left;width:633px;}
#FreeBarReward{background:url('../image/FreeBarReward.jpg') no-repeat;}
#HotelBar26{background:url('../image/Bar.png') 0 -944px;height:38px;width:296px;}
#IC_facebook{background:url('../image/icon_re.png') 0 0;float:left;height:40px;margin-left:5px;width:35px;}
#IC_Twitter{background:url('../image/icon_re.png') -55px 2px;float:left;height:42px;width:45px;}
#IC_facebook{background:url('../image/icon_re.png') 0 0;float:left;height:40px;margin-left:5px;width:35px;}
#IC_Blog{background:url('../image/icon_re.png') 0 -45px;float:left;height:40px;margin-left:5px;width:35px;}
#IC_google{background:url('../image/icon_re.png') 0 -90px;float:left;height:40px;margin-left:5px;width:35px;}
#IC_multiply{background:url('../image/icon_re.png') 0 -136px;float:left;height:40px;margin-left:5px;width:35px;}
#JobMenuMidlenotborder li{background:transparent url('../images/button_active_M.png');border:0 solid #dcdce9;color:#000;display:block;float:left;font-weight:700;height:38px;line-height:2.5em;text-align:center;text-decoration:none;width:7em;}
#JobMenuMidlenotborder li a:hover{background:url('../images/button_no_active_M.png') #fff bottom left repeat-x;border:0 solid #dcdce9;color:#fff;display:block;float:left;font-weight:700;height:38px;line-height:2.5em;text-align:center;text-decoration:none;width:7em;}
#JobShadowLeft{background:transparent url('../images/ShadowLeft.gif');overflow:hidden;}
#JobShadowRight{background:transparent url('../images/ShadowRight.gif');overflow:hidden;}
#LiveChat08{background:url('../image/LiveChat08.jpg') no-repeat;}
#LiveChat09{background:url('../image/LiveChat09.jpg') no-repeat;}
#LiveChat09EN{background:url('../image/LiveChat09_e.jpg') no-repeat;}
#LiveChat11{background:url('../image/LiveChat11.jpg') no-repeat;}
#LiveChat11EN{background:url('../image/LiveChat11_e.jpg') no-repeat;}
#MemberBottom{background:url('../image/icon_re.png') 0 -627px;height:15px;width:197px;}
#MemberTop{background:url('../image/icon_re.png') 0 -581px;height:36px;width:197px;}
#NewsBar46{background:url('../image/Bar.png') 0 -749px;height:49px;padding:15px 0 0 100px;text-align:left;width:347px;}
#NewsBarAll{float:left;margin:0 10px;text-align:left;width:445px;}
#PackageBar24{background:url('../image/Bar.png') 0 -896px;height:38px;width:294px;}
#RewardAll{float:left;text-align:left;width:327px;}
#RewardBar{background:url('../image/Bar.png') 0 -346px;height:27px;padding:15px 0 0 100px;text-align:left;width:227px;}
#Reword44{background:url('../image/Reword44.jpg') no-repeat;}
#Reword48{background:url('../image/Bar.png') 0 -474px;height:72px;width:327px;}
#Reword48EN{background:url('../image/Bar.png') -336px -474px;height:72px;width:327px;}
#Reword50{background:url('../image/Bar.png') 0 -398px;height:66px;width:327px;}
#Reword50EN{background:url('../image/Bar.png') -336px -398px;height:66px;width:327px;}
#Reword51{background:url('../image/Bar.png') 0 -556px;height:75px;width:327px;}
#Reword51EN{background:url('../image/Bar.png') -336px -556px;height:75px;width:327px;}
#Reword52{background:url('../image/Bar.png') 0 -641px;height:98px;width:327px;}
#Reword52EN{background:url('../image/Bar.png') -336px -641px;height:98px;width:327px;}
#SearchBox{background:url('../image/SearchBox.jpg') no-repeat;}
#ShadowLeft{background:transparent url('../image/ShadowLeft.gif');overflow:hidden;}
#SignUp17{background:url('../image/SignUp17.jpg') no-repeat;}
#SignUp19{background:url('../image/SignUp19.jpg') no-repeat;height:75px;text-align:center;width:250px;}
#SignUp20{background:url('../image/SignUp20.jpg') no-repeat;}
#SlidePromotion{background:url('../image/SlidePromotion.jpg') no-repeat;}
#Staff_BT{background:url('../image/icon_re.png') 0 -423px;float:left;height:78px;margin-left:20px;width:150px;}
#ViewPackageBottom{background:url('../package/images/viewPackage24.jpg') no-repeat;overflow:hidden;}
#ViewPackageTop{background:url('../package/images/viewPackage23.jpg') no-repeat;overflow:hidden;}
#Work_mushroom_BT{background:url('../image/icon_re.png') 0 -511px;float:left;height:60px;margin-left:20px;width:150px;}
#boxSocial{margin:5px 5px 5px 30px;height: 40px;}
#box_menu{height:34px;margin-left:0;margin-top:10px;padding:0;}
#box_menu li{display:inline;}
#box_menu li a{padding:0;text-decoration:none;}
#box_tab{height:350px;margin:0;width:249px;}
#box_tabbox{height:224px;margin:0;width:400px;}
#boxmail{background:url('../image/icon_re.png') 0 -180px;height:75px;margin:0px auto 0px auto; text-align:center;width:169px;}
#jobMainMenuleft{height:38px;}
#livechat1{background:url('../package/images/livechat1.jpg') no-repeat;overflow:hidden;}
#livechat15{background:url('../package/images/livechat15.jpg') no-repeat;overflow:hidden;}
#livechat18{background:url('../package/images/livechat18.jpg') no-repeat;overflow:hidden;}
#livechat21{background:url('../package/images/livechat21.jpg') no-repeat;overflow:hidden;}
#livechat6{background:url('../package/images/livechat6.jpg') no-repeat;overflow:hidden;}
#livechat7{background:url('../package/images/livechat7.jpg') no-repeat;overflow:hidden;}
#livechat9{background:url('../package/images/livechat9.jpg') no-repeat;overflow:hidden;}
#nav-menu{width:1000px;}
#nav-menu li{float:left;margin:0;}
#nav-menu li a{background:url('../images/button_active_M.png') #fff bottom left repeat-x;border:0 solid #dcdce9;color:#000;display:block;float:none;font-weight:700;height:38px;line-height:2.5em;padding:0 7px;text-align:center;text-decoration:none;width:auto;}
#nav-menu li a:hover{background:url('../images/button_no_active_M.png') #fff bottom left repeat-x;border:0 solid #dcdce9;border-right:1px solid #A3A3A3;color:#fff;display:block;float:left;font-weight:700;height:38px;line-height:2.5em;padding:0 7px;text-align:center;text-decoration:none;width:auto;}
#nav-menu ul{list-style:none;margin:0;padding:0;}
#nav-menublock{background:url('../images/button_active_M.png') #fff bottom left repeat-x;border:0 solid #dcdce9;border-right:1px solid #A3A3A3;color:#000;display:block;float:left;font-weight:700;height:38px;text-align:center;text-decoration:none;width:1px;}
#newLeft{float:left;height:87px;margin:10px;text-align:left;width:122px;}
.A12FFFFFF{color:#fff;font-family:Arial;font-size:12px;text-decoration:none;}
.AffBar_G1{background:transparent url('../images/Bar_G1.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_G2{background:transparent url('../images/Bar_G2.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_G3{background:transparent url('../images/Bar_G3.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_G4{background:transparent url('../images/Bar_G4.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_G5{background:transparent url('../images/Bar_G5.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_O1{background:transparent url('../images/Bar_O1.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_O2{background:transparent url('../images/Bar_O2.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_O3{background:transparent url('../images/Bar_O3.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_O4{background:transparent url('../images/Bar_O4.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.AffBar_O5{background:transparent url('../images/Bar_O5.png') no-repeat;height:30px;overflow:hidden;width:153px;}
.Affhead-bar_1{background:transparent url('../images/head-bar_1.png') no-repeat;height:32px;overflow:hidden;width:32px;}
.Affhead-bar_2{background:url('../images/head-bar_2.png');}
.Affhead-bar_3{background:transparent url('../images/head-bar_3.png') no-repeat;height:32px;overflow:hidden;width:19px;}
.AirAsiaarrow{background:transparent url('../images/arrow.gif') no-repeat;height:42px;width:75px;}
.AirAsiabox_1{background:transparent url('../images/box_1.png') no-repeat;height:71px;overflow:hidden;width:73px;}
.AirAsiabox_1-1{background:transparent url('../images/box_1-1.png') no-repeat;height:71px;overflow:hidden;width:359px;}
.AirAsiabox_2{background:transparent url('../images/box_2.png') no-repeat;height:69px;width:73px;}
.AirAsiabox_2-1{background:transparent url('../images/box_2-1.png') no-repeat;height:69px;width:359px;}
.AirAsiabox_3{background:transparent url('../images/box_3.png') no-repeat;height:83px;width:73px;}
.AirAsiabox_3-1{background:transparent url('../images/box_3-1.png') no-repeat;height:83px;width:359px;}
.AirAsiabr_L{background:transparent url('../images/br_L.png') no-repeat;height:43px;width:15px;}
.AirAsiabr_R{background:transparent url('../images/br_R.png') no-repeat;height:43px;width:16px;}
.AirAsiabr_m{background:url('../images/br_m.png');}
.AirAsiahead_1{background:transparent url('../images/head_1.png') no-repeat;height:170px;overflow:hidden;width:333px;}
.AirAsiahead_2{background:transparent url('../images/head_2.png') no-repeat;height:170px;overflow:hidden;width:333px;}
.AirAsiahead_3{background:transparent url('../images/head_3.png') no-repeat;height:170px;overflow:hidden;width:334px;}
.AirAsiahead_box{background:transparent url('../images/head_box.png') no-repeat;height:83px;overflow:hidden;width:446px;}
.AirAsiahead_box2{background:transparent url('../images/head_box2.png') no-repeat;height:263px;overflow:hidden;width:446px;}
.AirAsiahead_box3{background:transparent url('../images/head_box3.png') no-repeat;height:194px;width:446px;}
.AirAsialogo_1{background:transparent url('../images/logo_1.png') no-repeat;height:43px;width:36px;}
.AirAsialogo_2{background:transparent url('../images/logo_2.png') no-repeat;height:43px;width:47px;}
.AirAsialogo_3{background:transparent url('../images/logo_3.png') no-repeat;height:43px;width:36px;}
.AirAsiat_1{background:transparent url('../images/t_1.png') no-repeat;height:26px;width:29px;}
.AirAsiat_2{background:transparent url('../images/t_2.png') no-repeat;height:69px;width:29px;}
.AirAsiat_3{background:transparent url('../images/t_3.png') no-repeat;height:83px;width:29px;}
.BG_air-asia{background:transparent url('../images/BG_air-asia.jpg');height:100%;overflow:hidden;width:1000px;}
.BG_mapnokair{background:transparent url('../images/map.png');background-repeat:no-repeat;height:474px;width:1000px;}
.Backgroud{background-color:#ededed;}
.Bg670header{background:url(../IFameFlight/Images/BG_box-s_1.png) no-repeat;height:20px;margin:0;width:633px;}
.BgAffilate{background:url(../IFameFlight/Images/bg_box.png) no-repeat;height:196px;width:400px;}
.BgAffilateImage1{background:url(../IFameFlight/Images/image1.png) no-repeat;height:190px;width:140px;}
.BgBottomFlight{background:url('../image/SearchBox-bottom.jpg') no-repeat;height:15px;width:249px;}
.BgBrown{background-color:#C7B299;color:#330;font-family:Arial;font-size:18px;font-weight:700;height:30px;}
.BgEmailenq{background:url('../package/images/Email%20TourDetail.png') no-repeat;height:45px;padding-top:11px;text-align:center;vertical-align:top;width:120px;}
.BgEmailenq-center{background:url('../package/images/Email%20TourDetail.png') no-repeat;background-position:center;height:45px;padding-top:5px;text-align:center;vertical-align:top;width:120px;}
.BgEmailenqfb{background:url('../package/images/Emailfb%20TourDetail.png') no-repeat;height:45px;padding-top:11px;text-align:center;vertical-align:top;width:120px;}
.BgFLIGHT_01{height:186px;overflow:hidden;width:588px;}
.BgFLIGHT_02{height:186px;overflow:hidden;width:412px;}
.BgFLIGHT_03{height:348px;overflow:hidden;width:588px;}
.BgFLIGHT_04{height:348px;overflow:hidden;width:412px;}
.BgFLIGHT_05{height:166px;overflow:hidden;width:588px;}
.BgFLIGHT_06{height:166px;overflow:hidden;width:412px;}
.BgFLIGHT_Thai_01{height:171px;overflow:hidden;width:1000px;}
.BgFLIGHT_Thai_02{height:379px;overflow:hidden;width:1000px;}
.BgFLIGHT_Thai_03{height:150px;overflow:hidden;width:1000px;}
.BgFlight{background:url('../image/mushroom_HOMEforWeb2_03.jpg') no-repeat;height:75px;width:83px;}
.BgFlightShow{background-color:#F68F1F;border:1px solid #F68F1F;margin:0;}
.BgHoner1{background:url('../image/1.jpg') no-repeat;}
.BgHoner10{background:url('../image/10.jpg') no-repeat;}
.BgHoner2{background:url('../image/2.jpg') no-repeat;}
.BgHoner3{background:url('../image/3.jpg') no-repeat;}
.BgHoner4{background:url('../image/4.jpg') no-repeat;}
.BgHoner5{background:url('../image/5.jpg') no-repeat;}
.BgHoner6{background:url('../image/6.jpg') no-repeat;}
.BgHoner7{background:url('../image/7.jpg') no-repeat;}
.BgHoner8{background:url('../image/8.jpg') no-repeat;}
.BgHoner9{background:url('../image/9.jpg') no-repeat;}
.BgHotel{background:url('../image/mushroom_HOMEforWeb2_05.jpg') no-repeat;height:75px;width:83px;}
.BgHotelsss{background:url('../package/images/Hotel%20TourDetail.png') no-repeat;height:53px;padding-left:25px;padding-top:13px;text-align:Left;vertical-align:top;width:191px;}
.BgL{background:url('../image/Reward_02.jpg') no-repeat;height:42px;width:17px;}
.BgL_new{background:url('../image/Bar.png') 0 -138px;float:left;height:42px;width:17px;}
.BgM{background:url('../image/Reward_03.jpg');height:42px;}
.BgM_new{background:url('../image/Reward_03.jpg');float:left;height:42px;text-align:left;}
.BgNew1{background:url('../images/01%20content-news.gif') no-repeat;height:21px;width:30px;}
.BgNew10{background:url('../images/10%20content-news.gif');}
.BgNew13{background:url('../images/13%20content-news.gif') no-repeat;height:65px;width:30px;}
.BgNew14{background:url('../images/14%20content-news.gif') no-repeat;font-size:7px;height:9px;width:30px;}
.BgNew16{background:url('../images/16%20content-news.gif');font-size:7px;height:9px;}
.BgNew18{background:url('../images/18%20content-news.gif') no-repeat;font-size:7px;height:9px;width:8px;}
.BgNew3{background:url('../images/03%20content-news.gif');}
.BgNew5{background:url('../images/05%20content-news.gif') no-repeat;height:21px;width:8px;}
.BgNew6{background:url('../images/06%20content-news.gif') no-repeat;height:28px;width:30px;}
.BgNew9{background:url('../images/09%20content-news.gif');}
.BgNoHoner1{background:url('../image/1-g.jpg') no-repeat;}
.BgNoHoner10{background:url('../image/10-g.jpg') no-repeat;}
.BgNoHoner2{background:url('../image/2-g.jpg') no-repeat;}
.BgNoHoner3{background:url('../image/3-g.jpg') no-repeat;}
.BgNoHoner4{background:url('../image/4-g.jpg') no-repeat;}
.BgNoHoner5{background:url('../image/5-g.jpg') no-repeat;}
.BgNoHoner6{background:url('../image/6-g.jpg') no-repeat;}
.BgNoHoner7{background:url('../image/7-g.jpg') no-repeat;}
.BgNoHoner8{background:url('../image/8-g.jpg') no-repeat;}
.BgNoHoner9{background:url('../image/9-g.jpg') no-repeat;}
.BgNobar{background:url('../image/001.png') no-repeat;height:25px;text-align:center;width:127px;}
.BgNobarBox{background:url(../IFameFlight/Images/noselect.png) no-repeat;height:27px;text-align:center;width:97px;}
.BgPackageNearL{border-bottom:1px solid gray;border-left:1px solid gray;border-top:1px solid gray;text-align:left;width:30px;}
.BgPackageNearM{border-bottom:1px solid gray;border-top:1px solid gray;height:150px;text-align:center;}
.BgPackageNearR,.JobBgNearR{border-bottom:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;text-align:Right;width:30px;}
.BgPackage_LF{background:url('../package/images/BottomLeft.png');height:15px;width:13px;}
.BgPackage_LM{background:url('../package/images/Left.png');width:13px;}
.BgPackage_LT{background:url('../package/images/TopLeft.png') no-repeat;height:12px;width:13px;}
.BgPackage_MF{background:url('../package/images/Bottom.png');height:15px;}
.BgPackage_RF{background:url('../package/images/BottmRight.png');height:15px;width:13px;}
.BgPackage_RM{background:url('../package/images/Right.png');width:13px;}
.BgPackage_RT{background:url('../package/images/TopRight.png') no-repeat;height:12px;width:13px;}
.BgPackage_T{background:url('../package/images/Top.png');height:12px;}
.BgPicPackage{background:url('../package/images/borderBrown.jpg') no-repeat;}
.BgPicPackage_LF{background:url('../package/images/LF_pic.png');height:40px;width:8px;}
.BgPicPackage_LM{background:url('../package/images/LM_pic.png');}
.BgPicPackage_LT{background:url('../package/images/LT_pic.png') no-repeat;width:8px;}
.BgPicPackage_MF{background:url('../package/images/MF_pic.png');}
.BgPicPackage_RF{background:url('../package/images/RF_pic.png');height:40px;width:8px;}
.BgPicPackage_RM{background:url('../package/images/RM_pic.png');}
.BgPicPackage_RT{background:url('../package/images/RT_pic.png') no-repeat;height:9px;}
.BgPicPackage_T{background:url('../package/images/MT_pic.png');vertical-align:top;}
.BgR{background:url('../image/Reward_01.jpg') no-repeat;height:42px;width:17px;}
.BgR_new{background:url('../image/Bar.png') 0 -190px;float:left;height:42px;width:17px;}
.BgReview{background:url('../package/images/btn_review%20TourDetail.jpg') no-repeat;height:51px;padding-left:20px;padding-top:14px;text-align:Left;vertical-align:top;width:221px;}
.BgSeefull{background:url('../package/images/Seefull%20TourDetail.png') no-repeat;height:53px;padding-left:20px;padding-top:13px;text-align:Left;vertical-align:top;width:191px;}
.BgSendenq{background:url('../package/images/Send%20TourDetail.png') no-repeat;height:45px;padding-top:10px;text-align:center;vertical-align:top;width:120px;}
.BgTitelEN{background:url(../IFameFlight/Images/T_2.png) no-repeat;background-position:center center;height:24px;width:160px;}
.BgTitelTh{background:url(../IFameFlight/Images/text.png) no-repeat;background-position:center center;height:24px;width:160px;}
.BgWB01{background:url('../image/WB_01.jpg') no-repeat;height:77px;overflow:hidden;width:605px;}
.BgWB03{background:url('../image/WB_03.jpg');height:6px;width:28px;}
.BgWB05{background:url('../image/WB_05.jpg');width:21px;}
.BgWB06{background:url('../image/WB_06.jpg') no-repeat;height:86px;overflow:hidden;width:605px;}
.BgWB08{background:url('../image/WB_08.jpg');}
.BgWB12{background:url('../image/WB_12.jpg');width:13px;}
.BgWB15{background:url('../image/WB_15.jpg');width:26px;}
.BgWW_white{background-color:#FFF;}
.BgWhite{background-color:#FFF;border:1px solid #c0bfbe;height:82px;margin:5px;}
.Bg_RegisterL{color:#000;text-align:right;width:120px;}
.Bg_RegisterR{color:#000;text-align:right;width:95px;}
.BgbarBox670{background:url(../IFameFlight/Images/BT_white.png) no-repeat;color:#F90;float:left;height:15px;margin-top:5px;text-align:center;width:100px;}
.Bgbarbar{background:url('../image/002.png') no-repeat;height:25px;text-align:center;width:127px;}
.BgbarbarBox{background:url(../IFameFlight/Images/select.png) no-repeat;height:27px;text-align:center;width:97px;}
.BgbtnReadmore{background:url('../images/mushroomPage3_2.png') no-repeat;height:38px;padding-top:7px;text-align:center;vertical-align:top;width:97px;}
.Bgdot{background:url('../package/images/dot%20TourDetail.gif') no-repeat;background-position:center center;width:13px;}
.Bgdownload{background:url('../package/images/download%20TourDetail.png') no-repeat;height:69px;width:213px;}
.BgnoFlight{background:url('../image/mushroom_HOMEforWeb_03.jpg') no-repeat;height:75px;width:83px;}
.BgnoHotel{background:url('../image/mushroom_HOMEforWeb_05.jpg') no-repeat;height:75px;width:83px;}
.BgnobarBox670{background:url(../IFameFlight/Images/BT_orange.png) no-repeat;float:left;height:15px;margin-top:5px;text-align:center;width:100px;}
.Bgnopackage{background:url('../image/mushroom_HOMEforWeb_07.jpg') no-repeat;height:75px;width:83px;}
.Bgpackage{background:url('../image/mushroom_HOMEforWeb2_07.jpg') no-repeat;height:75px;width:83px;}
.BgpackageBottom{background:url('../image/SearchBox-bottom.jpg') no-repeat;height:15px;width:254px;}
.BgtourShow{background-color:#F68F1F;border:1px solid #F68F1F;margin-left:0;margin-top:0;}
.BgtourSlider{background-color:#F68F1F;}
.Border_AR{background-color:#FFF;border:1px solid silver;padding:3px;}
.BottonLogout{background-color:#F60;border:0;color:#fff;font-size:12px;font-weight:700;height:20px;text-align:center;text-decoration:none;width:40px;}
.Box320Pad5{padding:5px;width:320px;}
.BoxBody{background-color:#FFF;height:100%;width:1024px;}
.BoxFM{background:url('../package/images/FM_box.png');}
.BoxLM{background:url('../package/images/LM_box.png');}
.BoxLeft{float:Left;}
.BoxLeft100{float:left;height:auto;width:100px;}
.BoxLeft150{float:left;width:150px;}
.BoxLeft150_R{float:left;text-align:right;width:150px;}
.BoxLeft200{float:left;width:200px;}
.BoxLeft250{float:left;width:250px;}
.BoxLeft280{float:left;width:280px;}
.BoxLeft300{float:left;width:300px;}
.BoxLeft350{float:left;width:350px;}
.BoxLeft500{float:left;margin-left:5px;width:500px;}
.BoxLeft650{float:left;width:650px;}
.BoxLeft80{float:left;margin:25px 10px 5px 25px;width:500px;}
.BoxLeftImage{float:Left;margin:5px 10px 0 10px;text-align:center;width:90px;}
.BoxLeftTitle{float:Left;margin:5px 0px 0;text-align:left;width:175px;}
.BoxLeftpadding-bottom10{float:right;padding-bottom:10px;text-align:justify;width:520px;}
.BoxMaginLR12{margin:0 12px;width:1000px;}
.BoxMain{margin:2px auto 0;width:1024px;}
.BoxMarginLeft20{float:left;margin:0 0 15px 30px;white-space:nowrap;}
.BoxMarginLeft250{margin-left:250px;}
.BoxMarginRight100{float:left;padding-bottom:10px;white-space:nowrap;}
.BoxRM{background:url('../package/images/RM_box.png');}
.BoxRequest{background-color:red;border:1px solid #FFF;font-size:16px;width:2px;}
.BoxRight{float:right;}
.BoxSubOperation{float:left;padding:5px 5px 10px 0;}
.BoxSubOperationLeft{background-color:#F2F2F2;float:left;height:346px;padding:20px 10px 10px 0;width:250px;}
.BoxSubOperationright{background-color:#F2F2F2;float:right;width:800px;}
.BoxTM{background:url('../package/images/TM_box.png');}
.Boxdestination{float:left;margin:0 0 5px 15px;width:350px;}
.Boxleft50,.BoxMarginRight50{float:left;width:50px;}
.BoxmaginTop10{line-height:15px;width:300px;}
.BrowTab{background-color:#6E573F;clear:both;height:4px;margin:0 auto;width:1000px;}
.CustoServiceL120{float:left;margin:5px;width:120px;}
.CustoServiceL150{float:left;margin:5px;width:120px;}
.CustoServiceL200{float:left;margin:5px;width:200px;}
.CustoServiceL40{float:left;margin:5px;width:40px;}
.CustoServiceL50{float:left;margin:5px;width:40px;}
.CustoServiceL60{float:left;margin:5px;width:60px;}
.CustoServiceL80{float:left;margin:5px;width:80px;}
.CustoServiceL80Red{float:left;margin:5px;width:80px; font-weight:bold; color:Red;}
.Dealsbox{float:left;height:41px;margin-top:4px;text-align:right;width:163px;}
.FlightBar{background:transparent url('../image/FlightMaster-bar.jpg');overflow:hidden;}
.FlightTab1{background:transparent url('../image/FlightTab1.png') no-repeat;background-position:bottom right;height:26px;overflow:hidden;text-align:center;width:121px;}
.FlightTab2{background:transparent url('../image/FlightTab2.png') no-repeat;background-position:bottom left;overflow:hidden;}
.Footerdf{background:transparent url('../image/Bar.png') 0 -869px;height:17px;overflow:hidden;width:300px;}
.ForgetLoginFrom{background:url('../image/Login_2.jpg') no-repeat;background-position:right;height:157px;width:408px;}
.GridGreen1{background:url('../package/images/GridGreen1.jpg') no-repeat;}
.GridGreen26{background:url('../package/images/GridGreen26.jpg') no-repeat;}
.GridGreen27{background:url('../package/images/GridGreen27.jpg') no-repeat;}
.GridGreen31{background:url('../package/images/GridGreen31.jpg');}
.GridGreen33{background:url('../package/images/GridGreen33.jpg');}
.GridGreen41{background:url('../package/images/GridGreen41.jpg');}
.GridGreen42{background:url('../package/images/GridGreen42.jpg');}
.GridGreen43{background:url('../package/images/GridGreen43.jpg');}
.GridPakage10{background:url('../package/images/GridPakage10.jpg');}
.LTour{background:url('../package/images/LTour.png'); width:82px; background-repeat:no-repeat; height:43px;}
.MTour{background:url('../package/images/MTour.png'); height:43px;}
.RTour{background:url('../package/images/RTour.png'); width:20px; background-repeat:no-repeat; height:43px;}
.GuidebookFoot{background:transparent url('../Guidebook/Image/box_GB_footer.png') no-repeat;height:22px;overflow:hidden;width:185px;}
.GuidebookHead{background:transparent url('../Guidebook/Image/box_GB_head.png') no-repeat;height:84px;overflow:hidden;width:185px;}
.Guidebookbg{background:transparent url('../Guidebook/Image/box_Long.png') repeat;width:185px;}
.Header{background:transparent url('../image/Header.jpg') no-repeat;height:112px;margin:0;overflow:hidden;padding:0;width:1000px;}
.Header_airasia{background:transparent url('../image/Header_airasia.jpg') no-repeat;height:112px;margin:0;overflow:hidden;padding:0;width:1000px;}
.HrGray{border-color:gray;border-top-style:dotted;border-width:thin;text-align:center;width:620px;}
.HrOrange{border-bottom-color:#F90;border-bottom-width:1px;border-top-style:solid;}
.HrGray1{border-bottom-color:gray;border-bottom-width:1px;border-top-style:solid;}
.Hrrad{border-color:#F33;border-top-style:dotted;border-width:1px;text-align:center;width:280px;}
.ImgExclude{background:transparent url('../package/images/Bullet-Red%20TourDetail.png') no-repeat;background-position:top top;float:left;height:16px;padding:5px;width:16px;}
.ImgInclude{background:transparent url('../package/images/Bullet-Green%20TourDetail.png') no-repeat;background-position:top top;float:left;height:16px;padding:5px;width:16px;}
.ImgLoad{background:url('../image/load.png') no-repeat;float:left;height:24px;margin:5px 5px 0;width:24px;}
.ImgTemss{background:transparent url('../package/images/Bullet-Blue%20TourDetail.png') no-repeat;background-position:top top;float:left;height:16px;padding:5px;width:16px;}
.JobBgNearL{border:1px solid gray;}
.JobBgNearM{border-bottom:1px solid gray;border-top:1px solid gray;height:150px;text-align:left;}
.JobForm_h{background:transparent url('../job/image/job_h1.jpg');height:283px;width:372px;}
.JobForm_h1{background:transparent url('../job/image/job_h2.jpg');height:283px;width:628px;}
.JobLogo_h3{background:transparent url('../job/image/job_h3.jpg');height:69px;width:307px;}
.JobMBG{background:transparent url('../job/image/topcenter.gif');height:17px;}
.JobMenuLeft{background:transparent url('../images/button_active_S.png') no-repeat;float:left;height:38px;width:8px;}
.JobMenuMidle{background:url('../images/button_active_M.png') 50% top;border-right:1px solid #A3A3A3;float:left;height:38px;line-height:2.5em;padding:0 7px;text-align:center;width:70px;}
.JobMenuMidleNoAtive{background:transparent url('../images/button_active_M.png');height:38px;vertical-align:middle;}
.JobMenuMidle_logo{background:transparent url('../images/button_active_M.png');border-right:1px solid #A3A3A3;float:left;height:38px;width:auto;}
.JobMenuRight{background:transparent url('../images/button_active_S2.png') no-repeat;float:left;height:38px;width:8px;}
.JobSerch_Top_L{background:transparent url('../job/image/box_top_L.png');height:22px;width:22px;}
.JobSerch_Top_R{background:transparent url('../job/image/box_top_R.png');height:22px;width:22px;}
.JobSerch_low_L{background:transparent url('../job/image/box_low_L.png');height:22px;width:22px;}
.JobSerch_low_R{background:transparent url('../job/image/box_low_R.png');height:22px;width:22px;}
.JobTopicBlue{background:transparent url('../images/topicblue.jpg');}
.Jobbox{border-bottom:1px solid gray;border-left:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;}
.JobboxHead{border-left:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;}
.Jobtopicbrown{background:transparent url('../images/topicbrown.jpg');}
.Jobtopicgreen{background:transparent url('../images/topicgreen.jpg');}
.Jobtopicoreng{background:transparent url('../images/topicoreng.jpg');}
.Jobtopicred{background:transparent url('../images/topicred.jpg');}
.Jobtopicreddark{background:transparent url('../images/topicreddark.jpg');}
.Jobtopicwrite{background:transparent url('../images/topicwrite.jpg');}
.L100M020010{float:left;margin:0 20px 0 10px;width:100px;}
.L12MT10{float:left;margin-top:10px;width:12px;}
.L12MT15{float:left;margin-top:15px;width:12px;}
.L20001000{float:left;margin:0 10px 0 0;width:200px;}
.L200010150{float:left;margin:0 10px 10px 0;width:200px;}
.L21050025{float:left;margin:5px 0 0 25px;text-align:left;width:210px;}
.L35MT10{float:left;margin-top:10px;width:35px;}
.L60{float:left;width:60px;}
.L65MT10{float:left;margin-top:10px;width:65px;}
.L80{float:left;width:80px;}
.L90M01000{float:left;margin-right:10px;width:90px;}
.LoginFrom{background:url('../image/Login_1.jpg') no-repeat;height:191px;width:408px;}
.LoginFrom_Write{background:url('../image/Login_1.png') no-repeat;height:191px;width:408px;}
.MWFC15115{float:left;margin-left:25px;width:98px;}
.Marbokflight{margin:5px 0;}
.MarginBottom30{margin-bottom:30px;}
.MarginL10{margin-left:10px;}
.MarginLeft25{margin:10px 0 25px 15px;}
.MemberBG{background-color:#cae6ef;padding-left:3px;text-align:left;}
.MemberBG td{padding-left:3px;vertical-align:middle;}
.MemberBG td:hover{background-color:#9cf;}
.MenuBackOff{background-color:#CECECE;color:#04699B;font-family:Arial;font-size:23px;font-weight:700;height:auto;padding:10px 0 10px 10px;text-decoration:none;width:200px;}
.Morethantravel{color:#808184;font-family:Myriad Pro;font-size:20px;margin-top:0;text-align:right;width:212px;}
.MushroomTravel{float:left;height:52px;margin-top:20px;text-align:left;width:215px;}
.NCA_1{background:url('../flight/images/NCA_1.jpg') no-repeat;height:24px;width:209px;}
.NCA_1 a:hover{background:url('../flight/images/NCA_2.jpg') no-repeat;height:24px;width:209px;}
.News1{float:left;text-align:right;vertical-align:middle;width:194px;}
.PMF_Bg{background:transparent url('../landingpage/PMF_2.png');width:340px;}
.PMF_Footer{background:transparent url('../landingpage/PMF_3.png') no-repeat;height:30px;width:340px;}
.PMF_header{background:transparent url('../landingpage/PMF_1.png') no-repeat;height:126px;width:340px;}
.PagingG{background-color:#fff;border-bottom:#D2691E 1px outset;border-left:#D2691E 1px outset;border-right:#D2691E 1px outset;border-top:#D2691E 1px outset;color:#d2691e;cursor:hand;font-family:Verdana, Tahoma, Arial;font-size:10pt;font-weight:700;text-align:center;}
.Samerica_1{background:url('../flight/images/Samerica_1.jpg') no-repeat;height:24px;width:120px;}
.Samerica_1 a:hover{background:url('../flight/images/Samerica_2.jpg') no-repeat;height:24px;width:120px;}
.ShadowRight{background:transparent url('../image/ShadowRight.gif');overflow:hidden;}
.StarRemark{background:url('../image/star.gif') no-repeat;height:10px;width:11px;}
.TDFooter{border-bottom-color:gray;border-bottom-style:dotted;border-bottom-width:thin;}
.TDFooter_blue{border-bottom-color:#69C;border-bottom-style:dotted;border-bottom-width:1px;}
.Testimonial01{background:url('../image/Bar.png') 0 0;height:77px;width:296px;}
.Testimonial05{background:url('../image/Testimonial_05.gif');}
.Testimonial06{background:url('../image/Testimonial_06.gif');}
.Testimonial09{background:url('../image/Bar.png') 0 -117px;}
.Titlecheepflight{float:left;width:400px;}
.TopLeft{background-image:url('../flight/images/topLeft.gif');float:left;height:15px;margin-top:5px;width:15px;}
.TopMid{background-color:#FFF;float:left;height:15px;margin-top:5px;width:994px;}
.TopRight{background-image:url('../flight/images/topRight.gif');float:left;height:15px;margin-top:5px;width:15px;}
.UiProduct{margin:0 0 5px;text-align:left;}
.VisaBg{background:transparent url('../images/t_02.png');height:32px;}
.VisaL{background:transparent url('../images/t_01.png') no-repeat;height:32px;width:10px;}
.VisaR{background:transparent url('../images/t_03.png') no-repeat;height:32px;width:10px;}
.W420M00025{margin:0 0 0 25px;width:420px;}
.africa_1{background:url('../flight/images/africa_1.jpg') no-repeat;height:24px;width:64px;}
.africa_1 a:hover{background:url('../flight/images/africa_2.jpg') no-repeat;height:24px;width:64px;}
.arrowpath{background:url('../package/images/arrow.gif') no-repeat;float:left;height:9px;margin:5px 5px 0;width:15px;}
.asia_1{background:url('../flight/images/asia_1.jpg') no-repeat;height:24px;width:47px;}
.asia_1 a:hover{background:url('../flight/images/asia_2.jpg') no-repeat;height:24px;width:47px;}
.australla_1{background:url('../flight/images/australla_1.jpg') no-repeat;height:24px;width:79px;}
.australla_1 a:hover{background:url('../flight/images/australla_2.jpg') no-repeat;height:24px;width:79px;}
.backairasia{float:right;margin-right:10px;position:relative;}
.backairasia a{color:#000;text-decoration:none;}
.backairasia a:hover{color:Green;text-decoration:none;}
.bar_01{background:url('../package/images/bar_01.jpg') no-repeat;}
.bar_02{background:url('../package/images/bar_02.jpg') no-repeat;}
.bar_03{background:url('../package/images/bar_03.jpg') no-repeat;}
.bar_05{background:url('../package/images/bar_05.jpg');}
.bar_06{background:url('../package/images/bar_06.jpg') no-repeat;}
.bar_07{background:url('../package/images/bar_07.jpg') no-repeat;}
.bg2{background:url('../images/bg00.png') repeat 0 0;padding:30px 36px 30px 38px;}
.bgMenuBackoff{background:transparent url(../img/arrow_red.gif) no-repeat;height:20px;padding:0 0 5px 10px;width:200px;}
.bgblank{background:url('../package/images/soldout.png') no-repeat right top;height:74px;left:448px;padding:10px;position:absolute;text-align:right;top:796px;width:137px;}
.bgdate{background:transparent url('../operation/image/icon/bg_wan.png') no-repeat;font-weight:700;height:26px;padding:5px;width:76px;}
.bggradient1{background:transparent url('../job/image/gradient1.gif');height:56px;}
.bgmap{background:url('../images/map.png');background-repeat:no-repeat;height:500px;width:1000px;}
.bgvisaPrice{background-color:#E1F0FF;margin:5px;padding:10px;width:600px;}
.bgworldwideBottomleft{background-image:url('../flight/images/templateWorldwide3.gif');float:left;height:320px;width:350px;}
.bgworldwideBottomleft-Airline{background-image:url('../flight/images/bgworldwideBottomleft-Airline.gif');float:left;height:320px;width:350px;}
.bgworldwideBottomleft-airport{background-image:url('../flight/images/bgworldwideBottomleft-airport.gif');float:left;height:320px;width:350px;}
.bgworldwideBottomleft-city{background-image:url('../flight/images/bgworldwideBottomleft-city.gif');float:left;height:320px;width:350px;}
.bgworldwideBottomleft-country{background-image:url('../flight/images/bgworldwideBottomleft-country.gif');float:left;height:320px;width:350px;}
.bgworldwideTopLeft{background-image:url('../flight/images/templateWorldwide1.gif');float:left;height:112px;width:350px;}
.bgworldwideTopLeft-Airline{background-image:url('../flight/images/bgworldwideTopLeft-Airline.gif');float:left;height:112px;width:350px;}
.bgworldwideTopLeft-airport{background-image:url('../flight/images/bgworldwideTopLeft-airport.gif');float:left;height:112px;width:350px;}
.bgworldwideTopLeft-country{background-image:url('../flight/images/bgworldwideTopLeft-country.gif');float:left;height:112px;width:350px;}
.bgworldwideTopRight{background-image:url('../flight/images/templateWorldwide2.gif');float:left;height:112px;width:650px;}
.bgworldwideTopRight-Airline{background-image:url('../flight/images/bgworldwideTopRight-Airline.gif');float:left;height:112px;width:650px;}
.bgworldwideTopRight-airport{background-image:url('../flight/images/bgworldwideTopRight-airport.gif');float:left;height:112px;width:650px;}
.bgworldwideTopRight-country{background-image:url('../flight/images/bgworldwideTopRight-country.gif');float:left;height:112px;width:650px;}
.bodyworldwide{background-color:#eaeae1;text-align:left;}
.bokstep *{background:#DFEFFF;display:block;font-size:.01em;height:1px;overflow:hidden;}
.bokstep,.bokstep_gray,.bokstep_Orange{display:block;}
.bokstep1{background:#e7f3c3;border-left:1px solid #f1f876;border-right:1px solid #f1f876;margin-left:3px;margin-right:3px;padding-left:1px;padding-right:1px;}
.bokstep2{background:#e5f2d1;border-left:1px solid #fbfd27;border-right:1px solid #fbfd27;margin-left:1px;margin-right:1px;padding-left:1px;padding-right:1px;}
.bokstep3{border-left:1px solid #e5f2d1;border-right:1px solid #e5f2d1;margin-left:1px;margin-right:1px;}
.bokstep4{border-left:1px solid #f1f876;border-right:1px solid #f1f876;}
.bokstep5{border-left:1px solid #e7f3c3;border-right:1px solid #e7f3c3;}
.bokstep_Orange *{background:#FFC547;display:block;font-size:.01em;height:1px;overflow:hidden;}
.bokstep_Orange1{background:#ffd375;border-left:1px solid #ffe6af;border-right:1px solid #ffe6af;margin-left:3px;margin-right:3px;padding-left:1px;padding-right:1px;}
.bokstep_Orange2{background:#ffd069;border-left:1px solid #fff9ec;border-right:1px solid #fff9ec;margin-left:1px;margin-right:1px;padding-left:1px;padding-right:1px;}
.bokstep_Orange3{border-left:1px solid #ffd069;border-right:1px solid #ffd069;margin-left:1px;margin-right:1px;}
.bokstep_Orange4{border-left:1px solid #ffe6af;border-right:1px solid #ffe6af;}
.bokstep_Orange5{border-left:1px solid #ffd375;border-right:1px solid #ffd375;}
.bokstep_Orangefg{background:#FFC547;padding-left:10px;}
.bokstep_gray *{background:#CCC;display:block;font-size:.01em;height:1px;overflow:hidden;}
.bokstep_gray1{background:#d8d89c;border-left:1px solid #e9e960;border-right:1px solid #e9e960;margin-left:3px;margin-right:3px;padding-left:1px;padding-right:1px;}
.bokstep_gray2{background:#d5d5a8;border-left:1px solid #f9f921;border-right:1px solid #f9f921;margin-left:1px;margin-right:1px;padding-left:1px;padding-right:1px;}
.bokstep_gray3{border-left:1px solid #d5d5a8;border-right:1px solid #d5d5a8;margin-left:1px;margin-right:1px;}
.bokstep_gray4{border-left:1px solid #e9e960;border-right:1px solid #e9e960;}
.bokstep_gray5{border-left:1px solid #d8d89c;border-right:1px solid #d8d89c;}
.bokstep_grayfg{background:#CCC;}
.bokstepfg{background:#DFEFFF;padding:0 10px;}
.bokstepfgP10{background:#DFEFFF;padding:10px;}
.boxMainOperation{padding:5px;text-align:left;}
.boxSAPL100{float:left;margin:5px 0 0;width:100px;}
.boxSAPL140{float:left;margin:5px 0 0;width:140px;}
.boxSAPL210{float:left;margin:5px 0 0 20px;width:210px;}
.boxSAPL21010{float:left;margin:5px 0 0 10px;width:210px;}
.boxSAPL21015{float:left;margin:25px 0 0 25px;width:210px;}
.boxSAPL260{float:left;margin:5px 0 0;width:260px;}
.box_LB{background:url('../flight/images/box_LB.jpg') no-repeat;height:16px;width:10px;}
.box_LT{background:url('../flight/images/box_LT.jpg') no-repeat;height:16px;width:10px;}
.box_M{background:url('../flight/images/box_M.jpg') repeat;width:10px;}
.box_MM{background:url('../flight/images/box_MM.jpg') repeat;height:10px;}
.box_RB{background:url('../flight/images/box_RB.jpg') no-repeat;height:16px;width:10px;}
.box_RT{background:url('../flight/images/box_RT.jpg') no-repeat;height:16px;width:10px;}
.box_tabbox670{float:left;height:20px;margin:0;width:633px;}
.box_tabboxMain670{float:left;height:206px;margin:0;width:633px;}
.boxairlinePopular{float:left;margin:0 10px 0 20px;text-align:left;width:610px;}
.boxairlineTKT{float:left;margin:0 10px;text-align:center;width:980px;}
.boxflightall{float:left;margin:10px 0;text-align:left;width:620px;}
.boxflightinbound{float:left;margin:10px 0 10px 5px;text-align:left;width:215px;}
.boxflightinbound_1{border:1px solid silver;padding:10px;}
.boxflightoutbound{float:left;margin:10px 0;text-align:left;width:390px;}
.boxflightoutbound_1{border:1px solid silver;padding:5px;}
.boxserachAirlineNormal{background-image:url(../IFameFlight/Images/box-se.jpg);float:left;height:250px;margin:0 10px 10px;text-align:left;width:630px;}
.boxserachAirlinePopular{background-image:url(../IFameFlight/Images/box670.png);float:left;height:185px;margin:0 10px 10px;text-align:left;width:630px;}
.boxshowAirline{border:1px solid silver;width:610px;}
.clearfloat{clear:both;}
.commaLeft{background:url('../image/Master_re.png') -57px 0;float:left;height:12px;width:16px;}
.commaRight{background:url('../image/Master_re.png') -80px 0;float:left;height:12px;width:16px;}
.dashedline{border-bottom:1px dotted #1A1A1A;margin-bottom:1px;margin-top:1px;}
.divAirasia{height:1450px;overflow:hidden;position:relative;width:480px;}
.droplinebar{float:left;margin:0 0 0 12px;text-align:center;width:1000px;}
.droplinebar ul li{background:url('../flight/images/menu-yellow-s.gif') no-repeat;color:#331501;display:inline;float:left;font-family:Arial;font-size:12px;font-weight:700;height:18px;padding:0;text-align:center;text-decoration:none;width:68px;}
.droplinebar ul li a{color:#331501;float:left;height:18px;text-align:center;text-decoration:none;width:68px;}
.droplinebar ul li a:hover,.droplinebar ul li .current{background:url('../flight/images/menu-blue-s.gif') no-repeat;color:#fff;height:18px;text-align:center;width:68px;}
.droplinebar ul li a:visited{color:#331501;height:18px;text-align:center;width:68px;}
.droplinebar ul,.subbar ul{float:left;margin:0;padding:0;text-align:center;}
.ds-map-group{background:url('../flight/images/world-map.jpg') 0 0;float:left;height:160px;margin:15px 30px 0 0;position:relative;width:292px;}
.ds-map-group .XXX-AFRC{left:160px;top:80px;}
.ds-map-group .XXX-ASIA{left:230px;top:45px;}
.ds-map-group .XXX-EURP{left:170px;top:25px;}
.ds-map-group .XXX-NAMR{left:60px;top:40px;}
.ds-map-group .XXX-OCEN{left:260px;top:100px;}
.ds-map-group .XXX-SAMR{left:94px;top:100px;}
.ds-map-group a{background:#FFF url('../flight/images/repeat-x.png') repeat-x 0 100%;border-color:#1E283C #1E283C #697387;border-style:solid;border-width:1px;color:#12315F;font-size:95%;padding:0 4px;position:relative;text-decoration:none;white-space:nowrap;z-index:1;zoom:1;}
.ds-map-group a:hover{text-decoration:underline;}
.ds-map-group li{position:absolute;}
.ds-map-group li ins{background:url('../flight/images/home-1.png') -189px 0;bottom:0;height:13px;left:50%;margin:0 0 0 -9px;position:absolute;width:17px;z-index:2;}
.ds-map-group li p{left:-50%;padding:0 9px 13px 0;position:relative;}
.ds-map-thai{background:url('../flight/images/mapthai.png') 0 0;float:left;height:160px;margin:15px 30px 0 0;position:relative;width:92px;}
.europe_1{background:url('../flight/images/europe_1.jpg') no-repeat;height:24px;width:67px;}
.europe_1 a:hover{background:url('../flight/images/europe_2.jpg') no-repeat;height:24px;width:67px;}
.flightcontentus{float:left;text-align:right;width:383px;}
.hidden{display:none;}
.iframeAirasia{height:1500px;left:-1px;position:absolute;top:-165px;width:480px;}
.imgBtnSearch{margin:0;}
.imgSearch{height:22px;margin:4px 0 0;width:240px;}
.jobmenu a:active{color:#00F;}
.jobmenu,.jobmenu a:hover{color:#000;margin:5px;}
.jobmenuhover{margin:5px;}
.lang{float:left;font-family:Myriad Pro;height:74px;margin-top:4px;text-align:right;width:219px;}
.leftbox{float:left;height:91px;vertical-align:middle;width:470px;}
.login{color:#000;font-size:12px;text-decoration:none;}
.logo{float:left;height:47px;margin-left:12px;margin-right:20px;margin-top:10px;}
.lowcostFight{background:url('../image/Lowcost.jpg') no-repeat center top;}
.mainmenu{background-color:#FFF;margin:0 12px;text-align:left;width:1000px;}
.menuRight{background:url('../image/Master_re.png') 0 -658px;float:left;height:25px;padding-top:7px;text-align:center;width:80px;}
.menublue{background:url('../image/Master_re.png') 0 -494px;float:left;height:25px;padding-top:7px;text-align:center;width:71px;}
.menublue-b{background:url('../image/Master_re.png') 0 -535px;float:left;height:25px;margin-left:30px;padding-top:7px;text-align:center;width:122px;}
.menublue2{background:url('../image/Master_re.png') 0 -576px;float:left;height:25px;padding-top:7px;text-align:center;width:93px;}
.menublue2re{background:url('../image/Master_re.png') 0 -617px;float:left;height:25px;padding-top:7px;text-align:center;width:145px;}
.mobile{float:left;height:41px;margin-top:4px;text-align:right;width:154px;}
.nokairT_1{background:transparent url('../images/T_1%20nokair.png') no-repeat;height:26px;width:29px;}
.nokairT_2{background:transparent url('../images/T_2%20nokair.png') no-repeat;height:69px;width:29px;}
.nokairT_3{background:transparent url('../images/T_3%20nokair.png') no-repeat;height:83px;width:29px;}
.nokairarrow{background:transparent url('../images/arrow_anim.gif') no-repeat;height:54px;width:83px;}
.nokairbox_1{background:transparent url('../images/box_01.png') no-repeat;height:80px;width:73px;}
.nokairbox_1-1{background:transparent url('../images/box_01-1.png') no-repeat;height:80px;padding-left:10px;width:349px;}
.nokairbox_2{background:transparent url('../images/box_02.png') no-repeat;height:69px;width:73px;}
.nokairbox_2-1{background:transparent url('../images/box_02-2.png') no-repeat;height:69px;padding-left:10px;width:349px;}
.nokairbox_3{background:transparent url('../images/box_03.png') no-repeat;height:83px;width:73px;}
.nokairbox_3-1{background:transparent url('../images/box_03-3.png') no-repeat;height:83px;padding-left:10px;width:349px;}
.nokairhead_1{background:transparent url('../images/head-nok-air_1.png') no-repeat;height:170px;overflow:hidden;width:333px;}
.nokairhead_2{background:transparent url('../images/head-nok-air_2.png') no-repeat;height:170px;overflow:hidden;width:333px;}
.nokairhead_3{background:transparent url('../images/head-nok-air_3.png') no-repeat;height:170px;overflow:hidden;width:334px;}
.nokairhead_box{background:transparent url('../images/hh_1.png') no-repeat;height:83px;overflow:hidden;width:446px;}
.nokairhead_box2{background:transparent url('../images/hh_2.png') no-repeat;height:263px;overflow:hidden;width:446px;}
.nokairhead_box3{background:transparent url('../images/hh_3.png') no-repeat;height:194px;width:446px;}
.picCash{background:transparent url('../image/cash.jpg') no-repeat;height:42px;padding-right:10px;width:43px;}
.rightbox{float:left;height:64px;text-align:right;vertical-align:top;width:529px;}
.search{background:url('../flight/images/SearchBox.gif') no-repeat;float:left;font-family:Myriad Pro;height:52px;padding-top:2px;text-align:center;vertical-align:middle;width:188px;}
.searchtext{color:#fff;font-family:Arial;font-size:10px;font-weight:700;text-align:center;text-decoration:underline;vertical-align:middle;}
.signin{background:url('../flight/images/SignIn.gif') no-repeat;float:left;margin-right:11px;padding-top:5px;text-align:center;}
.slash{background:url('../flight/images/slash.gif')no-repeat;float:left;height:21px;width:13px;}
.subbar{background:url('../flight/images/menu-sub-bg.gif') repeat-x;color:#fff;height:22px;margin:0 12px;text-align:center;width:1000px;}
.subbar ul li{background:url('../flight/images/menu-sub.gif') no-repeat;color:#331501;display:inline;float:left;font-family:Arial;font-size:12px;font-weight:700;height:18px;padding:2px 0 0;text-align:center;text-decoration:none;width:110px;}
.subbar ul li a{color:#fff;float:left;height:18px;padding-left:5px;text-align:center;text-decoration:none;width:110px;}
.subbar ul li a:hover,.subbar ul li .current{color:#FF9;height:18px;text-align:center;width:110px;}
.subbar ul li a:visited{color:#fff;height:18px;text-align:center;width:110px;}
.topdmidbg{background:url('../flight/images/templateWorldwide2.gif') no-repeat;height:112px;width:650px;}
.topleftbg{background:url('../flight/images/templateWorldwide1.gif') no-repeat;float:left;height:112px;width:350px;}
.txtline{border-bottom-color:#000;border-bottom-style:solid;border-bottom-width:1px;}
div,ul,ol,li,p,span,form,a,dl,dd,dt{margin:0 0 0px 0;
padding:0;
}
ol.submenu{background-color:#0397D6;border:1px solid #aaa;display:block;list-style-type:none;position:absolute;visibility:hidden;}
ol.submenu a{color:#aaa;padding:2px 8px;}
ol.submenu a:hover{border-left:3px solid gray;color:#666;padding:2px 8px 2px 5px;}
ol.submenu li{margin:0;padding:2px 8px;}
ul,dl,ol{list-style:none;}
#HeadTextMushroom{float: left; text-align: left; width:100%; padding: 0px 0px 0px 150px; line-height:30px;}
#HeadTel{float: right; font-size: 26px; margin: -35px 25px 0px 0px; color: #fff; font-weight: 700; text-align: right; line-height: 25px; width: 700px;}
#HeadEditTel{position: absolute; top: 65px; right: 0px;}
.Boxright450{float: right; width: 450px;}
.Boxright340{float: right; width: 450px;}
.Boxleft30{width: 30px; float: left;}
.TopMenuL{background:url('../image/11.gif') no-repeat; width:10px; height:32px; float:left;}
.TopMenuM{background:url('../image/bgTopmenu.gif'); height:32px; float:left; text-align:left;}
.TopMenuE{background:url('../image/22_02.gif') no-repeat; width:5px; height:32px; float:left; text-align:left;}
.TopMenuR{background:url('../image/33_02.gif') no-repeat; width:10px; height:32px; float:left;}
.TopSubmenu{padding:7px; float:left; text-align:left; width:auto;}
#FTdbd2{background:url('../image/dbd.png') no-repeat; width:80px; height:33px;float:left;margin-left:5px;}
#BGuidebook{background: url('../package/images/bguidebook.png');width: 250px;height: 75px;
background-repeat: no-repeat; text-align:right;
}
.BCountry{padding: 35px 30px 0px 0px; font-family: tahoma; font-size: 20px; font-weight: bold; color: #FF0000;}
#Btestimonial{background:url('../package/images/Btestimonal.png'); width:250px; height:75px; background-repeat:no-repeat; text-align:right; margin-top:10px;}
.Rightwidth120{padding:5px; text-align:right; }
.W200P5{padding:5px; }
.HeadBgGreenFontWhite{padding: 5px; background-color: Green; color: White; font-size: 15px;color: White;}
.modalBackground{background-color: Gray;filter: alpha(opacity=80);opacity: 0.8;z-index: 10000;}
.BgBooking_Package{background:url('../package/images/booking_Package.png') no-repeat;height:50px;padding-top:11px;text-align:center;vertical-align:top;width:150px;}
.BgTousOther{background:url('../package/images/ToursOther.png') no-repeat;height:50px;padding-top:11px;text-align:center;vertical-align:top;width:150px;}
.fieldwhite{background: #ffffff;padding-top: 10px;}
.fieldblue{padding-top: 10px;}
.fieldPink{padding-top: 10px;}
.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}
.NotValidFlied{border:solid 1px red; background-color: #FFDFDF;}
.ValidFlied{border:solid 1px Green; background-color: #defcc9;}
#Morethantravel{color:#736357;font-size:20px;font-weight:700;}
#Mushroom{color:#fff;font-size:35px;font-weight:700;}
#Naviagtion a:hover /*submenu*/{color:#fcee21;text-decoration:none;}
#Navigation a:link,#Naviagtion a:visited /*submenu*/{color:#fff;font-size:12px;font-weight:700;list-style:none;text-decoration:none;}
#com{color:#736357;font-size:25px;font-weight:700;}
#contact a{color:#fcee21;font-size:12px;font-weight:700;text-decoration:none;}
#travel{color:#fcee21;font-size:35px;font-weight:700;}
.A10000000 /*-ขาว10-*/{color:#fff;font-family:Myriad Pro;font-size:10px;margin-top:2px;text-decoration:none;}
.A10black{color:#000;font-family:Arial;font-size:10px;text-decoration:none;}
.A11333333{color:#333;font-family:Arial;font-size:11px;text-decoration:none;}
.A113399cc{color:#39c;font-family:Arial;font-size:11px;text-decoration:none;}
.A11666666{color:#666;font-family:Arial;font-size:11px;text-decoration:none;}
.A11ED1C24{color:#ED1C24;font-family:Arial;font-size:11px;text-decoration:none;}
.A11FF3333{color:#F33;font-family:Arial;font-size:11px;text-decoration:none;}
.A12000000{color:#000;font-family:Arial;font-size:12px;text-decoration:none;}
.A120077996{color:#007996;font-family:Arial;font-size:12px;text-decoration:none;}
.A12333333{color:#333;font-family:Arial;font-size:12px;margin-left:0;text-decoration:none;}
.A123399cc{color:#39c;font-family:Arial;font-size:12px;text-decoration:none;}
.A123399cc_Ma{color:#39c;font-family:Arial;font-size:12px;margin:10px;text-align:left;text-decoration:none;}
.A12666666{color:#666;font-family:Arial;font-size:12px;margin:2px;text-decoration:none;}
.A126699CC{color:#69C;font-family:Arial;font-size:12px;text-decoration:none;}
.A12754C24{color:#754C24;font-family:Arial;font-size:12px;text-decoration:none;}
.A12754c24{color:#754c24;font-family:Arial;font-size:12px;text-decoration:none;}
.A1284DA27{color:#B8DD39;font-family:Arial;font-size:12px;text-decoration:none;}
.A12929497 /*-เทา 13-*/{color:#929497;font-family:Arial;font-size:13px;}
.A12FFFFFF,.A12FFFFFF1 A:Link,.A12FFFFFF1 A:visited{color:#fff;font-family:Arial;font-size:12px;text-decoration:none;}
.A12FFFFFF1 A:hover{color:#0A5B33;font-family:Arial;font-size:12px;text-decoration:none;}
.A13000000{color:#000;font-family:Arial;font-size:13px;text-decoration:none;}
.A13333333{color:#333;font-family:Arial;font-size:13px;text-decoration:none;}
.A13666666{color:#666;font-family:Arial;font-size:13px;text-decoration:none;}
.A13666666Margin5{color:#666;font-family:Arial;font-size:13px;margin-bottom:5px;text-decoration:none;}
.A13FFFFFF{color:#fff;font-family:Arial;font-size:13px;text-decoration:none;}
.A13Red{color:Red;font-family:Arial;font-size:13px;text-decoration:none;}
.A13darkbrown{color:#580000;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.A13grendMargin5{color:#0A5B33;font-family:Arial;font-size:13px;margin-bottom:5px;text-decoration:none;}
.A14666666{color:#666;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:14px;height:100%;margin:0;padding:0;}
.A14754C24{color:#754C24;font-family:Arial;font-size:14px;text-decoration:none;}
.A14754C24 a:hover{color:#000;font-family:Arial;font-size:15px;text-decoration:none;}
.A16000000{color:#000;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;height:100%;margin:0;padding:0;}
.A160096D6 /*blue - bar */{color:#0096D6;font-family:Arial;font-size:16px;text-decoration:none;}
.A16666666{color:#666;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;height:100%;margin:0;padding:0;}
.A16Blue{color:#00AEEF;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;height:100%;margin:0;padding:0;}
.A16Darkgreen{color:#136734;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;height:100%;margin:0;padding:0;}
.A16orange{color:#F79022;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;height:100%;margin:0;padding:0;}
.A18orange{color:#F79022;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:18px;height:100%;margin:0;padding:0;}
.A20FF0099{color:#F09;font-family:Arial;font-size:20px;text-decoration:none;}
.A36E573F /*-น้ำตาลใหญ่-*/{color:#6E573F;font-family:Myriad Pro;font-size:30px;text-decoration:none;}
.AB11FFCC00{color:#FC0;font-family:Arial;font-size:11px;font-weight:700;text-decoration:none;}
.AB11WhiteBlue{color:#0096D6;font-family:Arial;font-size:11px;font-weight:700;text-decoration:none;}
.AB11black{color:#000;font-family:Arial;font-size:11px;font-weight:700;text-decoration:none;}
.AB11brown{color:#42210B;font-family:Arial;font-size:11px;font-weight:700;text-decoration:none;}
.AB11orange{color:#F15A24;font-family:Arial;font-size:11px;font-weight:700;text-decoration:none;}
.AB120096D6{color:#0096D6;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12333333{color:#333;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12333399{color:#339;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB1262954f{color:#62954f;font-family:Arial;font-size:12px;text-decoration:none;}
.AB12663333{color:#633;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12754C24{color:#754C24;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12Black{color:#000;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12DarkBlue{color:#04699B;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12FF3333{color:#F33;font-family:Arial;font-size:12px;font-weight:700;margin-top:0;text-decoration:none;}
.AB12FFFFFF{color:#fff;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12Red{color:#F33;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB12darkOrange{color:#C63;font-family:Arial;font-size:12px;text-decoration:none;}
.AB12f5911f{color:#f5911f;font-family:Arial;font-size:12px;font-weight:700;text-decoration:none;}
.AB13000000{color:#000;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB130077996{color:#007996;font-family:Arial;font-size:13px;text-decoration:none;}
.AB1342210B{color:#42210B;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB13666666{color:#666;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB13FF3333{color:#F33;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB13FFCC00{color:#FC0;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB13FFFFFF{color:#fff;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB13Red{color:Red;font-family:Arial;font-size:13px;font-weight:700;text-decoration:none;}
.AB14000000{color:#000;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB140096D6{color:#0096D6;font-family:Arial;font-size:14px;font-weight:700;height:15px;text-decoration:none;}
.AB140096D6 a:hover,.Textlink a:hover{color:#06f;}
.A140096D6 a:hover,.Textlink a:hover{color:#06f;}
.A140096D6{color:#0096D6;font-family:Arial;font-size:14px;height:15px;text-decoration:none;}
.AB1404699B{color:#04699B;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14333333{color:#282828;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14333399{color:#339;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB1462854F{color:#62854F;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14663333{color:#633;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14CC6633{color:#C63;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14F15A24{color:#F15A24;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14FF0099{color:#F09;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14FF3333{color:#F33;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14FF9933{color:#F93;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14FFFFFF{color:#fff;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14Gray{color:gray;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB14pink{color:#F09;font-family:Arial;font-size:14px;font-weight:700;text-decoration:none;}
.AB15FFFFFF{color:#fff;font-family:Arial;font-size:15px;font-weight:700;}
.AB16000000{color:#000;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB160096D6 /*blue - bar */{color:#0096D6;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB160A5B33{color:#0A5B33;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB1642210B{color:#42210B;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB1662854F{color:#62854F;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB16666666{color:#666;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB16754C24{color:#754C24;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB16754C24_BG{background-color:#CCC;color:#754C24;font-family:Arial;font-size:16px;font-weight:700;margin-bottom:5px;padding:5px;}
.AB16CC6633{color:#C63;font-family:Arial;font-size:16px;text-decoration:none;}
.AB16FF0099{color:#F09;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB16FFFFFF{color:#fff;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB16orange{color:#F79022;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:16px;font-weight:700;height:100%;margin:0;padding:0;}
.AB16yellow{color:#FF0;font-family:Arial;font-size:16px;font-weight:700;text-decoration:none;}
.AB17yellow{color:#FF0;font-family:Arial;font-size:17px;font-weight:700;text-decoration:none;}
.AB18333300{color:#330;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18663333,.AB18Darkbrown{color:#633;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18754C24{color:#754C24;font-family:Arial;font-size:18px;font-weight:700;}
.AB18DarkBlue{color:#04699B;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18FF9933{color:#F93;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18FFFFFF{color:#fff;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18Green{color:#18AB57;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:18px;font-weight:700;height:100%;margin:0;padding:0;}
.AB18Orang{color:#F96;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18Red{color:red;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB18yellow,.AB18yellowDark{color:#FF0;font-family:Arial;font-size:18px;font-weight:700;text-decoration:none;}
.AB19FFFFFF{color:#fff;font-family:Arial;font-size:19px;font-weight:700;}
.AB20333399{color:#339;font-family:Arial;font-size:20px;font-weight:700;text-decoration:none;}
.AB20F68F1F{color:#F68F1F;font-family:Arial;font-size:20px;font-weight:700;text-decoration:none;}
.AB20yellowDark{color:#FF0;font-family:Arial;font-size:20px;font-weight:700;text-decoration:none;}
.AB22663333{color:#633;font-family:Arial;font-size:22px;font-weight:700;text-decoration:none;}
.AB230096D6 /*blue - bar */{color:#0096D6;font-family:Arial;font-size:23px;font-weight:700;text-decoration:none;}
.AB2304699B{color:#04699B;font-family:Arial;font-size:23px;font-weight:700;text-decoration:none;}
.AB230A5B33{color:#0A5B33;font-family:Arial;font-size:23px;font-weight:700;text-decoration:none;}
.AB23FF3333{color:#F33;font-family:Arial;font-size:23px;font-weight:700;text-decoration:none;}
.AB24F15A24{color:#F15A24;font-family:Arial;font-size:24px;font-weight:700;text-decoration:none;}
.ABI11CC9999{color:#666;font-family:Arial;font-size:11px;font-style:italic;font-weight:700;text-decoration:none;}
.AFF5900 /*-ส้ม20-*/{color:#FF5900;font-family:Arial;font-size:22px;font-weight:700;}
.ExpediaHTML{color:#666;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:12px;height:100%;margin:0;padding:0;}
.FontFlight_Thai{color:#fff;font-family:Arial;font-size:28px;font-weight:700;text-decoration:none;}
.MFF5900 /*-ส้ม32-*/{color:#FF5900;font-family:Myriad Pro;font-size:23px;font-weight:700;}
.Text12Brown{color:#6C5953;font-size:12px;}
.Text13Brown{color:#6C5953;font-size:13px;}
.TextNormal{color:#FF8033;font-size:14px;font-weight:700;}
.Textlink{color:#0096D6;font-family:Arial;font-size:14px;height:15px;text-decoration:none;}
.TitelVisaType{background-color:#D7E104;color:#099;font-family:Arial;font-size:18px;font-weight:700;margin:20px 5px 5px;padding:5px;}
.apple{-webkit-font-smoothing:antialiased;color:#444;font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;font-size:13px;width:638px;}
.linktext12 a{color:#F15A24;cursor:pointer;font-size:12px;font-weight:700;text-decoration:none;}
.linktext12 a:hover{color:#F68F1F;cursor:pointer;font-size:12px;font-weight:700;text-decoration:none;}
.linktextNormal a{color:#F15A24;font-size:14px;font-weight:700;text-decoration:none;}
.linktextNormal a:hover{color:#F68F1F;font-size:14px;font-weight:700;text-decoration:none;}
.m20000000 /*-ดำ-*/{color:#000;font-family:Myriad Pro;font-size:20px;text-decoration:none;}
.signin{color:#FF3;font-family:Arial;font-size:12px;font-weight:700;}
.submenu a:hover{color:#fcee21;display:inline;font-size:12px;font-weight:700;list-style:none;text-decoration:none;}
.submenu,.submenu a:visited{color:#fff;display:inline;font-size:12px;font-weight:700;list-style:none;text-decoration:none;}
body{color:#000;font-family:arial, tahoma;font-size:13px;margin:0;text-align:center;}
h1{margin:0;padding:0;text-decoration:none;}
h2,h3{margin:0;text-decoration:none;}
hr{border-color:#FFF;border-style:dotted;border-width:2px;}
.LinkYellow a:hover{color: #FFFF00;}
.linkSelect{border: 1px solid #C0C0C0;padding: 5px;margin:5px 0px 5px 5px;color: #FFFFFF;cursor: pointer;font-size: 12px;font-weight: 700;text-decoration: none;background-color: #FF9900;width: 8px;}
.linkSearch a{border: 1px solid #C0C0C0;padding: 5px;margin:5px 0px 5px 5px;color: #333333;cursor: pointer;font-size: 12px;font-weight: 700;text-decoration: none;width: 8px;}
.linkSearch a:hover{border: 1px solid #C0C0C0;padding: 5px;margin:5px 0px 5px 5px;color: #FFFFFF;cursor: pointer;font-size: 12px;font-weight: 700;text-decoration: none;background-color: #FF9900;width: 8px;}
.divPeriodSelect{color: #666;font-family: Arial;font-size: 12px;margin: 2px;text-decoration: none;background-color: #F0F0F0; text-align:center; width:220px;line-height:18px;}
.divPeriod{color: #666;font-family: Arial;font-size: 12px;margin: 2px;text-decoration: none;text-align:center;width:220px;line-height:18px;}
.Expanded{width:150px;background:url(../Image/Expanded.gif) no-repeat;height:15px;}
.UnExpanded{width:150px;background:url(../Image/UnExpanded.gif) no-repeat;height:15px;}
.ClassH1{margin:0;padding:0;text-decoration:none;font-size:26px;}
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim strReturn As String = "OK,,,Default,D"
If Not (Page.IsPostBack) Then
'--- เป็นข้อมูลที่ทาง Plextel ส่งมาให้ ---
Dim strCallerID As String = Request.QueryString("CallerID")
Dim strUniqueID As String = Request.QueryString("UniqueID")
Dim strStepnumber As String = Request.QueryString("Stepnumber")
Dim strCustomerCall As String = Request.QueryString("CustomerCall")
If strStepnumber = "1" Then
If strCallerID = "0614131510" Then
strReturn = "OK,SIP/2412,15,Default,N"
ElseIf strCallerID = "0614174573" Then
strReturn = "OK,SIP/2412,15,Default,N"
Else
strReturn = "OK,,,Default,D"
End If
End If
If strStepnumber = "2" Then
strReturn = "OK,Queue_GIT,648000,Default,N"
End If
If strStepnumber = "check" Then
strReturn = "CallerID=" & strCallerID & "/UniqueID =" & strUniqueID & "/Stepnumber=" & strStepnumber & "/CustomerCall=" & strCustomerCall
End If
End If
Response.ContentType = "text/plain"
Response.Write(strReturn)
Response.End()
End Sub
End Class

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "CallCenter", ".", "{2AC86F95-7955-4E4D-AF68-4721C0F342B7}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/CallCenter"
Debug.AspNetCompiler.PhysicalPath = "..\CallCenter\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\CallCenter\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/CallCenter"
Release.AspNetCompiler.PhysicalPath = "..\CallCenter\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\CallCenter\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "5568"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2AC86F95-7955-4E4D-AF68-4721C0F342B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AC86F95-7955-4E4D-AF68-4721C0F342B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>History Log ( TOURPRO X )</title>
<link href="Css/font.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.LoginFrom{background:url(Image/Login_1.jpg) no-repeat;height:191px;width:408px;}
</style>
</head>
<body>
<form id="form1" runat="server">
<table width="100%" border="0" cellpadding="0" cellspacing="0"
style="height: 600px">
<tr>
<td align="center" bgcolor="#E8EBEF" style="padding-top: 100px;" valign="top">
<table bgcolor="White" class="LoginFrom" >
<tr>
<td align="right" valign="middle">
<table cellpadding="5" style="width: 330px;">
<tr>
<td align="right" style="height: 30px">
<asp:Label ID="lblloginHD" runat="server" BorderStyle="None" CssClass="AB1662854F"
Font-Bold="True" Text="History Log (TOURPRO X)"></asp:Label>
</td>
</tr>
<tr>
<td>
<table style="width: 330px;">
<tr>
<td style="width: 95px">
<span class="AB130077996">Username:</span>
</td>
<td align="left">
<asp:TextBox ID="txtlogin_user" runat="server" Font-Bold="False" Width="150px"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 95px">
<span class="AB130077996">Password:</span>
</td>
<td align="left">
<asp:TextBox ID="txtLogin_password" runat="server" Font-Bold="False" TextMode="Password"
Width="150px"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 95px">
&nbsp;
</td>
<td align="center">
<asp:ImageButton ID="BtnLogin" runat="server" ImageUrl="~/Image/b_Eng.jpg" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right">
&nbsp;
<asp:Label ID="lblAlert" Visible="false" Font-Bold="true" ForeColor="Red" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
\ No newline at end of file

Partial Class Login
Inherits System.Web.UI.Page
Protected Sub BtnLogin_Click(sender As Object, e As ImageClickEventArgs) Handles BtnLogin.Click
Dim strUserConfig As String = System.Configuration.ConfigurationSettings.AppSettings("UserName")
Dim strPasswordConfig As String = System.Configuration.ConfigurationSettings.AppSettings("Password")
Dim strUserConfig_SystemAdmin As String = System.Configuration.ConfigurationSettings.AppSettings("SystemAdminUserName")
Dim strPasswordConfig_SystemAdmin As String = System.Configuration.ConfigurationSettings.AppSettings("SystemAdminPassword")
Dim blnLoginSUC As Boolean = False
lblAlert.Visible = False
Session("CallCenterSystemAdmin") = Nothing
Session("TypeUserLogin") = ""
Try
Dim strUserLogin As String = txtlogin_user.Text
Dim strPasswordLogin As String = txtLogin_password.Text
If strUserLogin <> "" And strPasswordLogin <> "" Then
If strUserLogin = strUserConfig And strPasswordLogin = strPasswordConfig Then
blnLoginSUC = True
Session("TypeUserLogin") = "admin"
End If
If strUserLogin = strUserConfig_SystemAdmin And strPasswordLogin = strPasswordConfig_SystemAdmin Then
blnLoginSUC = True
Session("TypeUserLogin") = "systemadmin"
End If
End If
Catch ex As Exception
blnLoginSUC = False
End Try
If blnLoginSUC Then
Session("CallCenterSystemAdmin") = True
Response.Redirect("SystemAdmin/BookingDetail.aspx")
Else
lblAlert.Visible = True
lblAlert.Text = "ตรวจสอบ Username และ Password อีกครั้ง"
End If
End Sub
End Class
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
#nav, #nav ul
{
list-style-type: none;
list-style-position: outside;
position: relative;
line-height: 30px;
margin: 0;
padding: 0;
}
#nav li > a
{
font-weight: bold;
display: block;
margin-top: -1px;
color: #000;
text-decoration: none;
background-color: #FFEFD7;
padding: 0 10px;
width: 99px;
border: 1px solid #FF9900;
}
#nav li > a:hover
{
background-color: #EAEAEA;
color: #000;
}
#nav li
{
float: left;
position: relative;
margin-right: 1px;
}
#nav ul
{
position: absolute;
display: none;
width: 12em;
top: 2.5em;
}
#nav li ul a
{
width: 160px;
height: auto;
float: left;
line-height: 30px;
font-size: 12px;
font-weight: normal;
}
#nav ul ul
{
top: auto;
}
#nav ul ul
{
height: 299px;
width: 652px;
margin: 0;
padding: 0;
background-color: #999999;
}
#nav ul ul li
{
padding: 20px;
}
#nav li.navblue a
{
background-color: #3398CC;
}
#nav li.navorange a
{
background-color: #FF9A02;
color: #FEFF00;
}
#nav li ul ul
{
left: 14.9em;
margin-left: -2px;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul
{
display: none;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul
{
display: block;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="Menubar" style="margin: 10px;">
<div style="width: 4000px; float: left;">
<ul id="nav">
<li><a href="BookingDetail.aspx" style="text-align: center;">Booking</a></li>
<li><a href="PaymentDetail.aspx" style="text-align: center;">Payment</a></li>
<li><a href="ProductDetail.aspx" style="text-align: center;">Product</a></li>
<li><a href="AgentInfo.aspx" style="text-align: center;">Agent</a></li>
<li><asp:Label ID="lblClearData" runat="server" Visible ="False" Text="Clear Data" BackColor="#FFEFD7" BorderColor="#FF9900" BorderWidth="1px" Height="30px" style="text-align: center; font-weight: 700; color: #000000" Width="120px"></asp:Label></li>
<li><a href="../Login.aspx" style="text-align: center;">Log Out</a></li>
</ul>
</div>
</div>
<br>
<br />
<br>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

Partial Class MasterPage
Inherits System.Web.UI.MasterPage
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If IsNothing(Session("CallCenterSystemAdmin")) Then
Session("TypeUserLogin") = ""
Me.Page.Response.Redirect("~/Login.aspx")
Else
If Session("TypeUserLogin") = "systemadmin" Then
lblClearData.Text = "<a href='ClearDetail.aspx' style='text-align: center;'>Clear Data</a>"
lblClearData.Visible = True
End If
End If
End Sub
End Class
Alter PROCEDURE [dbo].[_HistoryBackup_Product]
(
@AgentID int = 3572
)
AS
--- ### ͹еͧ Ẻ Manual ҹ ѹ Run Network ͹ Update ѭ -----
--- óշ Insert Agent ID =9999
--select * from Product where AgentID_Owner = @AgentID
--select from Product where AgentID_Owner = @AgentID
--select * from T_ProductDetail where AgentID_Owner = 3572
--select * from ProductFlight where AgentID_Owner = 3572
----## insert Product ----
INSERT INTO [a.tourprox.com].Tourprox_All.dbo.Product
(
[AgentID_Owner]
,[AgentID]
,[Denomination]
,[RowID_Region]
,[RowID_Country]
,[ParentID]
,[BrandID]
,[IsPackage]
,[StayNight]
,[ProductCode]
,[Period]
,[ProductNameTH]
,[ProductNameEN]
,[Picture]
,[PriceTH]
,[PriceEN]
,[ProductDetailTH]
,[ProductDetailEN]
,[ProductStart]
,[ProductEnd]
,[IsActive]
,[UpdateBy]
,[UpdateDate]
,[UploadPackage]
,[RowID_Country2]
,[RowID_Country3]
,[RowIDAirline]
,[TitlePackage]
,[TitlePackageEN]
,[HotelDetail]
,[HotelDetailEN]
,[Colcost]
,[Colcommission]
,[Createby]
,[Createdate]
,[TypePromote]
,[IsPinning]
,[IsComplate]
,[TransferDateTime]
,[SupplierID]
,[ColFlieWord]
,[ProductType]
,[RefNumber]
,[RowID_Country4]
,[MultiPurpose]
,[IsDocument]
,[IsVisaRequired1]
,[IsVisaRequired2]
,[IsVisaRequired3]
,[Order]
,[IsPromotedProduct]
,[PromoteProductID]
-- ,[ProductCodeNew]
,[IsPromoteProduct]
,[UploadFileWordDateTime]
,[StarRating]
,[AgentProductID]
,[PopularValue]
,[ProductHighlight]
,[ProductDestination]
,[ProductFood]
,[StarHotel]
,[ProductNameSupplier]
,[ProductID_Original]
,[QUploadDatetime]
,[Config]
,[FileUpload_Banner]
,[ExtendedProperties]
,[PreparationFile]
,[ProductCodeNew]
)
SELECT
9999 -- [AgentID_Owner]
,[AgentID]
,[Denomination]
,[RowID_Region]
,[RowID_Country]
,[ParentID]
,[BrandID]
,[IsPackage]
,[StayNight]
,[ProductCode]
,[Period]
,[ProductNameTH]
,[ProductNameEN]
,[Picture]
,[PriceTH]
,[PriceEN]
,[ProductDetailTH]
,[ProductDetailEN]
,[ProductStart]
,[ProductEnd]
,[IsActive]
,[UpdateBy]
,[UpdateDate]
,[UploadPackage]
,[RowID_Country2]
,[RowID_Country3]
,[RowIDAirline]
,[TitlePackage]
,[TitlePackageEN]
,[HotelDetail]
,[HotelDetailEN]
,[Colcost]
,[Colcommission]
,[Createby]
,[Createdate]
,[TypePromote]
,[IsPinning]
,[IsComplate]
,[TransferDateTime]
,[SupplierID]
,[ColFlieWord]
,[ProductType]
,[RefNumber]
,[RowID_Country4]
,[MultiPurpose]
,[IsDocument]
,[IsVisaRequired1]
,[IsVisaRequired2]
,[IsVisaRequired3]
,[Order]
,[IsPromotedProduct]
,[PromoteProductID]
--,[ProductCodeNew]
,[IsPromoteProduct]
,[UploadFileWordDateTime]
,[StarRating]
,[ProductID] --- Ref ͧ ProductID ͹˹
,[PopularValue]
,[ProductHighlight]
,[ProductDestination]
,[ProductFood]
,[StarHotel]
,[ProductNameSupplier]
,[ProductID_Original]
,[QUploadDatetime]
,[Config]
,[FileUpload_Banner]
,[ExtendedProperties]
,[PreparationFile]
,[ProductCodeNew]
FROM TourProX_ALL_20190305.dbo.Product
WHERE AgentID_Owner = 3572 and ( ProductCodeNew <> '' and ProductCodeNew is not null )
----## insert Period -----
INSERT INTO [a.tourprox.com].Tourprox_All.dbo.T_ProductDetail(
[AgentID_Owner]
,[ProductID]
,[ColStartDate]
,[ColEndDate]
,[Potential]
,[Taken]
,[ColTotal]
,[Price_AdultTh_Single]
,[Price_AdultTh_Share]
,[Price_ChildTh_Bed]
,[Price_ChildTh_Nobed]
,[Colagechild]
,[Price_AdultF_Single]
,[Price_AdultF_Share]
,[Price_ChildF_Bed]
,[Price_ChildF_Nobed]
,[DatePayment]
,[Deposit]
,[Lastdaypayment]
,[Margin]
,[Comsell]
,[IsCharter]
,[AmountOfCharter]
,[TransferDateTime]
,[StayNight]
,[AgeChild_Start]
,[IsAgeType_Start]
,[AgeChild_End]
,[IsAgeType_End]
,[Remark]
,[Price_Triple]
,[IsApprovedCost]
,[IsPublic]
,[DepositDateTime]
,[StayDay]
,[StaffAmount]
,[IsSupportInfant]
,[Price_Infant]
,[DepositDay]
,[FullPaymentDate]
,[PeriodStatusCode]
,[PeriodStatusLastDate]
,[ActiveDate]
,[DiscountAmount]
,[DiscountPercent]
,[DiscountDisplay]
,[AgentProduct_detailID]
,[CurrencyCode]
,[RemarkForAgent]
,[PeriodType]
,[IsSoldout]
,[SoldoutByUserID]
,[SoldoutDateTime]
,[GroupSize]
,[IsAllotment]
,[SeatUpdate]
,[UpdateBy]
,[UpdateDate]
,[ProductDetialID_Original]
,[QUploadDatetime]
,[SeatText]
,[SeatRemain]
,[SeatType]
,[PeriodPreparationFile]
)
SELECT
9999 --- [AgentID_Owner]
,[ProductID]
,[ColStartDate]
,[ColEndDate]
,[Potential]
,[Taken]
,[ColTotal]
,[Price_AdultTh_Single]
,[Price_AdultTh_Share]
,[Price_ChildTh_Bed]
,[Price_ChildTh_Nobed]
,[Colagechild]
,[Price_AdultF_Single]
,[Price_AdultF_Share]
,[Price_ChildF_Bed]
,[Price_ChildF_Nobed]
,[DatePayment]
,[Deposit]
,[Lastdaypayment]
,[Margin]
,[Comsell]
,[IsCharter]
,[AmountOfCharter]
,[TransferDateTime]
,[StayNight]
,[AgeChild_Start]
,[IsAgeType_Start]
,[AgeChild_End]
,[IsAgeType_End]
,[Remark]
,[Price_Triple]
,[IsApprovedCost]
,[IsPublic]
,[DepositDateTime]
,[StayDay]
,[StaffAmount]
,[IsSupportInfant]
,[Price_Infant]
,[DepositDay]
,[FullPaymentDate]
,[PeriodStatusCode]
,[PeriodStatusLastDate]
,[ActiveDate]
,[DiscountAmount]
,[DiscountPercent]
,[DiscountDisplay]
,[Product_detailID] -- Ref [Product_detailID]
,[CurrencyCode]
,[RemarkForAgent]
,[PeriodType]
,[IsSoldout]
,[SoldoutByUserID]
,[SoldoutDateTime]
,[GroupSize]
,[IsAllotment]
,[SeatUpdate]
,[UpdateBy]
,[UpdateDate]
,[ProductDetialID_Original]
,[QUploadDatetime]
,[SeatText]
,[SeatRemain]
,[SeatType]
,[PeriodPreparationFile]
FROM TourProX_ALL_20190305.dbo.T_ProductDetail
WHERE AgentID_Owner = 3572
and ProductID in (
select ProductID
from TourProX_ALL_20190305.dbo.Product
WHERE AgentID_Owner = 3572 and ( ProductCodeNew <> '' and ProductCodeNew is not null )
)
----## update ProductID in PeriodID еͧ Update Server -----
--update [a.tourprox.com].Tourprox_All.dbo.T_ProductDetail
--set ProductID = tblMain.ProductIDNew
--from
--(
-- select t1.Product_detailID as PeriodID , t1.ProductID as ProductIDOld , t2.ProductID as ProductIDNew
-- FROM [a.tourprox.com].Tourprox_All.dbo.T_ProductDetail t1
-- INNER JOIN [a.tourprox.com].Tourprox_All.dbo.Product t2 ON t1.ProductID = t2.AgentProductID
-- WHERE t1.AgentID_Owner = 9999 and t2.AgentID_Owner = 9999
--) tblMain
--where Product_detailID = tblMain.PeriodID
----## insert Product Flight -----
INSERT INTO [a.tourprox.com].Tourprox_All.dbo.ProductFlight(
[AgentID_Owner]
,[Product_detailID]
,[Type]
,[FlightDate_From]
,[FlightDate_To]
,[FlightTime_From]
,[FlightTime_To]
,[RowIDAirport_From]
,[RowIDAirport_To]
,[RowIDAirline]
,[FlightNumber]
,[AirlineClass]
,[CreateByUserID]
,[CreateDateTime]
,[ModifyByUserID]
,[ModifyDateTime]
,[TransferDateTime]
,[TransportTypeID]
,[AirlineClassID]
,[PeriodDay]
,[TransportRemark]
)
SELECT
9999
,[Product_detailID]
,[Type]
,[FlightDate_From]
,[FlightDate_To]
,[FlightTime_From]
,[FlightTime_To]
,[RowIDAirport_From]
,[RowIDAirport_To]
,[RowIDAirline]
,[FlightNumber]
,[AirlineClass]
,[CreateByUserID]
,[CreateDateTime]
,[ModifyByUserID]
,[ModifyDateTime]
,[TransferDateTime]
,[TransportTypeID]
,[AirlineClassID]
,[PeriodDay]
,[TransportRemark]
FROM TourProX_ALL_20190305.dbo.ProductFlight
WHERE AgentID_Owner = 3572
and Product_detailID in (
select Product_detailID
from TourProX_ALL_20190305.dbo.Product P
inner join TourProX_ALL_20190305.dbo.T_ProductDetail TPD on P.ProductID = TPD.ProductID
WHERE P.AgentID_Owner = 3572 and P.ProductCodeNew <> ''
)
----## update Period in ProductFlight еͧ Update Server -----
--update [a.tourprox.com].Tourprox_All.dbo.ProductFlight
--set Product_detailID = tblMain.PeriodIDNew
--from
--(
-- select t2.ProductFlightID as PeriodFlightID , t1.AgentProduct_detailID as PeriodIDOld , t1.Product_detailID as PeriodIDNew
-- FROM [a.tourprox.com].Tourprox_All.dbo.T_ProductDetail t1
-- INNER JOIN [a.tourprox.com].Tourprox_All.dbo.ProductFlight t2 ON t1.AgentProduct_detailID = t2.Product_detailID
-- WHERE t1.AgentID_Owner = 9999 and t2.AgentID_Owner = 9999
--) tblMain
--where ProductFlightID = tblMain.PeriodFlightID
----## update Product Country -----
--update [a.tourprox.com].Tourprox_All.dbo.ProductCountryCity
--set ProductID = tblMain.ProductIDNew
--from
--(
-- select t2.ProductCCID as PeriodCCID , t2.ProductID as ProductIDOld , t1.ProductID as ProductIDNew
-- FROM [a.tourprox.com].Tourprox_All.dbo.Product t1
-- INNER JOIN [a.tourprox.com].Tourprox_All.dbo.ProductCountryCity t2 ON t1.AgentProductID = t2.ProductID
-- WHERE t1.AgentID_Owner = 9999
--) tblMain
--where ProductCCID = tblMain.PeriodCCID
----## Update óշ Run Production ---
--update Product set AgentID_Owner = 3572 where AgentID_Owner = 9999
--update T_ProductDetail set AgentID_Owner = 3572 where AgentID_Owner = 9999
--update ProductFlight set AgentID_Owner = 3572 where AgentID_Owner = 9999
USE [TourProX_ALL]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Alter PROCEDURE [dbo].[_HistoryLog_Agent_BookingDelete]
(
@AgentID int = 3574 ,
@DeleteDate varchar(20) ='2019-05-15'
)
AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select M.FNameTH as NameDel , M.Email as EmailDel , convert(varchar,WD.DeleteDateTime,113) as DeleteDate , convert(varchar,WD.DateRegis,113) as BookingDate , WD.RowIDEmail , WD.StatusCode , P.ProductCodeNew , P.ProductNameTH , convert(varchar,TPD.ColStartDate,106) as PeriodStart
, convert(varchar,TPD.ColEndDate ,106) as PeriodEnd
from WebBookingDeleteLog WD
inner join Member M on WD.DeleteByUserID = M.MemberID
inner join Product P on P.ProductID = WD.ProductID
inner join T_ProductDetail TPD on TPD.Product_detailID = WD.Product_detailID
where WD.AgentID_Owner =@AgentID
and
( ( WD.DeleteDateTime between @DeleteDate+' 00:00:00' and @DeleteDate+' 23:59:59' and @DeleteDate <>'' )
or
( @DeleteDate ='' )
)
order by WD.DateRegis desc
USE [TourProX_ALL]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Alter PROCEDURE [dbo].[_HistoryLog_Agent_WebHomeProduct]
(
@AgentID int = 112 -- 8280--
)
AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select *
,
(
select
Stuff((select ProductCodeNew + ' ,'
from
(
select P.ProductCodeNew
from WebHomeProduct WP
inner join Product P on WP.ProductID = P.ProductID
where WP.TypeDisplay = tblMain.TypeDisplay and WP.CustomName = tblMain.CustomName and WP.AgentID_Owner = @AgentID and WP.IsActive ='1'
group by P.ProductCodeNew
)S
FOR XML PATH('')),1,0,'')
) as ProductCodeNewDetail
from (
select TypeDisplay , CustomName , count(*) as CountProduct
from WebHomeProduct
where AgentID_Owner = @AgentID and IsActive ='1'
group by TypeDisplay , CustomName
) tblMain
USE [TourProX_ALL]
GO
Alter PROCEDURE [dbo].[_HistoryLog_DelBookingByAgentID]
(
@AgentID int = 5093
)
AS
delete from MainBooking where AgentID_Owner = @AgentID
delete from T_Email where AgentID_Owner = @AgentID
delete from T_Paidby where AgentID_Owner = @AgentID
delete from T_Cost where AgentID_Owner = @AgentID
delete from T_Paidby_Log where AgentID_Owner = @AgentID
delete from TourRoomPassenger where AgentID_Owner = @AgentID
--select *
--,
--(
-- select count(*)
-- from MainBooking MB
-- where MB.AgentID_Owner = tblMain.AgentID
--) as CountBooking,
--(
-- select count(*)
-- from Product P
-- where P.AgentID_Owner = tblMain.AgentID
--) as CountProduct,
--(
-- select count(*)
-- from T_ProductDetail P
-- where P.AgentID_Owner = tblMain.AgentID
--) as CountPeriod ,
--(
-- select count(*)
-- from Passenger P
-- where P.AgentID_Owner = tblMain.AgentID
--) as CountPassenger ,
--(
-- select count(*)
-- from CustomerCompany P
-- where P.AgentID_Owner = tblMain.AgentID
--) as CountCustomerCompany ,
--(
-- select count(*)
-- from M_Agent P
-- where P.AgentID_Owner = tblMain.AgentID and P.Agent_Code <> tblMain.AgentCode
--) as CountSupplier
-- from
-- (
-- select AgentID , AgentCode , AgentName , AgentNameEN , LicenseNumber, AgentContactNickName as NickName , AgentContactTelephone as Tel
-- from Agent A
-- where AgentID = @AgentID
-- and AgentStatusID = 2
-- ) tblMain
USE [TourProX_ALL]
GO
Alter PROCEDURE [dbo].[_HistoryLog_DelProductByAgentID_byProductCode]
(
@AgentID int = 8280 ,
@ProductCodeNews varchar(4000)= '#DDSM190060#,#DDSM190061#,#DDSM190205#'
)
AS
--declare @sql_Product nvarchar(2000)
-- set @sql_Product = 'delete from Product where (Createby <> 152 or Createby is null) and AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
-- + ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID ) '
--print '@sql_Product='+@sql_Product;
-- execute sp_executesql @sql_Product
--declare @sql_Period nvarchar(2000)
-- set @sql_Period = 'delete from T_ProductDetail where ( UpdateBy <> 152 or UpdateBy is null ) and ProductID in ( select ProductID from Product where AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
-- + ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID )) '
--print '@sql_Period='+@sql_Period;
-- execute sp_executesql @sql_Period
--declare @sql_Flight nvarchar(2000)
-- set @sql_Flight = 'delete from ProductFlight where ( CreateByUserID <> 152 or CreateByUserID is null ) and Product_detailID in ( select Product_detailID from T_ProductDetail where ProductID in ( select ProductID from Product where AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
-- + ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID ))) '
--print '@sql_Flight='+@sql_Flight;
-- execute sp_executesql @sql_Flight
set @ProductCodeNews = replace(@ProductCodeNews,'#','''');
declare @sql_Product nvarchar(2000)
set @sql_Product = 'delete from Product where (Createby <> 152 or Createby is null) and AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
+ ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID ) '
print '@sql_Product='+@sql_Product;
EXEC(@sql_Product);
declare @sql_Period nvarchar(2000)
set @sql_Period = 'delete from T_ProductDetail where ( UpdateBy <> 152 or UpdateBy is null ) and ProductID in ( select ProductID from Product where AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
+ ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID )) '
print '@sql_Period='+@sql_Period;
EXEC(@sql_Period);
declare @sql_Flight nvarchar(2000)
set @sql_Flight = 'delete from ProductFlight where ( CreateByUserID <> 152 or CreateByUserID is null ) and Product_detailID in ( select Product_detailID from T_ProductDetail where ProductID in ( select ProductID from Product where AgentID_Owner = '+ convert(varchar,@AgentID) +' and ProductCodeNew in (' + @ProductCodeNews + ')'
+ ' and ProductID not in ( select ProductID from T_Email where AgentID_Owner = '+ convert(varchar,@AgentID) +' group by ProductID ))) '
print '@sql_Flight='+@sql_Flight;
EXEC(@sql_Flight);
USE [TourProX_ALL]
GO
Alter PROCEDURE [dbo].[_HistoryLog_DelSupplierByAgentID]
(
@AgentID int = 5093
)
AS
delete M_Agent
where AgentID_Owner = @AgentID
and Agent_Code <>(select AgentCode from Agent where AgentID= @AgentID)
USE [TourProX_ALL]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Alter PROCEDURE [dbo].[_HistoryLog_GetProductCodeNewOriginal_WH]
(
-- เคสนี้ จะไปหา Product ตั้งต้นของ Wholesale Connect
@tourcode varchar(1000) = 'SPLT191502'
)
AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select P_WH.ProductCodeNew as ProductCodeNew_WH , P_WH.ProductNameTH , P_SUB.ProductCodeNew
from Product P_SUB
inner join Product P_WH on P_SUB.ProductNameSupplier = P_WH.ProductNameTH Collate Thai_CI_AS
where P_WH.Createby <> 152
and P_SUB.ProductCodeNew = @tourcode
and P_WH.ProductID in ( select ProductID from T_ProductDetail where ColStartDate >= GetDate() and PeriodStatusCode ='PRDisplay' group by ProductID )
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="AgentInfo.aspx.vb" Inherits="SystemAdmin_ClearDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="เงื่อนไขที่ต้องใส่ <b>AgentID</b>: "></asp:Label>
<asp:TextBox ID="txtAgentID" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
<asp:Label ID="Label5" runat="server" Text=" หรือ <b>URL Website </b>: "></asp:Label>
<asp:TextBox ID="txtURLWebsite" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<br>
<asp:Label ID="Label6" runat="server" Text="เงื่อนไขที่ต้องใส่ <b>วันที่ลบ Booking</b>: "></asp:Label> &nbsp; <asp:TextBox ID="txtDateDel" runat="server" MaxLength="10" Width="70px"></asp:TextBox>
<asp:Label ID="Label7" runat="server" Text="** หมายเหตุ ให้กรอกข้อมูลรูปแบบ yyyy-MM-dd เช่น 2013-11-05 "></asp:Label>
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text=""></asp:Label>
<br /><br />
<b><asp:Label ID="lblHeader" runat="server" Text="Agent Detail"></asp:Label></b>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GvHistoryLog" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="AgentID" SortExpression="AgentID">
<ItemTemplate>
<asp:Label ID="AgentID" runat="server" Text='<%#Eval("AgentID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentCode" SortExpression="AgentCode">
<ItemTemplate>
<asp:Label ID="AgentCode" runat="server" Text='<%#Eval("AgentCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentName" SortExpression="AgentName">
<ItemTemplate>
<asp:Label ID="AgentName" runat="server" Text='<%#Eval("AgentName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentNameEN" SortExpression="AgentNameEN">
<ItemTemplate>
<asp:Label ID="AgentNameEN" runat="server" Text='<%#Eval("AgentNameEN")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="LicenseNumber" SortExpression="LicenseNumber">
<ItemTemplate>
<asp:Label ID="LicenseNumber" runat="server" Text='<%#Eval("LicenseNumber")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="NickName" SortExpression="NickName">
<ItemTemplate>
<asp:Label ID="NickName" runat="server" Text='<%#Eval("NickName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tel" SortExpression="Tel">
<ItemTemplate>
<asp:Label ID="Tel" runat="server" Text='<%#Eval("Tel")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="URLWebsite" HeaderStyle-BackColor="Yellow" SortExpression="URLWebsite">
<ItemTemplate>
<asp:Label ID="URLWebsite" runat="server" Text='<%#Eval("URLWebsite")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountBooking" SortExpression="CountBooking">
<ItemTemplate>
<asp:Label ID="CountBooking" runat="server" Text='<%#Eval("CountBooking")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountProduct" SortExpression="CountProduct">
<ItemTemplate>
<asp:Label ID="CountProduct" runat="server" Text='<%#Eval("CountProduct")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountProduct_WHConnect" SortExpression="CountProduct_WHConnect">
<ItemTemplate>
<asp:Label ID="CountProduct_WHConnect" runat="server" Text='<%#Eval("CountProduct_WHConnect")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountPeriod" SortExpression="CountPeriod">
<ItemTemplate>
<asp:Label ID="CountPeriod" runat="server" Text='<%#Eval("CountPeriod")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountPassenger" SortExpression="CountPassenger">
<ItemTemplate>
<asp:Label ID="CountPassenger" runat="server" Text='<%#Eval("CountPassenger")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountCustomerCompany" SortExpression="CountCustomerCompany">
<ItemTemplate>
<asp:Label ID="CountCustomerCompany" runat="server" Text='<%#Eval("CountCustomerCompany")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountSupplier" SortExpression="CountSupplier">
<ItemTemplate>
<asp:Label ID="CountSupplier" runat="server" Text='<%#Eval("CountSupplier")%>'></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 /><br />
<b><asp:Label ID="Label3" runat="server" Text="LoadTourbyType Detail"></asp:Label></b>
<b><asp:Label ID="Label4" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="txtLoadTourByType" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GVLoadTourbyType" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="TypeDisplay" SortExpression="TypeDisplay">
<ItemTemplate>
<asp:Label ID="TypeDisplay" runat="server" Text='<%#Eval("TypeDisplay")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CustomName" SortExpression="CustomName">
<ItemTemplate>
<asp:Label ID="CustomName" runat="server" Text='<%#Eval("CustomName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountProduct" SortExpression="CountProduct">
<ItemTemplate>
<asp:Label ID="CountProduct" runat="server" Text='<%#Eval("CountProduct")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductCodeNewDetail" SortExpression="ProductCodeNewDetail">
<ItemTemplate>
<asp:Label ID="ProductCodeNewDetail" runat="server" Text='<%#Eval("ProductCodeNewDetail")%>'></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="lblBookingDel" runat="server" Text="Booking ที่ถูกลบ"></asp:Label></b>
<b><asp:Label ID="Label9" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResultBookingDel" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GVBookingDel" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="NameDel" SortExpression="NameDel">
<ItemTemplate>
<asp:Label ID="NameDel" runat="server" Text='<%#Eval("NameDel")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="EmailDel" SortExpression="EmailDel">
<ItemTemplate>
<asp:Label ID="EmailDel" runat="server" Text='<%#Eval("EmailDel")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DeleteDate" SortExpression="DeleteDate">
<ItemTemplate>
<asp:Label ID="DeleteDate" runat="server" Text='<%#Eval("DeleteDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="BookingDate" SortExpression="BookingDate">
<ItemTemplate>
<asp:Label ID="BookingDate" runat="server" Text='<%#Eval("BookingDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="RowIDEmail" SortExpression="RowIDEmail">
<ItemTemplate>
<asp:Label ID="RowIDEmail" runat="server" Text='<%#Eval("RowIDEmail")%>'></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="ProductCodeNew" SortExpression="ProductCodeNew">
<ItemTemplate>
<asp:Label ID="ProductCodeNew" runat="server" Text='<%#Eval("ProductCodeNew")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductNameTH" SortExpression="ProductNameTH">
<ItemTemplate>
<asp:Label ID="ProductNameTH" runat="server" Text='<%#Eval("ProductNameTH")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PeriodStart" SortExpression="PeriodStart">
<ItemTemplate>
<asp:Label ID="PeriodStart" runat="server" Text='<%#Eval("PeriodStart")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PeriodEnd" SortExpression="PeriodEnd">
<ItemTemplate>
<asp:Label ID="PeriodEnd" runat="server" Text='<%#Eval("PeriodEnd")%>'></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 />
<br />
<hr />
<br />
&nbsp;<br />
<br />
<br />
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>

Imports System.Data
Partial Class SystemAdmin_ClearDetail
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If txtDateDel.Text = "" Then txtDateDel.Text = Now.Year.ToString() + "-" + Now.Month.ToString("00") + "-" + Now.Day.ToString("00")
lblBookingDel.Text = "Booking ที่ถูกลบ " & txtDateDel.Text
End If
End Sub
Sub LoadAgentData()
'--- Get Data ----
Dim strAgentIDGetURL As String = ""
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim strURLWebsite As String = RTrim(LTrim(txtURLWebsite.Text))
Dim strBookingDate As String = RTrim(LTrim(txtDateDel.Text))
If strAgentID <> "" Or strURLWebsite <> "" Then
strAgentIDGetURL = LoadHistoryLog(strAgentID, strURLWebsite)
If strAgentIDGetURL <> "" Then
strAgentID = strAgentIDGetURL
LoadTourByType(strAgentID)
LoadBookingDel(strAgentID, strBookingDate)
End If
End If
End Sub
Sub LoadTourByType(ByVal strAgentID As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getTourByType(strAgentID)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GVLoadTourbyType.DataSource = DtProductDetail
GVLoadTourbyType.DataBind()
txtLoadTourByType.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GVLoadTourbyType.DataSource = Nothing
GVLoadTourbyType.DataBind()
txtLoadTourByType.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadTourByType", ex.Message.ToString())
End Try
End Sub
Sub LoadBookingDel(ByVal strAgentID As String, ByVal strBookingDel As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getBookingDel(strAgentID, strBookingDel)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GVBookingDel.DataSource = DtProductDetail
GVBookingDel.DataBind()
lblResultBookingDel.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GVBookingDel.DataSource = Nothing
GVBookingDel.DataBind()
lblResultBookingDel.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadTourByType", ex.Message.ToString())
End Try
End Sub
Function LoadHistoryLog(ByVal strAgentID As String, ByVal strURLWebsite As String) As String ' format yyyy-MM-dd
Dim strAgentID_Return As String = ""
Try
If strAgentID <> "" Then strAgentID_Return = strAgentID
If strAgentID = "" Then strAgentID = 0
Dim DtProductDetail As New DataTable
DtProductDetail = getAgentDetail(strAgentID, strURLWebsite)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
strAgentID_Return = DtProductDetail.DefaultView(0)("AgentID").ToString()
GvHistoryLog.DataSource = DtProductDetail
GvHistoryLog.DataBind()
lblResult.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
Return strAgentID_Return
End Function
Function getAgentDetail(ByVal strAgentID As String, ByVal strURLWebsite As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_AgentDetail_FindURL(strAgentID, strURLWebsite)
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
Function getTourByType(ByVal strAgentID As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_Agent_WebHomeProduct(strAgentID)
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
Function getBookingDel(ByVal strAgentID As String, ByVal strBookingDel As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_Agent_BookingDelete(strAgentID, strBookingDel)
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
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
Protected Sub btSearch_Click(sender As Object, e As EventArgs) Handles btSearch.Click
Dim strText As String = txtDateDel.Text
If txtDateDel.Text = "" Then strText = "ทั้งหมด"
lblBookingDel.Text = "Booking ที่ถูกลบ " & strText
LoadAgentData()
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="BookingDetail.aspx.vb" Inherits="SystemAdmin_Booking" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="เงื่อนไขที่ต้องใส่ <b>PNRCode</b>: "></asp:Label>
<asp:TextBox ID="txtPNRCode" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text=""></asp:Label>
<br /><br />
<b><asp:Label ID="lblHeader" runat="server" Text="Booking Detail"></asp:Label></b>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GvHistoryLog" 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="lblPNRCode" runat="server" Text='<%#Eval("PNRCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="RowIDEmail" SortExpression="RowIDEmail">
<ItemTemplate>
<asp:Label ID="RowIDEmail" runat="server" Text='<%#Eval("RowIDEmail")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="StatusCode" SortExpression="StatusCode">
<ItemTemplate>
<asp:Label ID="lblStatusCode" 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="lblReservation" runat="server" Text='<%#Eval("Reservation")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AssignBy" SortExpression="AssignBy">
<ItemTemplate>
<asp:Label ID="AssignBy" runat="server" Text='<%#Eval("AssignBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductCodeNew" SortExpression="ProductCodeNew">
<ItemTemplate>
<asp:Label ID="ProductCodeNew" runat="server" Text='<%#Eval("ProductCodeNew")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductNameTH" SortExpression="ProductNameTH">
<ItemTemplate>
<asp:Label ID="lblProductNameTH" runat="server" Text='<%#Eval("ProductNameTH")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColStartDate" SortExpression="ColStartDate">
<ItemTemplate>
<asp:Label ID="lblColStartDate" runat="server" Text='<%#Eval("ColStartDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColEndDate" SortExpression="ColEndDate">
<ItemTemplate>
<asp:Label ID="lblColEndDate" runat="server" Text='<%#Eval("ColEndDate")%>'></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="InvoiceNo" SortExpression="InvoiceNo">
<ItemTemplate>
<asp:Label ID="lblInvoiceNo" runat="server" Text='<%#Eval("InvoiceNo")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="InvoiceDate" SortExpression="InvoiceDate">
<ItemTemplate>
<asp:Label ID="lblInvoiceDate" runat="server" Text='<%#Eval("InvoiceDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ReceiptNo" SortExpression="ReceiptNo">
<ItemTemplate>
<asp:Label ID="lblReceiptNo" runat="server" Text='<%#Eval("ReceiptNo")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ReceiptDate" SortExpression="ReceiptDate">
<ItemTemplate>
<asp:Label ID="lblReceiptDate" runat="server" Text='<%#Eval("ReceiptDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CreateBy" SortExpression="CreateBy">
<ItemTemplate>
<asp:Label ID="lblCreateBy" runat="server" Text='<%#Eval("CreateBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CreateDate" SortExpression="CreateDate">
<ItemTemplate>
<asp:Label ID="lblCreateDate" runat="server" Text='<%#Eval("CreateDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="TakeBookingDate" SortExpression="TakeBookingDate">
<ItemTemplate>
<asp:Label ID="TakeBookingDate" runat="server" Text='<%#Eval("TakeBookingDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="IsWebsite" SortExpression="IsWebsite">
<ItemTemplate>
<asp:Label ID="lblIsWebsite" runat="server" Text='<%#Eval("IsWebsite")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentName" SortExpression="AgentName">
<ItemTemplate>
<asp:Label ID="AgentName" runat="server" Text='<%#Eval("AgentName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="TimeDeposit" SortExpression="TimeDeposit">
<ItemTemplate>
<asp:Label ID="TimeDeposit" runat="server" Text='<%#Eval("TimeDeposit")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ContactName" SortExpression="ContactName">
<ItemTemplate>
<asp:Label ID="ContactName" runat="server" Text='<%#Eval("ContactName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ContactEmail" SortExpression="ContactEmail">
<ItemTemplate>
<asp:Label ID="ContactEmail" runat="server" Text='<%#Eval("ContactEmail")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CustomerCompanyName" SortExpression="CustomerCompanyName">
<ItemTemplate>
<asp:Label ID="CustomerCompanyName" runat="server" Text='<%#Eval("CustomerCompanyName")%>'></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="Label4" runat="server" Text="ActivityLog"></asp:Label></b> :
<asp:Label ID="lblResult_ActivityLog" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDActivityLog" 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="ActivityType" SortExpression="ActivityType">
<ItemTemplate>
<asp:Label ID="lblActivityType" runat="server" Text='<%#Eval("ActivityType")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ValueOld" SortExpression="ValueOld">
<ItemTemplate>
<asp:Label ID="lblValueOld" runat="server" Text='<%#Eval("ValueOld")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ValueNew" SortExpression="ValueNew">
<ItemTemplate>
<asp:Label ID="lblValueNew" runat="server" Text='<%#Eval("ValueNew")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ActionBy" SortExpression="ActionBy">
<ItemTemplate>
<asp:Label ID="lblActionBy" runat="server" Text='<%#Eval("ActionBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CreateDateTime" SortExpression="CreateDateTime">
<ItemTemplate>
<asp:Label ID="lblCreateDateTime" runat="server" Text='<%#Eval("CreateDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ValueDetail" SortExpression="ValueDetail">
<ItemTemplate>
<asp:Label ID="lblValueDetail" runat="server" Text='<%#Eval("ValueDetail")%>'></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="Label3" runat="server" Text="StatusLog"></asp:Label></b> :
<asp:Label ID="lblResult_StatusLog" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDBookingStatusLog" 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="RowIDEmail" SortExpression="RowIDEmail">
<ItemTemplate>
<asp:Label ID="RowIDEmail" runat="server" Text='<%#Eval("RowIDEmail")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CreateDate" SortExpression="CreateDate">
<ItemTemplate>
<asp:Label ID="CreateDate" runat="server" Text='<%#Eval("CreateDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="OldStatusID" SortExpression="OldStatusID">
<ItemTemplate>
<asp:Label ID="OldStatusID" runat="server" Text='<%#Eval("OldStatusID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="NewStatusID" SortExpression="NewStatusID">
<ItemTemplate>
<asp:Label ID="NewStatusID" runat="server" Text='<%#Eval("NewStatusID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ActionBy" SortExpression="ActionBy">
<ItemTemplate>
<asp:Label ID="ActionBy" runat="server" Text='<%#Eval("ActionBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="TypeLog" SortExpression="TypeLog">
<ItemTemplate>
<asp:Label ID="TypeLog" runat="server" Text='<%#Eval("TypeLog")%>'></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> :
<asp:Label ID="lblResult_BookingInPeriod" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDBookingInPeriod" 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>
<asp:TemplateField HeaderText="CancelDate" SortExpression="CancelDate">
<ItemTemplate>
<asp:Label ID="CancelDate" runat="server" Text='<%#Eval("CancelDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="RemarkCancel" SortExpression="RemarkCancel">
<ItemTemplate>
<asp:Label ID="RemarkCancel" runat="server" Text='<%#Eval("RemarkCancel")%>'></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>
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>
Imports System.Data
Partial Class SystemAdmin_Booking
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'ViewState("SortExpression") = "HistoryDateTime"
'ViewState("SortDirection") = "ASC"
' txtPNRCode.Text = getCurrentDate()
' LoadHistoryLog(txtPNRCode.Text)
End If
End Sub
Function getCurrentDate() As String
Dim strDate As String = ""
strDate = Date.Now.ToString("yyyy-MM-dd")
Return strDate
End Function
Protected Sub btSearch_Click(sender As Object, e As EventArgs) Handles btSearch.Click
Dim strPNRCode As String = RTrim(LTrim(txtPNRCode.Text)) ' Trim(Replace(txtPNRCode.Text, " ", ""))
If Len(strPNRCode) > 5 Then
If strPNRCode <> "" Then LoadHistoryLog(strPNRCode)
If strPNRCode <> "" Then LoadHistoryLog_ActivityLog(strPNRCode) 'GDActivityLog
If strPNRCode <> "" Then LoadHistoryLog_StatusLog(strPNRCode) 'GDBookingStatusLog
If strPNRCode <> "" Then LoadHistoryLog_BookingInPeriod(strPNRCode) 'GDBookingStatusLog
End If
End Sub
Sub LoadHistoryLog_BookingInPeriod(ByVal strPNRCode As String) 'GDBookingStatusLog
Try
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_BookingInPeriod(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
GDBookingInPeriod.DataSource = DtBookingDetail
GDBookingInPeriod.DataBind()
lblResult_BookingInPeriod.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDBookingInPeriod.DataSource = Nothing
GDBookingInPeriod.DataBind()
lblResult_BookingInPeriod.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_BookingInPeriod", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_StatusLog(ByVal strPNRCode As String) 'GDBookingStatusLog
Try
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_StatusLog(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
GDBookingStatusLog.DataSource = DtBookingDetail
GDBookingStatusLog.DataBind()
lblResult_StatusLog.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDBookingStatusLog.DataSource = Nothing
GDBookingStatusLog.DataBind()
lblResult_StatusLog.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_StatusLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_ActivityLog(ByVal strPNRCode As String) 'GDActivityLog
Try
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_ActivityLog(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
GDActivityLog.DataSource = DtBookingDetail
GDActivityLog.DataBind()
lblResult_ActivityLog.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDActivityLog.DataSource = Nothing
GDActivityLog.DataBind()
lblResult_ActivityLog.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_ActivityLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog(ByVal strPNRCode As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getProductDetail(strPNRCode)
'lblHeaderDate.Text = ConvertDateString(strDate)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GvHistoryLog.DataSource = DtProductDetail
GvHistoryLog.DataBind()
lblResult.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
End Sub
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
Function ConvertDateString(ByVal strDate As String) As String
'strDate => yyyy-mm-dd
'output => dd/mm/yyyy
Dim strDateReturn As String = ""
Dim ArrDate() As String
Try
ArrDate = Split(strDate, "-")
strDateReturn = ArrDate(2) & "/" & ArrDate(1) & "/" & ArrDate(0)
Catch ex As Exception
strDateReturn = strDate
End Try
Return strDateReturn
End Function
Protected Sub GvHistoryLog_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GvHistoryLog.Sorting
' Try
' If
'("SortExpression") = e.SortExpression Then ' กรณีที่เป็นฟิลด์เดิม
' If ViewState("SortDirection") = "ASC" Then
' ViewState("SortDirection") = "DESC"
' Else
' ViewState("SortDirection") = "ASC"
' End If
' Else
' ViewState("SortExpression") = e.SortExpression
' ViewState("SortDirection") = "ASC"
' End If
' Dim strDateSearch As String = txtPNRCode.Text
' LoadHistoryLog(strDateSearch)
' Catch ex As Exception
' writeErrorLog("GvHistoryLog_Sorting", ex.Message.ToString())
' End Try
End Sub
#Region "get Database MushroomTravel"
Function getSaleMushroom() As DataTable
Dim Dt As New DataTable
Dim ClsMUser As New MushroomTravel.M_User
ClsMUser.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("MushroomTravel")
Try
With ClsMUser
.Where.WhereClauseReset()
.LoadAll()
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsMUser = Nothing
End Try
Return Dt
End Function
#End Region
#Region "get Booking Detail"
Function getProductDetail(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail(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
Function getBookingDetail_ActivityLog(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_ActivityLog(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
Function getBookingDetail_StatusLog(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_StatusLog(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
Function getBookingDetail_BookingInPeriod(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_BookingInPeriod(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
Protected Sub GvHistoryLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvHistoryLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDActivityLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDActivityLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDBookingStatusLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingStatusLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDBookingInPeriod_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingInPeriod.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ClearDetail.aspx.vb" Inherits="SystemAdmin_ClearDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="เงื่อนไขที่ต้องใส่ <b>AgentID</b>: "></asp:Label>
<asp:TextBox ID="txtAgentID" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text=""></asp:Label>
<br /><br />
<b><asp:Label ID="lblHeader" runat="server" Text="Agent Detail"></asp:Label></b>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GvHistoryLog" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="AgentID" SortExpression="AgentID">
<ItemTemplate>
<asp:Label ID="AgentID" runat="server" Text='<%#Eval("AgentID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentCode" SortExpression="AgentCode">
<ItemTemplate>
<asp:Label ID="AgentCode" runat="server" Text='<%#Eval("AgentCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentName" SortExpression="AgentName">
<ItemTemplate>
<asp:Label ID="AgentName" runat="server" Text='<%#Eval("AgentName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentNameEN" SortExpression="AgentNameEN">
<ItemTemplate>
<asp:Label ID="AgentNameEN" runat="server" Text='<%#Eval("AgentNameEN")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="LicenseNumber" SortExpression="LicenseNumber">
<ItemTemplate>
<asp:Label ID="LicenseNumber" runat="server" Text='<%#Eval("LicenseNumber")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="NickName" SortExpression="NickName">
<ItemTemplate>
<asp:Label ID="NickName" runat="server" Text='<%#Eval("NickName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tel" SortExpression="Tel">
<ItemTemplate>
<asp:Label ID="Tel" runat="server" Text='<%#Eval("Tel")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountBooking" SortExpression="CountBooking">
<ItemTemplate>
<asp:Label ID="CountBooking" runat="server" Text='<%#Eval("CountBooking")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountProduct" SortExpression="CountProduct">
<ItemTemplate>
<asp:Label ID="CountProduct" runat="server" Text='<%#Eval("CountProduct")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountProduct_WHConnect" SortExpression="CountProduct_WHConnect">
<ItemTemplate>
<asp:Label ID="CountProduct_WHConnect" runat="server" Text='<%#Eval("CountProduct_WHConnect")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountPeriod" SortExpression="CountPeriod">
<ItemTemplate>
<asp:Label ID="CountPeriod" runat="server" Text='<%#Eval("CountPeriod")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountPassenger" SortExpression="CountPassenger">
<ItemTemplate>
<asp:Label ID="CountPassenger" runat="server" Text='<%#Eval("CountPassenger")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountCustomerCompany" SortExpression="CountCustomerCompany">
<ItemTemplate>
<asp:Label ID="CountCustomerCompany" runat="server" Text='<%#Eval("CountCustomerCompany")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CountSupplier" SortExpression="CountSupplier">
<ItemTemplate>
<asp:Label ID="CountSupplier" runat="server" Text='<%#Eval("CountSupplier")%>'></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 />
<asp:Button ID="btDeleteBooking" runat="server" Text="ลบ Booking " />
<asp:Button ID="btDeleteProduct" runat="server" Text="ลบ Product & Period " />
<asp:Button ID="btDeletePassenger" runat="server" Text="ลบ Passenger " />
<asp:Button ID="btDeleteCustomerCompany" runat="server" Text="ลบ CustomerCompany " />
<asp:Button ID="btDeleteCountSupplier" runat="server" Text="ลบ CountSupplier " />
<br />
<br />
<hr />
<br />
<asp:Label ID="Label3" runat="server" Text="ข้อมูล ProductCodeNew ที่ต้องการจะลบ : "></asp:Label>
<asp:TextBox ID="txtMultiProduct" runat="server" TextMode="MultiLine" Width="70%"></asp:TextBox>
&nbsp;<asp:Button ID="btDelProductCodeNew" runat="server" Text="ลบ Product &amp; Period by ProductCodeNew" />
<br />
<asp:Label ID="Label4" runat="server" BorderColor="#FFFFCC" Font-Bold="True" ForeColor="Red" Text="** ตัวอย่างกรอกข้อมูล จะต้องเป็น format แบบนี้เท่านั้น เชน #DDSM190060#,#DDSM190061# <br> เน้นให้ใส่ # หน้าและหลัง ProductCodeNew ทุกครั้ง"></asp:Label>
<br />
<br />
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>

Imports System.Data
Partial Class SystemAdmin_ClearDetail
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Session("TypeUserLogin") <> "systemadmin" Then
Session("TypeUserLogin") = ""
Session("CallCenterSystemAdmin") = Nothing
Me.Page.Response.Redirect("~/Login.aspx")
End If
fnSwtichShowDelControl(False)
LoadAgentData()
End Sub
Sub LoadAgentData()
'--- Get Data ----
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
If Len(strAgentID) > 2 Then
If strAgentID <> "" Then LoadHistoryLog(strAgentID)
End If
End Sub
Sub fnSwtichShowDelControl(ByVal bln As Boolean)
btDeleteBooking.Visible = bln
btDeleteProduct.Visible = bln
btDeletePassenger.Visible = bln
btDeleteCustomerCompany.Visible = bln
btDeleteCountSupplier.Visible = bln
End Sub
Sub LoadHistoryLog(ByVal strAgentID As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getAgentDetail(strAgentID)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GvHistoryLog.DataSource = DtProductDetail
GvHistoryLog.DataBind()
lblResult.Text = " " & DtProductDetail.DefaultView.Count & " items."
If DtProductDetail.DefaultView.Count > 0 Then fnSwtichShowDelControl(True)
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
End Sub
Function getAgentDetail(ByVal strAgentID As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_AgentDetail(strAgentID)
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
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
Protected Sub btDeleteBooking_Click(sender As Object, e As EventArgs) Handles btDeleteBooking.Click
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelBookingByAgentID(strAgentID)
End With
LoadAgentData()
Catch ex As Exception
Finally
ClsMainBooking = Nothing
End Try
End Sub
Protected Sub btDeleteProduct_Click(sender As Object, e As EventArgs) Handles btDeleteProduct.Click
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelProductByAgentID(strAgentID)
End With
LoadAgentData()
Catch ex As Exception
Finally
ClsMainBooking = Nothing
End Try
End Sub
Protected Sub btDeletePassenger_Click(sender As Object, e As EventArgs) Handles btDeletePassenger.Click
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelPassengerByAgentID(strAgentID)
End With
LoadAgentData()
Catch ex As Exception
Finally
ClsMainBooking = Nothing
End Try
End Sub
Protected Sub btDeleteCustomerCompany_Click(sender As Object, e As EventArgs) Handles btDeleteCustomerCompany.Click
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelCustomerCompanyByAgentID(strAgentID)
End With
LoadAgentData()
Catch ex As Exception
Finally
ClsMainBooking = Nothing
End Try
End Sub
Protected Sub btDeleteCountSupplier_Click(sender As Object, e As EventArgs) Handles btDeleteCountSupplier.Click
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelSupplierByAgentID(strAgentID)
End With
LoadAgentData()
Catch ex As Exception
Finally
ClsMainBooking = Nothing
End Try
End Sub
Protected Sub btDelProductCodeNew_Click(sender As Object, e As EventArgs) Handles btDelProductCodeNew.Click
Dim strProductCodeNewDel As String = RTrim(LTrim(txtMultiProduct.Text))
Dim strAgentID As String = RTrim(LTrim(txtAgentID.Text))
If strProductCodeNewDel <> "" And IsNumeric(strAgentID) Then
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_DelProductByAgentID_byProductCode(strAgentID, strProductCodeNewDel)
End With
LoadAgentData()
Catch ex As Exception
lblError.Visible = True
lblError.Text = "[btDelProductCodeNew_Click] Err=" & ex.Message.ToString()
Finally
ClsMainBooking = Nothing
End Try
End If
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="HistoryLog.aspx.vb" Inherits="SystemAdmin_HistoryLog" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="ค้นหาข้อมูลการโทรศัพท์ของลูกค้า <b>วันที่</b>: "></asp:Label>
<asp:TextBox ID="txtDate" runat="server" MaxLength="10" Width="80px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text="** หมายเหตุ ให้กรอกข้อมูลรูปแบบ yyyy-MM-dd เช่น 2013-11-05 "></asp:Label>
<br /><br />
<asp:Label ID="lblHeader" runat="server" Text="History Customer Call Log By"></asp:Label>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<br />
<asp:GridView ID="GvHistoryLog" runat="server" AllowSorting="True"
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="History DateTime" SortExpression="HistoryDateTime">
<ItemTemplate>
<asp:Label ID="lblHistoryDate" runat="server" Text='<%#Eval("HistoryDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Customer Mobile" SortExpression="CallerID">
<ItemTemplate>
<asp:Label ID="lblCallerID" runat="server" Text='<%#Eval("CallerID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ReturnCall" SortExpression="ReturnCall">
<ItemTemplate>
<asp:Label ID="lblReturnCall" runat="server" Text='<%#Eval("ReturnCall")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ReturnValueText" SortExpression="ReturnValueText">
<ItemTemplate>
<asp:Label ID="lblReturnValueText" runat="server" Text='<%#Eval("ReturnValueText")%>'></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>
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>

Imports System.Data
Partial Class SystemAdmin_HistoryLog
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("SortExpression") = "HistoryDateTime"
ViewState("SortDirection") = "ASC"
txtDate.Text = getCurrentDate()
LoadHistoryLog(txtDate.Text)
End If
End Sub
Function getCurrentDate() As String
Dim strDate As String = ""
strDate = Date.Now.ToString("yyyy-MM-dd")
Return strDate
End Function
Protected Sub btSearch_Click(sender As Object, e As EventArgs) Handles btSearch.Click
Dim strDateSearch As String = txtDate.Text
LoadHistoryLog(strDateSearch)
End Sub
Sub LoadHistoryLog(ByVal strDate As String) ' format yyyy-MM-dd
Try
Dim DtCustomerLog As New DataTable
DtCustomerLog = getCustomerLog(strDate)
lblHeaderDate.Text = ConvertDateString(strDate)
If DtCustomerLog.DefaultView.Count > 0 Then
DtCustomerLog.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GvHistoryLog.DataSource = DtCustomerLog
GvHistoryLog.DataBind()
lblResult.Text = " " & DtCustomerLog.DefaultView.Count & " items."
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
End Sub
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
Function ConvertDateString(ByVal strDate As String) As String
'strDate => yyyy-mm-dd
'output => dd/mm/yyyy
Dim strDateReturn As String = ""
Dim ArrDate() As String
Try
ArrDate = Split(strDate, "-")
strDateReturn = ArrDate(2) & "/" & ArrDate(1) & "/" & ArrDate(0)
Catch ex As Exception
strDateReturn = strDate
End Try
Return strDateReturn
End Function
Protected Sub GvHistoryLog_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GvHistoryLog.Sorting
Try
If ViewState("SortExpression") = e.SortExpression Then ' กรณีที่เป็นฟิลด์เดิม
If ViewState("SortDirection") = "ASC" Then
ViewState("SortDirection") = "DESC"
Else
ViewState("SortDirection") = "ASC"
End If
Else
ViewState("SortExpression") = e.SortExpression
ViewState("SortDirection") = "ASC"
End If
Dim strDateSearch As String = txtDate.Text
LoadHistoryLog(strDateSearch)
Catch ex As Exception
writeErrorLog("GvHistoryLog_Sorting", ex.Message.ToString())
End Try
End Sub
#Region "get Database MushroomTravel"
Function getSaleMushroom() As DataTable
Dim Dt As New DataTable
Dim ClsMUser As New MushroomTravel.M_User
ClsMUser.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("MushroomTravel")
Try
With ClsMUser
.Where.WhereClauseReset()
.LoadAll()
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsMUser = Nothing
End Try
Return Dt
End Function
#End Region
#Region "get Database CallCenter"
Function getCustomerLog(ByVal strDate As String) As DataTable
Dim Dt As New DataTable
Dim ClsCallLog As New CallCenterLog
Try
With ClsCallLog
.Where.WhereClauseReset()
._Proc_LoadHistoryLogByDate(strDate)
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsCallLog = Nothing
End Try
Return Dt
End Function
#End Region
Protected Sub GvHistoryLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvHistoryLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PaymentDetail.aspx.vb" Inherits="SystemAdmin_PaymentDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="เงื่อนไขที่ต้องใส่ <b>PNRCode</b>: "></asp:Label>
<asp:TextBox ID="txtPNRCode" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text=""></asp:Label>
<br /><br />
<b><asp:Label ID="lblHeader" runat="server" Text="Payment Current"></asp:Label></b>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GvHistoryLog" 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="PaidbyID" SortExpression="PaidbyID">
<ItemTemplate>
<asp:Label ID="PaidbyID" runat="server" Text='<%#Eval("PaidbyID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="RowIDEmail" SortExpression="RowIDEmail">
<ItemTemplate>
<asp:Label ID="RowIDEmail" runat="server" Text='<%#Eval("RowIDEmail")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Catagory" SortExpression="Catagory">
<ItemTemplate>
<asp:Label ID="Catagory" runat="server" Text='<%#Eval("Catagory")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ActionDate" SortExpression="ActionDate">
<ItemTemplate>
<asp:Label ID="ActionDate" runat="server" Text='<%#Eval("ActionDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price" SortExpression="Price">
<ItemTemplate>
<asp:Label ID="Price" runat="server" Text='<%#Eval("Price")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Col_Vat" SortExpression="Col_Vat">
<ItemTemplate>
<asp:Label ID="Col_Vat" runat="server" Text='<%#Eval("Col_Vat")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Remark" SortExpression="Remark">
<ItemTemplate>
<asp:Label ID="Remark" runat="server" Text='<%#Eval("Remark")%>'></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>
<asp:TemplateField HeaderText="IsManagerApprove" SortExpression="IsManagerApprove">
<ItemTemplate>
<asp:Label ID="IsManagerApprove" runat="server" Text='<%#Eval("IsManagerApprove")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ManageApprovBy" SortExpression="ManageApprovBy">
<ItemTemplate>
<asp:Label ID="ManageApprovBy" runat="server" Text='<%#Eval("ManageApprovBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ManagerApproveDateTime" SortExpression="ManagerApproveDateTime">
<ItemTemplate>
<asp:Label ID="ManagerApproveDateTime" runat="server" Text='<%#Eval("ManagerApproveDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="IsApproval" SortExpression="IsApproval">
<ItemTemplate>
<asp:Label ID="IsApproval" runat="server" Text='<%#Eval("IsApproval")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountApproveBy" SortExpression="AccountApproveBy">
<ItemTemplate>
<asp:Label ID="AccountApproveBy" runat="server" Text='<%#Eval("AccountApproveBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountApproveDateTime" SortExpression="AccountApproveDateTime">
<ItemTemplate>
<asp:Label ID="AccountApproveDateTime" runat="server" Text='<%#Eval("AccountApproveDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PaymentType" SortExpression="PaymentType">
<ItemTemplate>
<asp:Label ID="PaymentType" runat="server" Text='<%#Eval("PaymentType")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SupplierName" SortExpression="SupplierName">
<ItemTemplate>
<asp:Label ID="SupplierName" runat="server" Text='<%#Eval("SupplierName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountName" SortExpression="AccountName">
<ItemTemplate>
<asp:Label ID="AccountName" runat="server" Text='<%#Eval("AccountName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountNumber" SortExpression="AccountNumber">
<ItemTemplate>
<asp:Label ID="AccountNumber" runat="server" Text='<%#Eval("AccountNumber")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Branch" SortExpression="Branch">
<ItemTemplate>
<asp:Label ID="Branch" runat="server" Text='<%#Eval("Branch")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="BankCode" SortExpression="BankCode">
<ItemTemplate>
<asp:Label ID="BankCode" runat="server" Text='<%#Eval("BankCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountTransferDatetime" SortExpression="AccountTransferDatetime">
<ItemTemplate>
<asp:Label ID="AccountTransferDatetime" runat="server" Text='<%#Eval("AccountTransferDatetime")%>'></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="Label4" runat="server" Text="Payment Log"></asp:Label></b> :
<asp:Label ID="lblResult_ActivityLog" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDActivityLog" 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="PaidbyID" SortExpression="PaidbyID">
<ItemTemplate>
<asp:Label ID="PaidbyID" runat="server" Text='<%#Eval("PaidbyID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="RowIDEmail" SortExpression="RowIDEmail">
<ItemTemplate>
<asp:Label ID="RowIDEmail" runat="server" Text='<%#Eval("RowIDEmail")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Event" SortExpression="Event">
<ItemTemplate>
<asp:Label ID="Event" runat="server" Text='<%#Eval("Event")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="EventBy" SortExpression="EventBy">
<ItemTemplate>
<asp:Label ID="EventBy" runat="server" Text='<%#Eval("EventBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="EventDateTime" SortExpression="EventDateTime">
<ItemTemplate>
<asp:Label ID="EventDateTime" runat="server" Text='<%#Eval("EventDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Catagory" SortExpression="Catagory">
<ItemTemplate>
<asp:Label ID="Catagory" runat="server" Text='<%#Eval("Catagory")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ActionDate" SortExpression="ActionDate">
<ItemTemplate>
<asp:Label ID="ActionDate" runat="server" Text='<%#Eval("ActionDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price" SortExpression="Price">
<ItemTemplate>
<asp:Label ID="Price" runat="server" Text='<%#Eval("Price")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Col_Vat" SortExpression="Col_Vat">
<ItemTemplate>
<asp:Label ID="Col_Vat" runat="server" Text='<%#Eval("Col_Vat")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Remark" SortExpression="Remark">
<ItemTemplate>
<asp:Label ID="Remark" runat="server" Text='<%#Eval("Remark")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="IsManagerApprove" SortExpression="IsManagerApprove">
<ItemTemplate>
<asp:Label ID="IsManagerApprove" runat="server" Text='<%#Eval("IsManagerApprove")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ManageApprovBy" SortExpression="ManageApprovBy">
<ItemTemplate>
<asp:Label ID="ManageApprovBy" runat="server" Text='<%#Eval("ManageApprovBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ManagerApproveDateTime" SortExpression="ManagerApproveDateTime">
<ItemTemplate>
<asp:Label ID="ManagerApproveDateTime" runat="server" Text='<%#Eval("ManagerApproveDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="IsApproval" SortExpression="IsApproval">
<ItemTemplate>
<asp:Label ID="IsApproval" runat="server" Text='<%#Eval("IsApproval")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountApproveBy" SortExpression="AccountApproveBy">
<ItemTemplate>
<asp:Label ID="AccountApproveBy" runat="server" Text='<%#Eval("AccountApproveBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountApproveDateTime" SortExpression="AccountApproveDateTime">
<ItemTemplate>
<asp:Label ID="AccountApproveDateTime" runat="server" Text='<%#Eval("AccountApproveDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PaymentType" SortExpression="PaymentType">
<ItemTemplate>
<asp:Label ID="PaymentType" runat="server" Text='<%#Eval("PaymentType")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SupplierName" SortExpression="SupplierName">
<ItemTemplate>
<asp:Label ID="SupplierName" runat="server" Text='<%#Eval("SupplierName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountName" SortExpression="AccountName">
<ItemTemplate>
<asp:Label ID="AccountName" runat="server" Text='<%#Eval("AccountName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountNumber" SortExpression="AccountNumber">
<ItemTemplate>
<asp:Label ID="AccountNumber" runat="server" Text='<%#Eval("AccountNumber")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Branch" SortExpression="Branch">
<ItemTemplate>
<asp:Label ID="Branch" runat="server" Text='<%#Eval("Branch")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="BankCode" SortExpression="BankCode">
<ItemTemplate>
<asp:Label ID="BankCode" runat="server" Text='<%#Eval("BankCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AccountTransferDatetime" SortExpression="AccountTransferDatetime">
<ItemTemplate>
<asp:Label ID="AccountTransferDatetime" runat="server" Text='<%#Eval("AccountTransferDatetime")%>'></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 />
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>
Imports System.Data
Partial Class SystemAdmin_PaymentDetail
Inherits System.Web.UI.Page
Protected Sub btSearch_Click(sender As Object, e As EventArgs) Handles btSearch.Click
Dim strPNRCode As String = RTrim(LTrim(txtPNRCode.Text)) ' Trim(Replace(txtPNRCode.Text, " ", ""))
If Len(strPNRCode) > 5 Then
If strPNRCode <> "" Then LoadHistoryLog(strPNRCode)
If strPNRCode <> "" Then LoadHistoryLog_Log(strPNRCode) 'GDActivityLog
End If
End Sub
Sub LoadHistoryLog(ByVal strPNRCode As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getProductDetail(strPNRCode)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GvHistoryLog.DataSource = DtProductDetail
GvHistoryLog.DataBind()
lblResult.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_Log(ByVal strPNRCode As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getBookingDetail_ActivityLog(strPNRCode)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GDActivityLog.DataSource = DtProductDetail
GDActivityLog.DataBind()
lblResult_ActivityLog.Text = " " & DtProductDetail.DefaultView.Count & " items."
Else
GDActivityLog.DataSource = Nothing
GDActivityLog.DataBind()
lblResult_ActivityLog.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_Log", ex.Message.ToString())
End Try
End Sub
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
#Region "get Booking Detail"
Function getProductDetail(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_Payment_Current(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
Function getBookingDetail_ActivityLog(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New MainBooking
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_BookingDetail_Payment_Log(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
Protected Sub GvHistoryLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvHistoryLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDActivityLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDActivityLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ProductDetail.aspx.vb" Inherits="SystemAdmin_ProductDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../Css/CssGrid.css" rel="stylesheet" type="text/css" />
<br />
<asp:Label ID="Label1" runat="server" Text="เงื่อนไขที่ต้องใส่ได้คือ <b>รหัสสินค้า หรือ ทัวร์โค้ด หรือ ProductNameSupplier หรือ ProductID_Original</b>: "></asp:Label>
<asp:TextBox ID="txtProductCode" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
<asp:Button ID="btSearch" runat="server" Text="ค้นหา" />
&nbsp;
<asp:Label ID="Label2" runat="server" Font-Italic="true" ForeColor="Gray" Text=""></asp:Label>
<br /><br />
<asp:Label ID="Label7" runat="server" Text="<b>(For Wholesale Connect) ProductCodeNew : </b>: "></asp:Label>
<asp:TextBox ID="txtProductCodeNew" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
<asp:Button ID="btSearchProductOriginalWH" runat="server" Text="ค้นหา Product ตั้งต้น" />
&nbsp;
<br /><br />
<b><asp:Label ID="lblHeader" runat="server" Text="Product Detail"></asp:Label></b>
<b><asp:Label ID="lblHeaderDate" runat="server" Text=""></asp:Label></b> :
<asp:Label ID="lblResult" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GvHistoryLog" 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="ProductID" SortExpression="ProductID">
<ItemTemplate>
<asp:Label ID="ProductID" runat="server" Text='<%#Eval("ProductID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductCode" SortExpression="ProductCode">
<ItemTemplate>
<asp:Label ID="ProductCode" runat="server" Text='<%#Eval("ProductCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductCodeNew" SortExpression="ProductCodeNew">
<ItemTemplate>
<asp:Label ID="ProductCodeNew" runat="server" Text='<%#Eval("ProductCodeNew")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductNameTH" SortExpression="ProductNameTH">
<ItemTemplate>
<asp:Label ID="ProductNameTH" runat="server" Text='<%#Eval("ProductNameTH")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductNameSupplier" HeaderStyle-BackColor="Yellow" SortExpression="ProductNameSupplier">
<ItemTemplate>
<asp:Label ID="ProductNameSupplier" runat="server" Text='<%#Eval("ProductNameSupplier")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="AgentName" SortExpression="AgentName">
<ItemTemplate>
<asp:Label ID="AgentName" runat="server" Text='<%#Eval("AgentName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SupplierName" SortExpression="SupplierName">
<ItemTemplate>
<asp:Label ID="SupplierName" runat="server" Text='<%#Eval("SupplierName")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Createby" SortExpression="Createby">
<ItemTemplate>
<asp:Label ID="Createby" runat="server" Text='<%#Eval("Createby")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Createdate" SortExpression="Createdate">
<ItemTemplate>
<asp:Label ID="Createdate" runat="server" Text='<%#Eval("Createdate")%>'></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>
<asp:TemplateField HeaderText="ProductID_Original" SortExpression="ProductID_Original">
<ItemTemplate>
<asp:Label ID="ProductID_Original" runat="server" Text='<%#Eval("ProductID_Original")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductMush" SortExpression="ProductMush">
<ItemTemplate>
<asp:Label ID="ProductMush" runat="server" Text='<%#Eval("ProductMush")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="QUploadDatetime" HeaderStyle-BackColor="Yellow" SortExpression="QUploadDatetime">
<ItemTemplate>
<asp:Label ID="QUploadDatetime" runat="server" Text='<%#Eval("QUploadDatetime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="UploadPackage" SortExpression="UploadPackage">
<ItemTemplate>
<asp:HyperLink ID="UploadPackage" runat="server" NavigateUrl='<%#Eval("UploadPackage")%>' Text='<%#Eval("UploadPackage")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="UploadFileWordDateTime" SortExpression="UploadFileWordDateTime">
<ItemTemplate>
<asp:Label ID="UploadFileWordDateTime" runat="server" Text='<%#Eval("UploadFileWordDateTime")%>' Target="_blank"></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColFlieWord" SortExpression="ColFlieWord">
<ItemTemplate>
<asp:HyperLink ID="ColFlieWord" runat="server" NavigateUrl='<%#Eval("ColFlieWord")%>' Text='<%#Eval("ColFlieWord")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Picture" SortExpression="Picture">
<ItemTemplate>
<asp:HyperLink ID="Picture" runat="server" NavigateUrl='<%#Eval("Picture")%>' Text='<%#Eval("Picture")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SWH_WordUrl" HeaderStyle-BackColor="#00ff00" SortExpression="WH_WordUrl">
<ItemTemplate>
<asp:HyperLink ID="WH_WordUrl" runat="server" NavigateUrl='<%#Eval("WH_WordUrl")%>' Text='<%#Eval("WH_WordUrl")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SWH_PdfUrl" HeaderStyle-BackColor="#00ff00" SortExpression="WH_PdfUrl">
<ItemTemplate>
<asp:HyperLink ID="WH_PdfUrl" runat="server" NavigateUrl='<%#Eval("WH_PdfUrl")%>' Text='<%#Eval("WH_PdfUrl")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SWH_ImageUrl" HeaderStyle-BackColor="#00ff00" SortExpression="WH_ImageUrl">
<ItemTemplate>
<asp:HyperLink ID="WH_ImageUrl" runat="server" NavigateUrl='<%#Eval("WH_ImageUrl")%>' Text='<%#Eval("WH_ImageUrl")%>' Target="_blank"></asp:HyperLink>
</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>
<asp:GridView ID="GVCountry" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="30%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="CountryName_TH" SortExpression="CountryName_TH">
<ItemTemplate>
<asp:Label ID="CountryName_TH" runat="server" Text='<%#Eval("CountryName_TH")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="keyslug" SortExpression="keyslug">
<ItemTemplate>
<asp:Label ID="keyslug" runat="server" Text='<%#Eval("keyslug")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="GeoType" SortExpression="GeoType">
<ItemTemplate>
<asp:Label ID="GeoType" runat="server" Text='<%#Eval("GeoType")%>'></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="Label4" runat="server" Text="Period Detail"></asp:Label></b> :
<asp:Label ID="lblResult_PeriodDetail" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDPeriodDetail" 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="ProductID" SortExpression="ProductID">
<ItemTemplate>
<asp:Label ID="ProductID" runat="server" Text='<%#Eval("ProductID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Product_detailID" SortExpression="Product_detailID">
<ItemTemplate>
<asp:Label ID="Product_detailID" runat="server" Text='<%#Eval("Product_detailID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductDetialID_Original" SortExpression="ProductDetialID_Original">
<ItemTemplate>
<asp:Label ID="ProductDetialID_Original" runat="server" Text='<%#Eval("ProductDetialID_Original")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColStartDate" SortExpression="ColStartDate">
<ItemTemplate>
<asp:Label ID="ColStartDate" runat="server" Text='<%#Eval("ColStartDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColEndDate" SortExpression="ColEndDate">
<ItemTemplate>
<asp:Label ID="ColEndDate" runat="server" Text='<%#Eval("ColEndDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColTotal" SortExpression="ColTotal">
<ItemTemplate>
<asp:Label ID="ColTotal" runat="server" Text='<%#Eval("ColTotal")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="GroupSize" SortExpression="GroupSize">
<ItemTemplate>
<asp:Label ID="GroupSize" runat="server" Text='<%#Eval("GroupSize")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SeatUpdate" SortExpression="SeatUpdate">
<ItemTemplate>
<asp:Label ID="SeatUpdate" runat="server" Text='<%#Eval("SeatUpdate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="BookingStatusCount" SortExpression="BookingStatusCount">
<ItemTemplate>
<asp:Label ID="BookingStatusCount" runat="server" Text='<%#Eval("BookingStatusCount")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ActiveDate" SortExpression="ActiveDate">
<ItemTemplate>
<asp:Label ID="ActiveDate" runat="server" Text='<%#Eval("ActiveDate")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PeriodStatusCode" SortExpression="PeriodStatusCode">
<ItemTemplate>
<asp:Label ID="PeriodStatusCode" runat="server" Text='<%#Eval("PeriodStatusCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_AdultTh_Single" SortExpression="Price_AdultTh_Single">
<ItemTemplate>
<asp:Label ID="Price_AdultTh_Single" runat="server" Text='<%#Eval("Price_AdultTh_Single")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_AdultTh_Share" SortExpression="Price_AdultTh_Share">
<ItemTemplate>
<asp:Label ID="Price_AdultTh_Share" runat="server" Text='<%#Eval("Price_AdultTh_Share")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_ChildTh_Bed" SortExpression="Price_ChildTh_Bed">
<ItemTemplate>
<asp:Label ID="Price_ChildTh_Bed" runat="server" Text='<%#Eval("Price_ChildTh_Bed")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_ChildTh_Nobed" SortExpression="Price_ChildTh_Nobed">
<ItemTemplate>
<asp:Label ID="Price_ChildTh_Nobed" runat="server" Text='<%#Eval("Price_ChildTh_Nobed")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_Triple" SortExpression="Price_Triple">
<ItemTemplate>
<asp:Label ID="Price_Triple" runat="server" Text='<%#Eval("Price_Triple")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Margin" SortExpression="Margin">
<ItemTemplate>
<asp:Label ID="Margin" runat="server" Text='<%#Eval("Margin")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Comsell" SortExpression="Comsell">
<ItemTemplate>
<asp:Label ID="Comsell" runat="server" Text='<%#Eval("Comsell")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Margin" SortExpression="Margin">
<ItemTemplate>
<asp:Label ID="Margin" runat="server" Text='<%#Eval("Margin")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DatePayment" SortExpression="DatePayment">
<ItemTemplate>
<asp:Label ID="DatePayment" runat="server" Text='<%#Eval("DatePayment")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Deposit" SortExpression="Deposit">
<ItemTemplate>
<asp:Label ID="Deposit" runat="server" Text='<%#Eval("Deposit")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Lastdaypayment" SortExpression="Lastdaypayment">
<ItemTemplate>
<asp:Label ID="Lastdaypayment" runat="server" Text='<%#Eval("Lastdaypayment")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="IsSoldout" SortExpression="IsSoldout">
<ItemTemplate>
<asp:Label ID="IsSoldout" runat="server" Text='<%#Eval("IsSoldout")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SoldoutByUserID" SortExpression="SoldoutByUserID">
<ItemTemplate>
<asp:Label ID="SoldoutByUserID" runat="server" Text='<%#Eval("SoldoutByUserID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="SoldoutDateTime" SortExpression="SoldoutDateTime">
<ItemTemplate>
<asp:Label ID="SoldoutDateTime" runat="server" Text='<%#Eval("SoldoutDateTime")%>'></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>
<asp:TemplateField HeaderText="QUploadDatetime" SortExpression="QUploadDatetime">
<ItemTemplate>
<asp:Label ID="QUploadDatetime" runat="server" Text='<%#Eval("QUploadDatetime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="TPx_Airline" SortExpression="TPx_Airline">
<ItemTemplate>
<%--<asp:Label ID="TPx_Airline" runat="server" Text='<%#Eval("TPx_Airline")%>'></asp:Label>--%>
<img src="<%#Eval("TPx_Airline")%>" title="TPx_Airline" /><br>
<img src="<%#Eval("WowLogo")%>" title="WowLogo" /><br>
<img src="<%#Eval("WowIcon")%>" title="WowIcon" />
</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 />
<asp:Label ID="Label6" runat="server" Text="เงื่อนไขที่ต้องใส่ได้คือ <b>Product_detailID : </b>: "></asp:Label>
<asp:TextBox ID="txtPeriodID" runat="server" MaxLength="100" Width="80px"></asp:TextBox>
<asp:Button ID="BtSearchPeriod" runat="server" Text="ค้นหา" />
&nbsp;
<br />
<b><asp:Label ID="Label3" runat="server" Text="PeriodLog"></asp:Label></b> :
<asp:Label ID="lblResult_PeriodLog" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDBookingPeriodLog" 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="ProductID" SortExpression="ProductID">
<ItemTemplate>
<asp:Label ID="ProductID" runat="server" Text='<%#Eval("ProductID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Product_detailID" SortExpression="Product_detailID">
<ItemTemplate>
<asp:Label ID="Product_detailID" runat="server" Text='<%#Eval("Product_detailID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ModifyBy" SortExpression="ModifyBy">
<ItemTemplate>
<asp:Label ID="ModifyBy" runat="server" Text='<%#Eval("ModifyBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ModifyDateTime" SortExpression="ModifyDateTime">
<ItemTemplate>
<asp:Label ID="ModifyDateTime" runat="server" Text='<%#Eval("ModifyDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ColTotal" SortExpression="ColTotal">
<ItemTemplate>
<asp:Label ID="ColTotal" runat="server" Text='<%#Eval("ColTotal")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="GroupSize" SortExpression="GroupSize">
<ItemTemplate>
<asp:Label ID="GroupSize" runat="server" Text='<%#Eval("GroupSize")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PeriodStatus" SortExpression="PeriodStatus">
<ItemTemplate>
<asp:Label ID="PeriodStatus" runat="server" Text='<%#Eval("PeriodStatus")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_AdultTh_Single" SortExpression="Price_AdultTh_Single">
<ItemTemplate>
<asp:Label ID="Price_AdultTh_Single" runat="server" Text='<%#Eval("Price_AdultTh_Single")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_AdultTh_Share" SortExpression="Price_AdultTh_Share">
<ItemTemplate>
<asp:Label ID="Price_AdultTh_Share" runat="server" Text='<%#Eval("Price_AdultTh_Share")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_ChildTh_Bed" SortExpression="Price_ChildTh_Bed">
<ItemTemplate>
<asp:Label ID="Price_ChildTh_Bed" runat="server" Text='<%#Eval("Price_ChildTh_Bed")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_ChildTh_Nobed" SortExpression="Price_ChildTh_Nobed">
<ItemTemplate>
<asp:Label ID="Price_ChildTh_Nobed" runat="server" Text='<%#Eval("Price_ChildTh_Nobed")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Price_Triple" SortExpression="Price_Triple">
<ItemTemplate>
<asp:Label ID="Price_Triple" runat="server" Text='<%#Eval("Price_Triple")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Margin" SortExpression="Margin">
<ItemTemplate>
<asp:Label ID="Margin" runat="server" Text='<%#Eval("Margin")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Comsell" SortExpression="Comsell">
<ItemTemplate>
<asp:Label ID="Comsell" runat="server" Text='<%#Eval("Comsell")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Deposit" SortExpression="Deposit">
<ItemTemplate>
<asp:Label ID="Deposit" runat="server" Text='<%#Eval("Deposit")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Lastdaypayment" SortExpression="Lastdaypayment">
<ItemTemplate>
<asp:Label ID="Lastdaypayment" runat="server" Text='<%#Eval("Lastdaypayment")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DepositDateTime" SortExpression="DepositDateTime">
<ItemTemplate>
<asp:Label ID="DepositDateTime" runat="server" Text='<%#Eval("DepositDateTime")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DepositDay" SortExpression="DepositDay">
<ItemTemplate>
<asp:Label ID="DepositDay" runat="server" Text='<%#Eval("DepositDay")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="QUploadDatetime" SortExpression="QUploadDatetime">
<ItemTemplate>
<asp:Label ID="QUploadDatetime" runat="server" Text='<%#Eval("QUploadDatetime")%>'></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="Period Status Log"></asp:Label></b> :
<asp:Label ID="lblResult_PeriodStatusLog" runat="server" Text=" 0 items."></asp:Label>
<br />
<asp:GridView ID="GDPeriodStatuslog" 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="ProductID" SortExpression="ProductID">
<ItemTemplate>
<asp:Label ID="ProductID" runat="server" Text='<%#Eval("ProductID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Product_detailID" SortExpression="Product_detailID">
<ItemTemplate>
<asp:Label ID="Product_detailID" runat="server" Text='<%#Eval("Product_detailID")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PeriodStatus" SortExpression="PeriodStatus">
<ItemTemplate>
<asp:Label ID="PeriodStatus" runat="server" Text='<%#Eval("PeriodStatus")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ModifyBy" SortExpression="ModifyBy">
<ItemTemplate>
<asp:Label ID="ModifyBy" runat="server" Text='<%#Eval("ModifyBy")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ModifyDatetime" SortExpression="ModifyDatetime">
<ItemTemplate>
<asp:Label ID="ModifyDatetime" runat="server" Text='<%#Eval("ModifyDatetime")%>'></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="Label8" runat="server"></asp:Label></b>
<br />
<asp:GridView ID="GVProductScrape" runat="server" AllowSorting="False"
AutoGenerateColumns="False" CssClass="GridViewStyle" GridLines="None" Width="100%"
>
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="SupplierCode" SortExpression="SupplierCode">
<ItemTemplate>
<asp:Label ID="SupplierCode" runat="server" Text='<%#Eval("SupplierCode")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductCodeSupplier" SortExpression="ProductCodeSupplier">
<ItemTemplate>
<asp:Label ID="ProductCodeSupplier" runat="server" Text='<%#Eval("ProductCodeSupplier")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ProductNameSupplier" SortExpression="ProductNameSupplier">
<ItemTemplate>
<asp:Label ID="ProductNameSupplier" runat="server" Text='<%#Eval("ProductNameSupplier")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Country" SortExpression="Country">
<ItemTemplate>
<asp:Label ID="Country" runat="server" Text='<%#Eval("Country")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="WordUrl" SortExpression="WordUrl">
<ItemTemplate>
<asp:HyperLink ID="WordUrl" runat="server" NavigateUrl='<%#Eval("WordUrl")%>' Text='<%#Eval("WordUrl")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PdfUrl" SortExpression="PdfUrl">
<ItemTemplate>
<asp:HyperLink ID="PdfUrl" runat="server" NavigateUrl='<%#Eval("PdfUrl")%>' Text='<%#Eval("PdfUrl")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ImageUrl" SortExpression="ImageUrl">
<ItemTemplate>
<asp:HyperLink ID="ImageUrl" runat="server" NavigateUrl='<%#Eval("ImageUrl")%>' Text='<%#Eval("ImageUrl")%>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="CreateDate" SortExpression="CreateDate">
<ItemTemplate>
<asp:Label ID="CreateDate" runat="server" Text='<%#Eval("CreateDate")%>'></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 />
<asp:Label ID="lblError" runat="server" Text=""></asp:Label>
</asp:Content>
Imports System.Data
Partial Class SystemAdmin_ProductDetail
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'ViewState("SortExpression") = "HistoryDateTime"
'ViewState("SortDirection") = "ASC"
' txtPNRCode.Text = getCurrentDate()
' LoadHistoryLog(txtPNRCode.Text)
End If
End Sub
Function getCurrentDate() As String
Dim strDate As String = ""
strDate = Date.Now.ToString("yyyy-MM-dd")
Return strDate
End Function
Protected Sub btSearch_Click(sender As Object, e As EventArgs) Handles btSearch.Click
ActionSearch()
End Sub
Sub ActionSearch()
Dim strProductCode As String = RTrim(LTrim(txtProductCode.Text))
If Len(strProductCode) > 5 Then
If strProductCode <> "" Then LoadHistoryLog(strProductCode)
If strProductCode <> "" Then LoadHistoryLog_PeriodDetail(strProductCode) 'GDActivityLog
If strProductCode <> "" Then LoadHistoryLog_PeriodLog(strProductCode, "") 'GDBookingStatusLog
If strProductCode <> "" Then LoadHistoryLog_PeriodStatusLog(strProductCode, "") 'GDBookingStatusLog
End If
End Sub
Sub LoadHistoryLog_PeriodStatusLog(ByVal strPNRCode As String, ByVal strPeriodID As String) 'GDBookingStatusLog
Try
'GDPeriodStatuslog.DataSource = Nothing
'GDPeriodStatuslog.DataBind()
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_PeriodStatusLog(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
If strPeriodID <> "" Then DtBookingDetail.DefaultView.RowFilter = " Product_detailID=" & strPeriodID
GDPeriodStatuslog.DataSource = DtBookingDetail
GDPeriodStatuslog.DataBind()
lblResult_PeriodStatusLog.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDPeriodStatuslog.DataSource = Nothing
GDPeriodStatuslog.DataBind()
lblResult_PeriodStatusLog.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_PeriodStatusLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_ProductScrape(ByVal strProductNameSupplier As String)
Try
Dim DtProductScrape As New DataTable
DtProductScrape = getProductScrape(strProductNameSupplier)
If DtProductScrape.DefaultView.Count > 0 Then
GVProductScrape.DataSource = DtProductScrape
GVProductScrape.DataBind()
Label8.Text = "Product Scrape"
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_PeriodStatusLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_PeriodLog(ByVal strPNRCode As String, ByVal strPeriodID As String) 'GDBookingStatusLog
Try
'GDBookingPeriodLog.DataSource = Nothing
'GDBookingPeriodLog.DataBind()
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_PeriodLog(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
If strPeriodID <> "" Then DtBookingDetail.DefaultView.RowFilter = " Product_detailID=" & strPeriodID
GDBookingPeriodLog.DataSource = DtBookingDetail
GDBookingPeriodLog.DataBind()
lblResult_PeriodLog.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDBookingPeriodLog.DataSource = Nothing
GDBookingPeriodLog.DataBind()
lblResult_PeriodLog.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_StatusLog", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog_PeriodDetail(ByVal strPNRCode As String) 'GDActivityLog
Try
Dim DtBookingDetail As New DataTable
DtBookingDetail = getBookingDetail_PeriodDetail(strPNRCode)
If DtBookingDetail.DefaultView.Count > 0 Then
GDPeriodDetail.DataSource = DtBookingDetail
GDPeriodDetail.DataBind()
lblResult_PeriodDetail.Text = " " & DtBookingDetail.DefaultView.Count & " items."
Else
GDPeriodDetail.DataSource = Nothing
GDPeriodDetail.DataBind()
lblResult_PeriodDetail.Text = " 0 items."
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog_PeriodDetail", ex.Message.ToString())
End Try
End Sub
Sub LoadHistoryLog(ByVal strProductCode As String) ' format yyyy-MM-dd
Try
Dim DtProductDetail As New DataTable
DtProductDetail = getProductDetail(strProductCode)
'lblHeaderDate.Text = ConvertDateString(strDate)
If DtProductDetail.DefaultView.Count > 0 Then
'DtBookingDetail.DefaultView.Sort = ViewState("SortExpression") & " " & ViewState("SortDirection")
GvHistoryLog.DataSource = DtProductDetail
GvHistoryLog.DataBind()
lblResult.Text = " " & DtProductDetail.DefaultView.Count & " items."
LoadHistoryLog_ProductScrape(DtProductDetail.Rows(0).Item("ProductNameSupplier"))
Else
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
End If
'GVCountry
Dim DtCoutry As New DataTable
DtCoutry = getCountry(strProductCode)
If DtCoutry.DefaultView.Count > 0 Then
GVCountry.DataSource = DtCoutry
GVCountry.DataBind()
Else
GVCountry.DataSource = Nothing
GVCountry.DataBind()
End If
Catch ex As Exception
writeErrorLog("LoadHistoryLog", ex.Message.ToString())
End Try
End Sub
Sub writeErrorLog(ByVal strFunctionName As String, ByVal strError As String)
lblError.Visible = True
lblError.Text = "[" & strFunctionName & "] Err=" & strError
End Sub
Function ConvertDateString(ByVal strDate As String) As String
'strDate => yyyy-mm-dd
'output => dd/mm/yyyy
Dim strDateReturn As String = ""
Dim ArrDate() As String
Try
ArrDate = Split(strDate, "-")
strDateReturn = ArrDate(2) & "/" & ArrDate(1) & "/" & ArrDate(0)
Catch ex As Exception
strDateReturn = strDate
End Try
Return strDateReturn
End Function
Protected Sub GvHistoryLog_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GvHistoryLog.Sorting
'Try
' If ViewState("SortExpression") = e.SortExpression Then ' กรณีที่เป็นฟิลด์เดิม
' If ViewState("SortDirection") = "ASC" Then
' ViewState("SortDirection") = "DESC"
' Else
' ViewState("SortDirection") = "ASC"
' End If
' Else
' ViewState("SortExpression") = e.SortExpression
' ViewState("SortDirection") = "ASC"
' End If
' Dim strDateSearch As String = txtProductCode.Text
' LoadHistoryLog(strDateSearch)
'Catch ex As Exception
' writeErrorLog("GvHistoryLog_Sorting", ex.Message.ToString())
'End Try
End Sub
#Region "get Database MushroomTravel"
Function getSaleMushroom() As DataTable
Dim Dt As New DataTable
Dim ClsMUser As New MushroomTravel.M_User
ClsMUser.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("MushroomTravel")
Try
With ClsMUser
.Where.WhereClauseReset()
.LoadAll()
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsMUser = Nothing
End Try
Return Dt
End Function
#End Region
#Region "get Booking Detail"
Function getProductDetail(ByVal strProductCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsProduct As New Product
Try
With ClsProduct
.Where.WhereClauseReset()
._HistoryLog_ProductDetail(strProductCode)
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsProduct = Nothing
End Try
Return Dt
End Function
Function getProductCodeNewWH(ByVal strProductCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsProduct As New Product
Try
With ClsProduct
.Where.WhereClauseReset()
._HistoryLog_GetProductCodeNewOriginal_WH(strProductCode)
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
ClsProduct = Nothing
End Try
Return Dt
End Function
Function getBookingDetail_PeriodDetail(ByVal strProductCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New Product
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_ProductDetail_Period(strProductCode)
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
Function getCountry(ByVal strProductCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New Product
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_ProductDetail_Country(strProductCode)
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
Function getBookingDetail_PeriodLog(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New Product
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_ProductDetail_PeriodDetailLog(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
Function getBookingDetail_PeriodStatusLog(ByVal strPNRCode As String) As DataTable
Dim Dt As New DataTable
Dim ClsMainBooking As New Product
Try
With ClsMainBooking
.Where.WhereClauseReset()
._HistoryLog_ProductDetail_PeriodStatusLog(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
Function getProductScrape(ByVal strProductnameSupplier As String) As DataTable
Dim Dt As New DataTable
Dim Cls As New Product
Try
With Cls
.Where.WhereClauseReset()
._Proc_LoadHistoryLog_ProductScrape(strProductnameSupplier)
If .DefaultView.Count > 0 Then
Dt = .DefaultView.ToTable
End If
End With
Catch ex As Exception
Dt = Nothing
Finally
Cls = Nothing
End Try
Return Dt
End Function
#End Region
Protected Sub GvHistoryLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvHistoryLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDActivityLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDPeriodDetail.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDBookingStatusLog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDBookingPeriodLog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub GDPeriodStatuslog_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GDPeriodStatuslog.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Text = e.Row.DataItemIndex + 1
End If
End Sub
Protected Sub BtSearchPeriod_Click(sender As Object, e As EventArgs) Handles BtSearchPeriod.Click
Dim strPeriodID As String = RTrim(LTrim(txtPeriodID.Text))
Dim strProductCode As String = RTrim(LTrim(txtProductCode.Text))
If Len(strPeriodID) > 5 Then
If strProductCode <> "" Then LoadHistoryLog_PeriodLog(strProductCode, strPeriodID) 'GDBookingStatusLog
If strProductCode <> "" Then LoadHistoryLog_PeriodStatusLog(strProductCode, strPeriodID) 'GDBookingStatusLog
End If
End Sub
Protected Sub btSearchProductOriginalWH_Click(sender As Object, e As EventArgs) Handles btSearchProductOriginalWH.Click
Dim strProductCodeNew_Sub As String = txtProductCodeNew.Text
Dim strProductCodeNew_WH As String = ""
Try
If strProductCodeNew_Sub <> "" Then
Dim DtProductDetail As New DataTable
DtProductDetail = getProductCodeNewWH(strProductCodeNew_Sub)
If DtProductDetail.DefaultView.Count > 0 Then
strProductCodeNew_WH = DtProductDetail.DefaultView(0)("ProductCodeNew_WH").ToString()
If strProductCodeNew_WH <> "" Then
txtProductCode.Text = strProductCodeNew_WH
ActionSearch()
End If
Else
txtProductCode.Text = ""
GVCountry.DataSource = Nothing
GVCountry.DataBind()
GvHistoryLog.DataSource = Nothing
GvHistoryLog.DataBind()
lblResult.Text = " 0 items."
GDPeriodDetail.DataSource = Nothing
GDPeriodDetail.DataBind()
lblResult_PeriodDetail.Text = " 0 items."
GDBookingPeriodLog.DataSource = Nothing
GDBookingPeriodLog.DataBind()
lblResult_PeriodLog.Text = " 0 items."
GDPeriodStatuslog.DataSource = Nothing
GDPeriodStatuslog.DataBind()
lblResult_PeriodStatusLog.Text = " 0 items."
End If
End If
Catch ex As Exception
writeErrorLog("btSearchProductOriginalWH_Click", ex.Message.ToString())
End Try
End Sub
End Class
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="TestFunction.aspx.vb" Inherits="SystemAdmin_TestFunction" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<style type="text/css">
.auto-style2
{
text-decoration: none;
}
</style>
URL :
<asp:TextBox ID="txtURL" runat="server" Height="58px" TextMode="MultiLine" Width="400px"></asp:TextBox>
&nbsp;<asp:Button ID="BtGetData" runat="server" Text="Get Data" Width="80px" />
&nbsp;<asp:Button ID="BtClear" runat="server" Text="Clear" Width="80px" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Font-Size="Medium" Text="&lt;b&gt;1. Show User All&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showuserall&amp;username=admin&plexpass=4p*plextel" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" Font-Size="Medium" Text="&lt;b&gt;2. Show Sip&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showusersip&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<asp:Label ID="Label3" runat="server" Font-Size="Medium" Text="&lt;b&gt;3. Show dahdi&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showusersip&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<asp:Label ID="Label4" runat="server" Font-Size="Medium" Text="&lt;b&gt;4. Show agent&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showuseragent&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<asp:Label ID="Label5" runat="server" Font-Size="Medium" Text="&lt;b&gt;5. Show iax&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showuseriax&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<asp:Label ID="Label6" runat="server" Font-Size="Medium" Text="&lt;b&gt;6. Show Queue&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showqueue&amp;username=admin&plexpass=4p*plextel" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Label ID="Label8" runat="server" Font-Size="Medium" Text="&lt;b&gt;7. Show music on hold&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=showmoh&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<asp:Label ID="Label12" runat="server" Font-Size="Medium" ForeColor="Black" Text="&lt;b&gt;8. โทรออก&lt;/b&gt; : http://192.168.1.3/PlexMI/?action=dialcall&amp;value=%3Csource%3E,%3Cdestination%3E&amp;username=admin&plexpass=4p*plextel&amp;username=admin&plexpass=4p*plextel"></asp:Label>
<br />
<b>9. Show Call Record : ใช้ได้ 2 วิธี</b> <br />
&nbsp;&nbsp;&nbsp; 9.1 อ้างอิงจาก UniqueID ให้ใส่ค่าเพียงค่าเดียว <br />
&nbsp;&nbsp;&nbsp;
<a href="http://192.168.1.3/PlexMI/?action=showcallrecord&amp;value=1371096856.1&amp;username=admin&plexpass=4p*plextel">http://192.168.1.3/PlexMI/?action=showcallrecord&value=1371096856.1&username=PlexMItest&plexpass=PlexMItest</a>
<br />
&nbsp;&nbsp;&nbsp; 9.2 <a href="http://192.168.1.3/PlexMI/?action=showcallrecord&amp;value=2013-06-12,2013-06-13,6000,6001&amp;username=admin&plexpass=4p*plextel (วันที่เริ่มต้น,วันที่สิ้นสุด,เบอร์ต้นทาง,เบอร์ปลายทาง) ;วันที่ 2013-12-31 (ปี-เดือน-วัน">http://192.168.1.3/PlexMI/?action=showcallrecord&value=2013-06-12,2013-06-13,6000,6001&username=PlexMItest&plexpass=PlexMItest</a><br />
&nbsp;&nbsp;&nbsp; <a href="http://192.168.1.3/PlexMI/?action=showcallrecord&amp;value=2013-06-12,2013-06-13,6000,6001&amp;username=admin&plexpass=4p*plextel (วันที่เริ่มต้น,วันที่สิ้นสุด,เบอร์ต้นทาง,เบอร์ปลายทาง) ;วันที่ 2013-12-31 (ปี-เดือน-วัน" class="auto-style2"></a>(วันที่เริ่มต้น,วันที่สิ้นสุด,เบอร์ต้นทาง,เบอร์ปลายทาง) ;วันที่ 2013-12-31 (ปี-เดือน-วัน)
<br />
<b>10. Show Call Detail Record : ใช้ได้ 2</b> วิธี<br />
&nbsp;&nbsp;&nbsp; 10.1 อ้างอิงจาก UniqueID ให้ใส่ค่าเพียงค่าเดียว<br />
&nbsp;&nbsp;&nbsp;
<a href="http://192.168.1.3/PlexMI/?action=cdr&amp;value=1371094226.0&amp;username=admin&plexpass=4p*plextel">http://192.168.1.3/PlexMI/?action=cdr&value=1371094226.0&username=PlexMItest&plexpass=PlexMItest</a>
<br />
&nbsp;&nbsp;&nbsp; 10.2 <a href="http://192.168.1.3//PlexMI/?action=cdr&amp;value=2013-06-12,2013-06-13,6000,6001,Internal&amp;username=admin&plexpass=4p*plextel">http://192.168.1.3//PlexMI/?action=cdr&value=2013-06-12,2013-06-13,6000,6001,Internal&username=PlexMItest&plexpass=PlexMItest</a>
<br />
&nbsp;&nbsp;&nbsp;
(วันที่เริ่มต้น,วันที่สิ้นสุด,เบอร์ต้นทาง,เบอร์ปลายทาง,ค่าdirectionInternal/Outgoing/Incoming)
<br />
<b>11. การฟังเสียง </b><br />
<a href="http://192.168.1.3/listen_sound.php?fileok=callrecord/USR_IN-from-23022-to-23026@2013-02-20-13:40:03.gsm">http://192.168.1.3/listen_sound.php?fileok=callrecord/USR_IN-from-23022-to-23026@2013-02-20-13:40:03.gsm</a>
<br />
<a href="http://192.168.1.3/listen_sound.php?fileok=callrecord/USR_IN-from-23022-to-23026@2013-02-20-13:40:03.gsm">http://192.168.1.3/listen_sound.php?fileok=callrecord/USR_IN-from-23022-to-23026@2013-02-20-13:40:03.gsm</a>
<br />
<br />
<asp:Label ID="lblInformation" runat="server"></asp:Label>
<asp:GridView ID="GvData" runat="server">
</asp:GridView>
<asp:Label ID="lblError" ForeColor="#0000cc" Visible="false" runat="server" Text=""></asp:Label>
<br />
<br /> <br />
<br />
<br />
<br />
</div>
</asp:Content>
Imports MyGeneration.dOOdads
Imports System.Data
Imports System.Configuration
'----------------------------------------------------------
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Net
Imports Newtonsoft.Json
Imports System.Web.Script.Serialization
Imports System.IO
Partial Class SystemAdmin_TestFunction
Inherits System.Web.UI.Page
Function getDataFromPlexTel(ByVal strURLGet As String) As DataTable
Dim DTable As New DataTable
Try
Dim objSURL As New StringBuilder
Dim objURL As Uri
Dim strURL As String
strURL = strURLGet
objSURL.Append(strURL)
objURL = New Uri(objSURL.ToString())
Dim request As HttpWebRequest = HttpWebRequest.Create(objURL)
Dim response As HttpWebResponse = request.GetResponse
Dim reader As New StreamReader(response.GetResponseStream())
If Not IsNothing(reader) Then
Dim strResponse = reader.ReadToEnd
DTable = JsonConvert.DeserializeObject(Of DataTable)(strResponse)
End If
reader.Close()
response.Close()
Catch ex As Exception
DTable = New DataTable
WriteErrorLog("getDataFromPlexTel", ex.Message.ToString(), strURLGet)
End Try
Return DTable
End Function
Protected Sub BtGetData_Click(sender As Object, e As EventArgs) Handles BtGetData.Click
Dim Dtable As New DataTable
Dim strURL As String = txtURL.Text
Try
Dtable = getDataFromPlexTel(Trim(strURL))
GvData.DataSource = Nothing
GvData.DataBind()
If Dtable.Rows.Count > 0 Then
GvData.DataSource = Dtable
GvData.DataBind()
End If
lblInformation.Text = "Result Data : " & Dtable.Rows.Count & " item."
Catch ex As Exception
WriteErrorLog("BtGetData_Click", ex.Message.ToString(), strURL)
End Try
End Sub
Sub WriteErrorLog(ByVal strFunctionName As String, ByVal strErrorName As String, ByVal strDetail As String)
lblError.Visible = True
lblError.Text = "<br>[<b>" & strFunctionName & "</b>] <b>Err</b>=" & strErrorName & "<br><b>Detail</b>:" & strDetail
End Sub
Protected Sub BtClear_Click(sender As Object, e As EventArgs) Handles BtClear.Click
lblInformation.Text = ""
txtURL.Text = ""
GvData.DataSource = Nothing
GvData.DataBind()
lblError.Visible = False
End Sub
End Class
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestFunction.aspx.vb" Inherits="TestFunction" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
URL :
<asp:TextBox ID="txtURL" runat="server" Height="58px" TextMode="MultiLine" Width="400px"></asp:TextBox>
&nbsp;<asp:Button ID="BtGetData" runat="server" Text="Get Data" Width="80px" />
&nbsp;<asp:Button ID="BtClear" runat="server" Text="Clear" Width="80px" />
<br />
<br />
<br />
<asp:Label ID="lblInformation" runat="server"></asp:Label>
<asp:GridView ID="GvData" runat="server">
</asp:GridView>
<asp:Label ID="lblError" ForeColor="#0000cc" Visible="false" runat="server" Text=""></asp:Label>
<br />
<br /> <br />
<br />
<br />
<br />
</div>
</form>
</body>
</html>
Imports MyGeneration.dOOdads
Imports System.Data
Imports System.Configuration
'----------------------------------------------------------
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Net
Imports Newtonsoft.Json
Imports System.Web.Script.Serialization
Imports System.IO
Partial Class TestFunction
Inherits System.Web.UI.Page
Function getDataFromPlexTel(ByVal strURLGet As String) As DataTable
Dim DTable As New DataTable
Try
Dim objSURL As New StringBuilder
Dim objURL As Uri
Dim strURL As String
strURL = strURLGet
objSURL.Append(strURL)
objURL = New Uri(objSURL.ToString())
Dim request As HttpWebRequest = HttpWebRequest.Create(objURL)
Dim response As HttpWebResponse = request.GetResponse
Dim reader As New StreamReader(response.GetResponseStream())
If Not IsNothing(reader) Then
Dim strResponse = reader.ReadToEnd
DTable = JsonConvert.DeserializeObject(Of DataTable)(strResponse)
End If
reader.Close()
response.Close()
Catch ex As Exception
DTable = New DataTable
WriteErrorLog("getDataFromPlexTel", ex.Message.ToString(), strURLGet)
End Try
Return DTable
End Function
Protected Sub BtGetData_Click(sender As Object, e As EventArgs) Handles BtGetData.Click
Dim Dtable As New DataTable
Dim strURL As String = txtURL.Text
Try
Dtable = getDataFromPlexTel(Trim(strURL))
GvData.DataSource = Nothing
GvData.DataBind()
If Dtable.Rows.Count > 0 Then
GvData.DataSource = Dtable
GvData.DataBind()
End If
lblInformation.Text = "Result Data : " & Dtable.Rows.Count & " item."
Catch ex As Exception
WriteErrorLog("BtGetData_Click", ex.Message.ToString(), strURL)
End Try
End Sub
Sub WriteErrorLog(ByVal strFunctionName As String, ByVal strErrorName As String, ByVal strDetail As String)
lblError.Visible = True
lblError.Text = "<br>[<b>" & strFunctionName & "</b>] <b>Err</b>=" & strErrorName & "<br><b>Detail</b>:" & strDetail
End Sub
Protected Sub BtClear_Click(sender As Object, e As EventArgs) Handles BtClear.Click
lblInformation.Text = ""
txtURL.Text = ""
GvData.DataSource = Nothing
GvData.DataBind()
lblError.Visible = False
End Sub
End Class
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="dbConnection" value="server=a.tourprox.com;uid=historylog;password=WXpQjpmCtHs1H844SKcN;database=TourProX_LastUpdate;Max Pool size=400;Connect Timeout=120;Connection Lifetime=1200;" />
<!--<add key="dbConnection" value="server=a.tourprox.com;uid=historylog;password=WXpQjpmCtHs1H844SKcN;database=TourProX_ALL;Max Pool size=400;Connect Timeout=120;Connection Lifetime=1200;"/>-->
<add key="UserName" value="admin" />
<add key="Password" value="admin1234" />
<add key="SystemAdminUserName" value="systemadmin" />
<add key="SystemAdminPassword" value="areyouready" />
</appSettings>
<system.web>
<sessionState mode="InProc" cookieless="false" timeout="20" />
<compilation debug="true" targetFramework="4.0">
</compilation>
<authentication mode="Windows" />
<globalization fileEncoding="windows-874" requestEncoding="utf-8" responseEncoding="utf-8" uiCulture="th-TH" culture="en-US" />
</system.web>
</configuration>
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