103年 銀行招考、金融雇員 不分職等 中央存保-程式設計人員 程式設計 試卷

pdf
305.01 KB
2 頁
youbin
侵權投訴
加載中. ..
PDF

 103








F9602
1



(
PowerBuilder
ASP.Net(
C#)



)



________________
 
!
" #
$
%
&
'(
)
*
+ ,
-#
.
/
021
3
465
7
8 9
:
" ;
<=
>
?@
A
=
B
/
100
01
?@
A
=
C
D
E
F
G H
I J
KL
I M
N
O
P
Q
P
Q
P
Q
P
Q
RS
T U
V
W
X Y
U
Z
RS
T U
V
W
X Y
U
Z
RS
T U
V
W
X Y
U
Z
RS
T U
V
W
X Y
U
Z[
[
[
[
' ]
^
_
5
`a
b
c
d e
f g
hi
.
j
01
'k
M
N
c
l
m
J
n
o
p
>
qr
s
t
J
1
3 u
vw
x y
z{
| }
~
x y
z{
| }
~
x y
z{
| }
~
x y
z{
| }
~
(
#
qr
)
#
)
M
vw
#
>
L
/
¡
M
9
J
¢
D£
¤
¥ ¦
o
§
¨
©
¢
D
f
g
h
j
10
0
g
L
/
ª«
(
)
* ¬
®
g
¯
vw
°
±²
³
´ 1
µ
·¸
S
¹ º
µ
·¸
S
¹ º
µ
·¸
S
¹ º
µ
·¸
S
¹ º
[
[
[
[
»
¹ º
¼ ½
¾ ¿
ÀÁ
»
¹ º
¼ ½
¾ ¿
ÀÁ
»
¹ º
¼ ½
¾ ¿
ÀÁ
»
¹ º
¼ ½
¾ ¿
ÀÁ
6Â
Â
Â
Â



PowerBuilder

PowerScript

(Bubble Sort)

integer ans[] ans={10, 5, 11, 9 ,2 ,1}

13



 ! "
PowerBuilder

PowerScript
#  $ % &' ()
* &' () +$ ,- . / 0 1 $ % $ ,- . 2 3
&' () 4 5(6 7 8 9 :
A
;
10, B
;
11
< = >
&' () $ ,? " 34 5(6 @ A B
+
4 5(6 CA B
*9+
D EA B (
*8+
D FA B (
*7+…
<=>GHIJK
10
L M . " N O &' ) !
* P Q - . / 0 ! R ST U VT
13

Integer x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12
String ID_NO
boolean ans
x11 = POS(space(9)+'ABCDEFGHIJKLMNOPQRSTUVWXY', MID(ID_NO,1,1))
x1 = Integer(x11/10) * 1
x2 = mod(x11, 10) * 9
x3 = Integer(mid(ID_NO,2,1)) * 8
x4 = Integer(mid(ID_NO,3,1)) * 7
x5 = Integer(mid(ID_NO,4,1)) * 6
x6 = Integer(mid(ID_NO,5,1)) * 5
x7 = Integer(mid(ID_NO,6,1)) * 4
x8 = Integer(mid(ID_NO,7,1)) * 3
x9 = Integer(mid(ID_NO,8,1)) * 2
x10= Integer(mid(ID_NO,9,1)) * 1
x12 =( (1) )
IF( (2) ) THEN x12 = 0
ELSE IF ( (3) )THEN
ans = TRUE
ELSE
ans = FALSE
END IF
return ans


W 
PowerScript
 ! X Y
ans
Z +B [ * " ]
12

Integer ans[]
Integer r1, r2, temp, i
r1 = 0
r2 = 1
temp = 0
i = 0
DO WHILE i <= 10
ans[i] = r1
temp = r1 + r2
r1 = r2
r2= temp
i = i + 1
LOOP
return ans[]

 
^ _ W `3
aEbW c
PowerBuilder
G d e f g h ijk l ]m jne o p ]
4

aFbW c
PowerBuilder
+q rns t u vg wx 9 y +z B W {| vg ]
8
!
!!
!
^ _ W `3
aEbc
ASP.NET
nr}~n+  r
DetailsView

 C+ J " ]
4

aFb Q `aEbc
ASP.NET
n
GridView
{r}~n+
 C+ J " ]
4

aVbEC
C#
+ + {
6
C
1~48
+
B ( ¡ ¢ c£ ¤ n+
Label1.Text
¥
¥
Label6.Text
¦§ ¨ © ªCw
« ¬ ® B ° ± +W `²
5

"
""
"
^ _ W `3
aEb
ASP.NET
n
cookies
r ´ µ +c ¸ ¹ º r· E
C¼ ½ ¾ ¿+¤ À q r Á i  # ô +Ä +
{
C#
Ái
cookies
+Z Å ÆÇR Sn+ÈÉ
3

if(Request.Cookies["userName"] != null)
Label1.Text = Server.HtmlEncode( (1) );
aFb
ASP.NET
n+Ê Á
(Caching)
J {J Ë D Í +Τ À Ï ió Ð
Ñ Ò Ó nÔ ÕcY Ö r· X × Ì Ø x +Í  Ê Ù i
Ú µ £ ¤ Û Ü ¸ ÎÛ Ü ¸ Þ  {+Ê Á
Ê Á nà iÆÇR SnÉ
4

//--
á â
:
ÇÐ
Cache
n
(2) ("dataset", dataset, null,
System.Web.Caching.Cache.NoAbsoluteExpiration, new TimeSpan(0, 0, 60),
System.Web.Caching.CacheItemPriority.Default, null);
//--
á â
:

Cache
i
DataSet ds = new DataSet();
ds = (DataSet) (3) ;
aVbc
ASP.NET
n« ¬ Ï Çã ) ßä ! å ,' +æ ç +
{r r· £ ¤ +¤ À
TextBox1.Text
êßé
TextBox2.Text
ê
FC5 Çëìnà Ç Ï Ç+ã ) ßä ! í Õnà Á #
Ï Ç+{ï ð æ + r· ã ) ßä ! 2 H w{ Ï iéã ) Î{ä ! e
ñòê2 H { ó 8 Ð é
Session_Login_end.aspx
êC£ ¤ / 0 F
CR S
6
ª
SqlConnection Conn = new
SqlConnection(WebConfigurationManager.ConnectionStrings["testConnection
String"].ConnectionString);
Conn.Open();
SqlDataReader dr = null;
SqlCommand cmd = new SqlCommand("select name, password
from db_user where name = " + TextBox1.Text + " and password = " +
TextBox2.Text, Conn);
dr = cmd.ExecuteReader();
if ( (4) )
{
Response.Write("
ã ) Î{ä ! e ñò
");
cmd.Cancel();
dr.Close();
Conn.Close();
Conn.Dispose();
Response.End(); }
else
ª ª
{
ª ª
Session["Login"] = "OK";
ª ª
Session["u_name"] = dr["name"].ToString();
ª ª
Session["u_passwd"] = dr["password"].ToString();
ª ª
cmd.Cancel();
ª ª
dr.Close();
ª ª
Conn.Close();
ª ª
Conn.Dispose();
ª ª
(5) ("Session_Login_end.aspx");
}
#
##
#
¤ n2 H e 5(Ï Çëì {é
TextBox1
ê¥é
TextBox2
ê¥é
TextBox3
êôr
ASP.Net(
r
C#)
^ _ W `3
aEb2 H é
TextBox1.Text
êßé
TextBox3.Text
êFC5(ëì³ +{FCB (
2õFCB(ØöíGHóÐ
result
zBn
(result
zB"LBzB
)
È
É
(Statement)
" ] ¨ 3
TextBox.Text
5ìnó +{ b
4
aFb2 H é
TextBox2.Text
ên# Ï Ç+{é
+
êÎé
-
êø ) ù ú é
TextBox2.Text
ê
+Z Å " é
+
êé
TextBox1.Text
êßé
TextBox3.Text
êFC5(ëìnÃ
³ +B (Ø ö î . Ø Ú í G H ó Ð
result
z B nijÈÉ
(Statement)
4

aVbû ü é
TextBox1.Text
êßé
TextBox3.Text
ê³ +B [ nÕé
TextBox1.Text
ê
+[ ý é
TextBox3.Text
ê+[ r
for
þECé
TextBox1.Text
ê
+[ EöÐé
TextBox3.Text
ê+[ aï³+
result
z B nb
4

$
$$
$
c
ASP.NET
n+
Web
e × C^ _ W `3
aEb| EC{r}c£ ¤ Q d EC]
1

aFb| EC{r}c£ ¤ Q ¡ ¢ +5(]
1

aVb| EC{r}c£ ¤ Q ¡ ¢ ]
2

avb| EC{r}c£ ¤ Q +]
2

ab2 H ¬ ¤ ni`+,`E ¯ r| Eg ]
2

ab ¤ n
CheckBoxList
{r}" r+
! {r}$ % < n× C+| ECe K ÆÇn+
FCR S
4

for (int i=0; i<(CheckBoxList. (1) .Count); i++){
ª ª
if(CheckBoxList. (2) .Selected)
ª ª
}
收藏 ⬇️ 下載