Chuan Viet Code Va Thiet Ke Giao Dien Trong C 2129

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 13

CHUN VIT CODE V THIT K GIAO DIN TRONG C# (Bn tm tt) I. QUY NH T TN - Pascal - Camel - Uppercase I.1. I.".

Tn b !n - Ki Camel Tn #$n% &' - !" #$n% Uppercase - &'c( n)i %i*a c+c t, I.(. Tn ) *+ En+, - -.n ki Pascal - K(/n% ti0n1 (2 t) I.-. T#., &' - -.n kim Camel I./. I.4. I.9. Tn 0#+12 03n# - -.n ki Pascal Tn 5#67n% 0#82 - -.n ki Pascal :; ) <n - Ki Pascal - -(34n% c (2 t)5 67ent8an#ler I.=. Tn >?5 - -.n ki Pascal - K(/n% s" #$n% %'c( c(9n BackColor backColor BACKCOLOR

I.@.

G .A B <n - -.n ki Pascal - Bt :; b<n% ti0n t) =>?

I.1C. K#Dn% % .n 0n - C@ p(+p5 A-.n c/n% tBCDA-.n C/n% n%(ECADFGc tr3n%CAD-(iHt kHC IJ #$5 !K&ILDMebDUtilitB !K&ILDMebDNo# leBase I.11. Tn 0 En 0' 2F. 2G2 H E+ )# *n

CAn0IA> 0J5K Panel C(eck boO Combo boO1 #rop-#oPn list boO Comman# b tton Common #ialo% Control ( se# Pit(in proce# res P(en t(e speciRic tBpe is nknoPn) Kata Kata-bo n# combo boO Kata-bo n# %ri# Kata-bo n# list boO Repeater Kate -ime Picker Qorm Qrame Kata&ri#IieP &ri#IieP KataList pnl c(k cbo btn #l% ctr #at cbo %r# lst rpt

LIKM N

EN.,5>K pnl&ro p c(kRea#OnlB cbo6n%lis( btn6Oit #l%QileOpen ctrC rrent #atBiblio cboLan% a%e %r#S erBRes lt lstTob-Bpe #rpLocation #tpP blis(e# Rrm6ntrB RraLan% a%e #%7Prices %r#Pro# ct #tlOr#ers

#tp Rrm Rra #%7 %r# #tl

CAn0IA> 0J5K 8oriUontal scroll bar >ma%e >ma%eList >ma%eB tton 8BperLink LinkB tton Label List boO ListIieP Nen Option b tton Pict re boO Pict re clip Pro%ressBar Ric(-eOtBoO !li#er !pin !tat sBar -eOt BoO -imer -oolbar -reeIieP UpKoPn Iertical scroll bar !VlKata!o rce LinVKata!o rce

LIKM N (sb im% ils ibt (pl lbt lbl lst l7P mn opt pic clp pr% rtR sl# spn sta tOt tmr tlb tre p# 7sb sVl linV

EN.,5>K (sbIol me im%>con ilsAll>cons ibtLeOt (pl8ome lbtClick lbl8elpNessa%e lstPolicBCo#es l7P8ea#in%s mn QileOpen opt&en#er picI&A clp-oolbar pr%Loa#Qile rtRReport sl#!cale spnPa%es staKate-ime tOtLastLame tmrAlarm tlbActions treOr%aniUation p#Kirection 7sbRate sVlAcco nts linVCate%ories

II. THIT K GIAO DIN II.1. T# !0 )! MAI,

-(iHt l2p Option LaBo t !ettin%s cWa Qorm n(3 sa 5

S B :Xn( kJc( t(3Yc Qorm L /n c) %n% :m bo tZ lE [O\5 Qorm r]n% [ t(^ cao \ : :m bo c9n O_n% 7Yi m`n (^n(D S B :Xn( kJc( t(3Yc Control o C(i0 cao5 s" #$n% c(i0 cao mGc :Xn( san cWa ControlD -r34n% (bp :Gc biEt5 -eOtBoO m lti-lines5 :m bo k(/n% bX c(e c p(;n cWa #dn% B tton c ima%e5 :m bo (in t(X 7,a :W ima%e ceOce piOel o F] r]n%5 tfB :] r]n% cWa teOt Fm bo n% B.n tc c+c -eOBoO1 Combo tr.n cfn% m]t Qorm c :] r]n% t()n% n(gtD Fm bo n% B.n tc c+c B tton tr.n tgt c c+c Qorm c :] r]n% t()n% n(gt1 teOt tr.n B tton k(/n% n.n 73bt V + h t,D LH teOt tr.n B tton %im h t, trj O )n%5 bt b ]c s" #$n% :] r]n% mGc :Xn( (kl)D o F)i 7Yi n(*n% tr34n% c :] r]n% c) :Xn( (oGc Jt k(i t(aB :mi (7J #$ n(3 tr34n% c ki #* liE l` Kate t(^ :] r]n% l` c) :Xn( l` cn ko tp)1 t 9n t(W t(eo V B :Xn( sa 5

F] r]n% control :3bc bin#in% 7Yi tr34n% n`B c(q :3bc p(rp r]n% :W : (iEn t(X (Ht t(/n% tin tron% :D

K(/n% :3bc : :] r]n% control 73bt V + :] r]n% cWa tr34n%D

o L3 o5 Label :Gt A to!iUesQAL!61 -eOtBoO :Gt A to!iUes-RU6 S B :Xn( k(on% c+c( %i*a c+c Control o C+c Control c+c( mrp Qorm nc / %ri# (c [ p(Ja)D o -eOtBoO1 ComboBoO c+c( Label #`i n(gt nc / %ri# o C+c Control c+c( n(a nc / %ri# c c(i0 #tc 7` n%an%D

Ring trng hp s dng GroupBox c caption th cc Control bn trong GroupBox cch mp trn c GroupBox !" # grid$ GroupBox %h#ng c& c ption %ho'ng cch ()n l* + # grid$

KiEn m'o Control o Qont u Color5 s" #$n% t(iHt l2p mGc :Xn(D C(q t(aB :mi k(i B. c; t(iHt kH c(q rvD o 8ot track5 t(iHt l2p 8ot track c(o B tton1 Combo 7` KropKoPnD o Cwn l0 -eOt tr.n Control5 C(i0 n%an% (8Ali%n)5 C(* cwn tr+i !) cwn p(i Ri.n% 7Yi B tton t(^ l /n cwn %i*aD C(i0 #tc (IAli%n)5 cwn %i*a (Ni##le) Kn% Control o Label5 #n% tr+i o -eOtboO1 Combo5 #n% :0 (ai b.n -ab Or#er5 o P(i t(iHt l2p -ab Or#er tr.n mti %iao #iEn (Qorm1 Control1 x) t(eo n% B.n tc5 t, tr+i san% p(i1 t, tr.n O )n% #3YiD o y. c; bt b ]c t(iHt l2p -abOr#er t(eo :@n% t(_ tp c(o mti Control tr.n Qorm1 k c Control k(/n% Roc s 7`o :3bc n(3 Label1 &ro pBoO1 (aB Control in7isibleD L3 o t 9n t(W t BEt :)i V B :Xn( n`B 7^ n p($c 7$ n(i0 m$c :Jc( V an trtn% n(3 t'o s(ortc t keB1 7ali# reV ire# #ata1 x Anc(or u Kock5 p(i t(iHt l2p Anc(or 7` Kock c(o Control tr.n c+c Qorm1 Container k(/n% c) :Xn( kJc( t(3Yc (!iUable)D IYi t(/n% tin B. c; n%34i #fn% k(/n% #3bc bz tr)n% m` bt b ]c n(2p (AlloPL ll s QAL!6) t(^ Label c(o t(/n% tin : p(i s" #$n% ko (iE =({)? j c )i 7` t(iHt l2p s(ortc t keBD

II.". Q+J HOn# )# 0PA QK&&.%KRAN S C.50 AnT s" #$n% ,pplic tion$-roduct. m/ S I2AnT QK&&.%KRANI2An.EN2>.,.0 AnT #fn% c(o c+c tr34n% (bp sa o Cn( b+o l|i o Cn( b+o Oa #* liE o Cn( b+o n(2p t(iH 1 n(2p sai #* liE QK&&.%KRANI2An.InMAI,.0 AnT #fn% c(o c+c t(/n% b+o )#Dn% c tJn( c(gt cn( b+o1 7J #$ KHt V >mport1 -(/n% tin 70 C!KL1 x

S N1 B+n% QK&&.%KT k(/n% :3bc p(rp 7iHt trpc tiHp n]i # n% messa%e m` p(i #fn% Reso rce (s" s$n% (`m !trin%DQormat : tr B0n t(am s) c(o Reso rce nH c;n)D II.(. Q+J 0U2 V !0 ,D 0W X2A,,Kn0Y 2#A 2ABK :Z B[n% 0 !n% V <0 2\ B]+ XUn 2ABKY H* V !0 2A,,Kn0. CA,,Kn0 2#A QAB+>K^ C>.&& N|i No# le1 Class c;n c m/ t n%n 70 m$c :Jc( cWa No# le (aB Class :D L]i # n% %im5 N$c :Jc(5 No# le (aB Class t(pc (iEn n(*n% c/n% 7iEc %^D L%34i l2p5 L%34i t'o No# le (aB Class L(*n% biHn}(`m V an trtn% (k(/n% bt b ]c)5 LiEt k. t.n c+c biHn 7` (`m V an trtn% tron% No# le}Class CA,,Kn0 2#A QK0#AB V_ EVKn0 -gt c c+c Net(o# 7` 67ent p(i c commentD Comment c(o Net(o#}67ent %im (ai p(;n5 o P(;n c (%h#ng b0t bu1c)5 m/ t m$c :Jc( 7` #i~n %ii n%n %tn o n%(a c+c t(am s) :; 7`o1 :; raD L3 o5 m/ t Net(o# : l`m %^ (M(at)1 k(/n% m/ t Net(o# : t(pc (iEn t(H n`o (8oP)D -, IC hnnl trj :i1 NicrosoRt c n% cgp san m]t macro #`n( c(o 7iEc 7iHt comment m$c :Jc(D !" #$n% n(3 sa 5 %v li.n tiHp \ #g n(+B :n () tr.n :; m|i Net(o#D L2p tr^n( 7i.n c t( k(/n% c;n 7iHt p(;n m/ t m$c :Jc( n`B 7Yi c+c Net(o#}67ent :n %in1 k(/n% p(_c t'pD o P(;n h (b0t bu1c)5 %(i t(/n% tin 70 (istorB t'o 7` s"a Net(o#}67ent : (n%34i t'o}n%`B t'o1 n%34i s"a}n%`B s"a)D -(/n% tin n`B bt b ]c p(i c 7Yi mti Net(o#}67entD - N comment c(o Net(o#}67ent H7n % Wn5 }} Create# bB (n%34i t'o) (n%`B}t(+n%}nwm t'o)5 #i~n %ii n%n %tn m$c :Jc( }} No#iRie# bB (n%34i s"a c) (n%`B}t(+n%}nwm s"a c)5 #i~n %ii 7iEc s"a c }} No#iRie# bB (n%34i s"a h) (n%`B}t(+n%}nwm s"a h)5 #i~n %ii 7iEc s"a h }}x

}} No#iRie# bB (n%34i s"a n) (n%`B}t(+n%}nwm s"a n)5 #i~n %ii 7iEc s"a n

IJ #$ }} Create# bB l((oa - hn}nh}hnn5 (`m lgB k(on% t(4i %ian l` n%`B :; 7` n%`B c )i cWa t(+n% tr3Yc }} No#iRie# bB n7kie - hl}nh}hnn5 s"a l|i %^ : }} No#iRie# bB nV(oan% - hk}nh}\nn5 bm s n% %^ : pri7ate 7oi# &etKateLastNont((RromKate #atetime1 toKate #atetime1 c rrentNont( int1 c rrentyear int) iR (c rrentNont( ss c) RromKate s Kate!erial(c rrentyear - c1 ch1 c) toKate s Kate!erial(c rrentyear - c1 ch1 KaBs>nNont((c rrentyear - c1 ch)) else RromKate s Kate!erial(c rrentyear1 c rrentNont( - c1 c) toKate s Kate!erial(c rrentyear1 c rrentNont( - c1 KaBs>nNont((c rrentyear1 c rrentNont( - c)) xxxxxxxxxxxD - N comment c(o Net(o#}67ent 5#82 0P55 }}} s mmarB }}} Ki~n %ii m$c :Jc(

}}}}s mmarB }}}param names-(am s) cKi~n %ii c(o -(am s) c}param }}}param names-(am s) hKi~n %ii c(o -(am s) h}param }}} x }}} param names-(am s) nKi~n %ii c(o -(am s) n}param }}} remarksL(2n Ort (nH c)}remarks }}} Create# bB (n%34i t'o) (n%`B}t(+n%}nwm t'o) }}} No#iRie# bB (n%34i s"a c) (n%`B}t(+n%}nwm s"a c)5 #i~n %ii 7iEc s"a c }}} No#iRie# bB (n%34i s"a h) (n%`B}t(+n%}nwm s"a h)5 #i~n %ii 7iEc s"a h }}} x }}} No#iRie# bB (n%34i s"a n) (n%`B}t(+n%}nwm s"a n)5 #i~n %ii 7iEc s"a n

IJ #$5 }}} s mmarB }}} 8`m lgB k(on% t(4i %ian l` n%`B :; 7` n%`B c )i cWa t(+n% tr3YcD }}} }s mmarB }}} param namesRromKateL%`B :; t(+n% tr3Yc}param }}} param namestoKateL%`B c )i t(+n% tr3Yc}param }}} param namesc rrentNont(-(+n% (iEn t'i}param }}} param namesc rrentyearLwm (iEn t'i}param }}} remarks}remarks }}} Create# bB l((oa - hn}nh}hnn }}} No#iRie# bB n7kie - hl}nh}hnn5 s"a l|i %^ : }}} No#iRie# bB nV(oan% - hk}nh}\nn5 bm s n% %^ : pri7ate 7oi# &etKateLastNont((RromKate #atetime1 toKate #atetime1 c rrentNont( int1

c rrentyear int) iR (c rrentNont( ss c) RromKate s Kate!erial(c rrentyear - c1 ch1 c) toKate s Kate!erial(c rrentyear - c1 ch1 KaBs>nNont((c rrentyear - c1 ch)) else RromKate s Kate!erial(c rrentyear1 c rrentNont( - c1 c) toKate s Kate!erial(c rrentyear1 c rrentNont( - c1 KaBs>nNont((c rrentyear1 c rrentNont( - c)) xxxxxxxxxxxD

CA,,Kn0 2#A HAPn CABK L(*n% :o'n co#e p(_c t'p c;n c comment %n li0n b.n tr.n : c(@ %iiD L(*n% :o'n co#e :3bc s"a :mi (mo#iRie#)1 bm s n% (a##e#) (oGc rem (remo7e#) bji n%34i k(/n% p(i t+c %i c;n c comment rv n%aB t'i ni s"a :mi1 bm s n%5 ngi s 2 ng*3 s 2 mc 45chD Comment c(o :o'n co#e +p #$n% bt b ]c 7Yi c+c Base Qorm}Base Class}Base ControlD

II.-. Q+J 0U2 5#`n n#\, XIK% AnY )# 2AB n%T P(i s" #$n% Re%ion p(9n n(m co#e : tiEn c(o 7iEc s"a :mi1 bo tr^D P(9n n(m co#e t(eo cg tr@c n(3 sa 5 (t(eo t(_ tp bt b ]c1 n(3n% k(/n% bt b ]c c :W tgt c c+c re%ion)

DK2>.I.0 An CAn&0I+20AI LIA5KI0J QK0#ABab+n20 An EVKn0 -fB t(eo B. c; cWa c+c Rorm1 class 7` mo# le1 l2p tr^n( 7i.n c t( c(ia n(z c+c Re%ion c(Jn( tr.n t(`n( c+c s b-re%ionD IK5 re%ion Net(o#}Q nction c t( c(_a c+c re%ion con sa 5 Net(o#}Q nction P blic O7erri#able (tr34n% (bp l` base Rorm}class) O7erri#e (tr34n% (bp l` #eri7e Rorm}class) Pri7ate Ot(er -r34n% (bp Rorm (oGc class c s" #$n% c+c component :]c l2p (!ec ritB1 Koc ment1 Nass6mail1x) t(^ p(i t'o c+c Re%ion ri.n% c(o t,n% component1 c(_a to`n b] co#e li.n V an :Hn 7iEc t3n% t+c 7Yi c+c component :D II./. Q+J HOn# bcJ >d )# 2AB n% Bt b ]c bB l|i (s" #$n% tr3 6 c tch) tron% tgt c c+c EVKn0 cWa Qorm 7` Control tr.n QormD L%(i.m cgm s" #$n% c@ p(+p tr3 6 c tch : c(e #g l|i (k(/n% O" lo %^ sa t, k(a c tch)D

R.Beee

GAABeee II.4. Q+J HOn# 0# !0 )! D.0.&K0T -.n cWa Kataset k(i 7is al #esi%n :Gt n(3 sa 5 fD.0.&K0g h Q[2 H32#D IK5 KatasetKictionarB1 KatasetCAPaBment1 x !) l3bn% Kata-able tron% m]t Kataset5 V B :Xn( t, 1C trj O )n%D N|i Kataset c(q :3bc p(rp c t)i :a cn Kata-ableD K(i t(iHt kH p(i t+c( Kataset : :m bo n% B.n tc n`BD LH m]t Kataset c n(i0 Kata-able t(^ t)c :] loa#}sa7e #* liE s bX n( (3jn% n%(i.m trtn%D

You might also like