01.
Public
Shared
Function
GetPeriodrun(
ByVal
strRevision
As
String
)
As
DataTable
02.
Dim
dt
As
New
DataTable
03.
Using db
As
New
Oracle(BaseModel.GetConnectionString(
"AVO"
))
04.
db.OpenConnection()
05.
Dim
strSql
As
New
System.Text.StringBuilder
06.
strSql.AppendLine(
" SELECT SUBSTR(MAX(TPC_REVISION),1,3)||SUBSTR(MAX(TPC_REVISION),4,2)+1||'XX' "
)
07.
strSql.AppendLine(
" FROM TAXC_PERIOD_CTRL T"
)
08.
strSql.AppendLine(
" WHERE TPC_REVISION ='"
& strRevision &
"'"
)
09.
strSql.AppendLine(
" GROUP BY TPC_REVISION"
)
10.
db.CreateCommand(strSql.ToString, CommandType.Text)
11.
dt = db.ExecuteReader()
12.
db.CloseConnection()
13.
End
Using
14.
Return
dt
15.
End
Function