//=============================à¾ÔèÁ=========================================

procedure sub21

set cursor on

set date to british

set confirm on

set intensity on

set color to w/b

cls

q = alertnew("à¾ÔèÁ¢éÍÁÙÅ",{'ÊÔ¹¤éÒ','ÊÁÒªÔ¡','¡àÅÔ¡'})

? q

do case

case q =1;do addpro

case q =2;do addmem

case q =3;do writemenu

endcase

return

 

procedure addpro

set cursor on

set date to british

set confirm on

set intensity on

set color to w/b

cls

@ 1,23 say "F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ Esc = ¡àÅÔ¡"

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,35 say "à¾ÔèÁ¢éÍÁÙÅÊÔ¹¤éÒ"

_proid = 0

_proname = space(20)

_album = space(15)

_oprice = 0

_sprice = 0

ans = " "

use product

sort on proid to temm

close

use temm

copy to product

close

 

use product

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃËÑÊÊÔ¹¤éÒ :" get _proid pict '999999'

@ 12,10 say "ÈÔŻԹ :" get _proname

@ 14,10 say "ÍÑźÑéÁ :" get _album

@ 16,10 say "ÃÒ¤Ò«×éÍ :" get _oprice pict '999'

@ 18,10 say "ÃÒ¤Ò¢ÒÂ :" get _sprice pict '999'

set key -2 to hpro

read

@ 22,25 say "µéͧ¡Òúѹ·Ö¡ÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

append blank

replace proid with _proid,proname with _proname,album with _album,oprice with _oprice,sprice with _sprice,inven with 0

close

@ 23,35 say "·Ó¡Òúѹ·Ö¡ÃÒ¡ÒùÕéáÅéÇ"

endif

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,64

@ 10,10 to 14,65 double

@ 12,20 say "µéͧ¡ÒÃà¾ÔèÁÍÕ¡ÃÒ¡ÒÃËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

do addpro

endif

return

 

 

//=======================à¾ÔèÁÊÁÒªÔ¡===========================================

procedure addmem

set cursor on

set date to british

set confirm on

set intensity on

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,35 say "à¾ÔèÁ¢éÍÁÙÅÊÁÒªÔ¡"

_memid = 0

_memname= " "

_memnick = " "

_exp = ctod(" ")

ans = " "

use member

go bottom

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃËÑÊÊÁÒªÔ¡ :" get _memid pict '99999'

@ 10,40 say "ÃËÑÊÊÁÒªÔ¡¤¹ÅèÒÊØ´¤×Í " +ltrim(str(memid))

read

locate for memid = _memid

if found()

@ 12,20 say "ÃËÑÊÊÁÒªÔ¡¹ÕéÁÕ¡Òúѹ·Ö¡áÅéÇ"

@ 14,20 say "µéͧ¡ÒÃà¾ÔèÁÍÕ¡ÃÒ¡ÒÃËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

do addmem

endif

 

else

@ 12,10 say "ª×èÍ-Ê¡ØÅ :" get _memname

@ 14,10 say "ª×èÍàÅè¹ :" get _memnick

read

@ 22,25 say "µéͧ¡Òúѹ·Ö¡ÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

_exp = date()+365

append blank

replace memid with _memid,memname with _memname,memnick with _memnick,dateapp with date(),exp with _exp,tscore with 0

@ 23,35 say "·Ó¡Òúѹ·Ö¡ÃÒ¡ÒùÕéáÅéÇ"

endif

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,64

@ 10,10 to 14,65 double

@ 12,20 say "µéͧ¡ÒÃà¾ÔèÁÍÕ¡ÃÒ¡ÒÃËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

do addmem

endif

endif

return

 

 

//===============================ź===================================

procedure sub22

set date to british

set cursor on

set intensity on

set confirm on

set color to w/b

cls

qa = alertnew("ź¢éÍÁÙÅ",{'ÊÔ¹¤éÒ','ÊÁÒªÔ¡','¡àÅÔ¡'})

? qa

do case

case qa =1;do delpro

case qa =2;do delmem

case qa =3;do writemenu

endcase

return

 

procedure delpro

set date to british

set cursor on

set intensity on

set confirm on

set color to /b

cls

@ 1,24 say "F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ Esc = ¡àÅÔ¡"

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,35 say "ź¢éÍÁÙÅÊÔ¹¤éÒ"

_proid = 0

ans = " "

use product

sort on proid to temm

close

use temm

copy to product

close

 

use product

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃкØÃËÑÊÊÔ¹¤éÒ·Õèµéͧ¡ÒÃź¢éÍÁÙÅ : " get _proid pict '999999'

set key -2 to hpro

read

locate for proid = _proid

if found()

@ 11,10 say "ÈÔŻԹ :"+proname

@ 13,10 say "ÍÑźÑéÁ :"+album

@ 15,10 say "ÃÒ¤Ò«×éÍ :"+ltrim(str(oprice))

@ 15,40 say "ÃÒ¤Ò¢ÒÂ :"+ltrim(str(sprice))

@ 17,10 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ : "+ltrim(str(inven))

else

@ 14,30 say "äÁ辺¢éÍÁÙÅÊÔ¹¤éÒÃËÑʹÕé"

endif

set color to w/r

@ 20,9 clear to 23,71

@ 20,8 to 23,72 double

@ 21,10 say "µéͧ¡ÒÃźÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

delete

pack

@ 23,35 say "·Ó¡ÒÃźÃÒ¡ÒùÕéàÃÕºÃéÍÂáÅéÇ"

endif

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,69

@ 10,10 to 14,70 double

@ 12,20 say "µéͧ¡ÒÃźÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

do delpro

endif

return

 

 

//=======================ź¢éÍÁÙÅÊÁÒªÔ¡=========================

procedure delmem

set date to british

set cursor on

set intensity on

set confirm on

set color to /b

cls

@ 1,24 say "F2 = ´Ù¢éÍÁÙÅÊÁÒªÔ¡ Esc = ¡àÅÔ¡"

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ź¢éÍÁÙÅÊÁÒªÔ¡"

_memid = 0

ans = " "

 

use member

sort on memid to tem

close

use tem

copy to member

close

use member

 

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃкØÃËÑÊÊÁÒªÔ¡·Õèµéͧ¡ÒÃź¢éÍÁÙÅ : " get _memid pict '99999'

set key -1 to hmem

read

 

locate for memid = _memid

if found()

@ 11,10 say "ª×èÍ-Ê¡ØÅ : "+memname

@ 13,10 say "ª×èÍàÅè¹ : "+memnick

@ 15,10 say "Çѹ·ÕèÊÁѤà : "+dtoc(dateapp)

@ 15,40 say "ÇѹËÁ´ÍÒÂØ : "+dtoc(exp)

@ 17,10 say "¤Ðá¹¹ÊÐÊÁ·Ñé§ËÁ´ :"+ltrim(str(tscore))

else

@ 14,30 say "äÁ辺¢éÍÁÙÅÊÁÒªÔ¡ÃËÑʹÕé"

endif

set color to w/r

@ 20,9 clear to 23,71

@ 20,8 to 23,72 double

@ 21,10 say "µéͧ¡ÒÃźÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

locate for memid = _memid

if found()

delete

pack

close

endif

@ 23,35 say "·Ó¡ÒÃźÃÒ¡ÒùÕéàÃÕºÃéÍÂáÅéÇ"

endif

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,69

@ 10,10 to 14,70 double

@ 12,20 say "µéͧ¡ÒÃźÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ? " get ans

read

if upper(ans) = "Y"

do delmem

endif

return

 

//===========================á¡éä¢=============================

procedure sub23

set date to british

set confirm on

set intensity on

set cursor on

set color to w/b

cls

qu = alertnew("á¡é䢢éÍÁÙÅ",{'ÊÔ¹¤éÒ','ÊÁÒªÔ¡','¡àÅÔ¡'})

? qu

do case

case qu =1;do editpro

case qu =2;do editmem

case qu =3;do writemenu

endcase

return

 

//==============================á¡éä¢ÊÔ¹¤éÒ=================================

procedure editpro

_proid = 0

ans = " "

set confirm on

set color to /b

cls

@ 1,24 say "F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ Esc = ¡àÅÔ¡"

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,35 say "á¡é䢢éÍÁÙÅÊÔ¹¤éÒ"

 

use product

sort on proid to temm

close

use temm

copy to product

close

 

use product

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃкØÃËÑÊÊÔ¹¤éÒ·Õèµéͧ¡ÒÃá¡éä¢ :" get _proid pict '999999'

set key -2 to hpro

read

 

locate for proid = _proid

if found()

_proname = proname

_album = album

_oprice = oprice

_sprice = sprice

_inven = inven

@ 11,10 say "ÈÔŻԹ :" get _proname

@ 13,10 say "ÍÑźÑéÁ :" get _album

@ 15,10 say "ÃÒ¤Ò«×éÍ :" get _oprice

@ 15,40 say "ÃÒ¤Ò¢ÒÂ :" get _sprice

@ 17,10 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ :" get _inven

read

@ 21,20 say "µéͧ¡Òúѹ·Ö¡¡ÒÃá¡é䢹ÕéËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

replace proid with _proid,proname with _proname,oprice with _oprice,sprice with _sprice,inven with _inven

close

@ 23,25 say "·Ó¡Òúѹ·Ö¡¡ÒÃá¡éä¢áÅéÇàÃÕºÃéÍÂ"

endif

else

@ 20,30 say "äÁ辺ÊÔ¹¤éÒÃËÑʹÕé"

endif

 

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,69

@ 10,10 to 14,70 double

@ 12,20 say "µéͧ¡ÒÃá¡éä¢ÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

do editpro

endif

return

 

//=========================á¡éä¢ÊÁÒªÔ¡====================================

procedure editmem

_memid = 0

ans = " "

set date to british

set confirm on

set color to /b

cls

@ 1,24 say "F2 = ´Ù¢éÍÁÙÅÊÁÒªÔ¡ Esc = ¡àÅÔ¡"

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,35 say "á¡é䢢éÍÁÙÅÊÁÒªÔ¡"

use member

sort on memid to tem

close

use tem

copy to member

close

 

use member

set color to w/r

@ 9,9 clear to 19,71

@ 9,8 to 19,72 double

@ 10,10 say "ÃкØÃËÑÊÊÁÒªÔ¡·Õèµéͧ¡ÒÃá¡éä¢ :" get _memid pict '99999'

set key -1 to hmem

read

 

locate for memid = _memid

if found()

_memname = memname

_memnick = memnick

_dateapp = dateapp

_exp = exp

_tscore = tscore

@ 11,10 say "ª×èÍ-ÊØ¡Å :" get _memname

@ 13,10 say "ª×èÍàÅè¹ :" get _memnick

@ 15,10 say "Çѹ·ÕèÊÁѤÃ:" get _dateapp

@ 15,40 say "ÇѹËÁ´ÍÒÂØ:" get _exp

@ 17,10 say "¤Ðá¹¹ÊÐÊÁ :" get _tscore

read

@ 21,20 say "µéͧ¡Òúѹ·Ö¡¡ÒÃá¡é䢹ÕéËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

replace memid with _memid,memname with _memname,memnick with _memnick,dateapp with _dateapp,exp with _exp,tscore with _tscore

close

@ 23,25 say "·Ó¡Òúѹ·Ö¡¡ÒÃá¡éä¢áÅéÇàÃÕºÃéÍÂ"

endif

else

@ 20,30 say "äÁ辺ÊÁÒªÔ¡ÃËÑʹÕé"

endif

 

cls

set color to /b

cls

set color to w/r

@ 10,11 clear to 14,69

@ 10,10 to 14,70 double

@ 12,20 say "µéͧ¡ÒÃá¡éä¢ÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ?" get ans

read

if upper(ans) = "Y"

do editmem

endif

return

 

//===========================áÊ´§¼Å==========================

procedure sub24

set date to british

set century on

set intensity on

set color to w/b

cls

ques = alertnew("áÊ´§¢éÍÁÙÅ",{'ÊÔ¹¤éÒ','ÊÔ¹¤éÒ¤§¤Åѧ','ÊÁÒªÔ¡','¤Ðá¹¹ÊÐÊÁ','¡àÅÔ¡'})

? ques

do case

case ques =1;do showpro

case ques =2;do showin

case ques =3;do showmem

case ques =4;do showsc

case ques =5;do writemenu

endcase

return

 

//==============================áÊ´§¢éÍÁÙÅÊÔ¹¤éÒ=================================

procedure showpro

set color to /b

cls

set color to w/r

@ 1,26 clear to 3,54

@ 1,25 to 3,55 double

@ 2,35 say "áÊ´§¼Å¢éÍÁÙÅÊÔ¹¤éÒ"

set color to w/b

@ 5,1 clear to 5,80

@ 5,5 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,17 say "ÈÔŻԹ"

@ 5,40 say "ÍÑźÑéÁ"

@ 5,58 say "ÃÒ¤Ò«×éÍ"

@ 5,68 say "ÃÒ¤Ò¢ÒÂ"

 

set color to w/r

@ 7,5 clear to 22,75

@ 7,4 to 22,76 double

i = 1

use product

sort on proid to spro

close

use spro

do while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,40 say album

@ 7+i,61 say ltrim(str(oprice))

@ 7+i,70 say ltrim(str(sprice))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

close all

inkey(20)

return

 

//=======================áÊ´§¢ÍéÁÙŤÅѧÊÔ¹¤éÒ==================================

procedure showin

set color to /b

cls

set color to w/r

@ 1,26 clear to 3,54

@ 1,25 to 3,55 double

@ 2,33 say "áÊ´§¼Å¢éÍÁÙŤÅѧÊÔ¹¤éÒ"

set color to w/b

@ 5,1 clear to 5,80

@ 5,5 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÍÑźÑéÁ"

@ 5,45 say "ÈÔŻԹ"

@ 5,65 say "¨Ó¹Ç¹¤§¤Åѧ"

 

set color to w/r

@ 7,5 clear to 22,75

@ 7,4 to 22,76 double

i = 1

use product

sort on proid to sin

close

use sin

do while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,45 say album

@ 7+i,65 say ltrim(str(inven))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

close all

inkey(20)

return

 

//==========================áÊ´§¢éÍÁÅÙ¤Ðá¹¹ÊÐÊÁÊÁÒªÔ¡===========================

procedure showsc

set color to /b

cls

_memid = 0

set color to w/r

@ 1,26 clear to 3,54

@ 1,25 to 3,55 double

@ 2,27 say "áÊ´§¼Å¢éÍÁÙŤÐá¹¹ÊÐÊÁÊÁÒªÔ¡"

set color to w/b

@ 5,1 clear to 5,80

@ 5,5 say "ÃËÑÊÊÁÒªÔ¡"

@ 5,25 say "ª×èÍ-Ê¡ØÅ"

@ 5,60 say "¤Ðá¹¹ÊÐÊÁ"

 

set color to w/r

@ 7,5 clear to 22,75

@ 7,4 to 22,76 double

use member

sort on memid to ssc

close

use ssc

go top

i = 1

do while !eof()

@ 7+i,5 say ltrim(str(memid))

@ 7+i,25 say memname

@ 7+i,60 say ltrim(str(tscore))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

close all

inkey(20)

return

 

//==========================áÊ´§¢éÍÁÙÅÊÁÒªÔ¡================================

procedure showmem

set color to /b

cls

set color to w/r

@ 1,26 clear to 3,54

@ 1,25 to 3,55 double

@ 2,34 say "áÊ´§¼Å¢éÍÁÙÅÊÁÒªÔ¡"

set color to w/b

@ 5,1 clear to 5,80

@ 5,5 say "ÃËÑÊÊÁÒªÔ¡"

@ 5,17 say "Çѹ·ÕèÊÁѤÃ"

@ 5,30 say "ª×èÍ-Ê¡ØÅ"

@ 5,55 say "ª×èÍàÅè¹"

@ 5,66 say "ÇѹËÁ´ÍÒÂØ"

 

set color to w/r

@ 7,5 clear to 22,75

@ 7,4 to 22,76 double

use member

sort on memid to smem

close

use smem

i = 1

do while !eof()

@ 7+i,5 say ltrim(str(memid))

@ 7+i,17 say dtoc(dateapp)

@ 7+i,30 say memname

@ 7+i,55 say memnick

@ 7+i,66 say dtoc(exp)

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

return