01.
02.
03.
04.
Private
Function
CheckYear(
ByRef
txt
As
TextBox)
As
Boolean
05.
Dim
succ
As
Boolean
=
False
06.
Dim
lcEra_Type
As
String
= PubConstant.ERA_TYPE.Trim()
07.
Dim
lcCur_Year
As
String
=PubConstant.CUR_YEAR.Trim()
08.
09.
Dim
lc1ST_PERIOD
As
String
= GetBasicDataTab(
"x_PERIOD"
).Substring(0, 2)
10.
Dim
val
As
Integer
11.
If
Integer
.TryParse(txt.Text, val)
Then
12.
If
val < 100
Then
13.
val +=
If
(
String
.Equals(lcEra_Type,
"TH"
, StringComparison.CurrentCultureIgnoreCase), 2500, 2000)
14.
End
If
15.
txt.Text = val.ToString(
"D4"
)
16.
succ =
True
17.
Else
18.
txt.Text =
String
.Empty
19.
End
If
20.
21.
If
1 <> 2
Then
22.
23.
End
If
24.
Return
succ
25.
End
Function