ZZKM-1.PRG
上传用户:hbmaozhan
上传日期:2013-01-31
资源大小:1007k
文件大小:4k
源码类别:

企业管理

开发平台:

VFP

  1.  PRIV bs, sl1, ml1, jls
  2.  LOCA ALL FOR pd$kmdm .AND. LEN(LTRIM(TRIM(pd)))=LEN(LTRIM(TRIM(kmdm)))
  3.  IF EOF()
  4.       RETU
  5.  ENDI
  6.  GOTO s
  7.  sl1 = RECNO()
  8.  sl1 = sl1+1
  9.  pd = LTRIM(TRIM(pd))
  10.  COUN ALL FOR kmdm=pd TO jls
  11.  ml1 = sl1+jls-1
  12.  SET COLOR TO N/W
  13.  @ 0, 0 CLEAR TO 3, 26
  14.  GOTO sl1
  15.  bs = 1
  16.  pd = INT((ml1-sl1)/4)
  17.  IF INT((ml1-sl1)/4)=(ml1-sl1)/4
  18.       ys = pd
  19.  ELSE
  20.       ys = pd+1
  21.  ENDI
  22.  DO WHILE bs<=4
  23.       @ bs-1, 2 SAY kmmc
  24.       SKIP
  25.       pd = RECNO()
  26.       IF pd=ml1
  27.            EXIT
  28.       ENDI
  29.       bs = bs+1
  30.  ENDD
  31.  GOTO sl1
  32.  bs = 1
  33.  yc = 1
  34.  SET COLOR TO W/BG
  35.  @ 3, 27 SAY SPACE(15)
  36.  SET COLOR TO G+/G
  37.  @ bs-1, 2 SAY kmmc
  38.  @ 3, 30 SAY kmdm
  39.  DO WHILE .T.
  40.       pd = INKEY(0)
  41.       DO CASE
  42.            CASE pd=5
  43.                 pd = RECNO()
  44.                 IF pd=sl1 .OR. bs=1
  45.                      ?? CHR(7)
  46.                 ELSE
  47.                      SET COLOR TO N/W
  48.                      @ bs-1, 2 SAY kmmc
  49.                      SET COLOR TO G+/G
  50.                      SKIP -1
  51.                      bs = bs-1
  52.                      @ bs-1, 2 SAY kmmc
  53.                      @ 3, 30 SAY kmdm
  54.                 ENDI
  55.            CASE pd=24
  56.                 pd = RECNO()
  57.                 IF pd=ml1-1 .OR. bs=4
  58.                      ?? CHR(7)
  59.                 ELSE
  60.                      SET COLOR TO N/W
  61.                      @ bs-1, 2 SAY kmmc
  62.                      SET COLOR TO G+/G
  63.                      SKIP
  64.                      bs = bs+1
  65.                      @ bs-1, 2 SAY kmmc
  66.                      @ 3, 30 SAY kmdm
  67.                 ENDI
  68.            CASE pd=18
  69.                 IF yc=1
  70.                      ?? CHR(7)
  71.                 ELSE
  72.                      SET COLOR TO N/W
  73.                      @ 0, 0 CLEAR TO 3, 26
  74.                      bs = 1
  75.                      yc = yc-1
  76.                      GOTO sl1+(yc)*4-4
  77.                      pd1 = RECNO()
  78.                      DO WHILE bs<=4
  79.                           @ bs-1, 2 SAY kmmc
  80.                           SKIP
  81.                           pd = RECNO()
  82.                           IF pd=ml1
  83.                                EXIT
  84.                           ENDI
  85.                           bs = bs+1
  86.                      ENDD
  87.                      GOTO pd1
  88.                      bs = 1
  89.                      SET COLOR TO G+/G
  90.                      @ bs-1, 2 SAY kmmc
  91.                      @ 3, 30 SAY kmdm
  92.                 ENDI
  93.            CASE pd=3
  94.                 IF yc=ys
  95.                      ?? CHR(7)
  96.                 ELSE
  97.                      SET COLOR TO N/W
  98.                      @ 0, 0 CLEAR TO 3, 26
  99.                      bs = 1
  100.                      yc = yc+1
  101.                      GOTO sl1+(yc)*4-4
  102.                      pd1 = RECNO()
  103.                      DO WHILE bs<=4
  104.                           @ bs-1, 2 SAY kmmc
  105.                           SKIP
  106.                           pd = RECNO()
  107.                           IF pd=ml1
  108.                                EXIT
  109.                           ENDI
  110.                           bs = bs+1
  111.                      ENDD
  112.                      bs = 1
  113.                      GOTO pd1
  114.                      SET COLOR TO G+/G
  115.                      @ bs-1, 2 SAY kmmc
  116.                      @ 3, 30 SAY kmdm
  117.                 ENDI
  118.            CASE pd=13
  119.                 IF pd=23
  120.                      mc = kmmc
  121.                      x = jhd
  122.                      pd = kmdm
  123.                      pd1 = LTRIM(TRIM(pd))
  124.                      pd1 = SUBSTR(pd1, 1, 3)
  125.                      SELE 1
  126.                      REPL mxkm WITH mc
  127.                      REPL kmdm WITH pd
  128.                      REPL jhd WITH x
  129.                      SELE 2
  130.                      LOCA ALL FOR pd1$kmdm .AND. LEN(LTRIM(TRIM(pd1)))=LEN(LTRIM(TRIM(kmdm)))
  131.                      mc = kmmc
  132.                      pd = slbz
  133.                      SELE 1
  134.                      REPL zzkm WITH mc
  135.                      REPL slbz WITH pd
  136.                      x = 13
  137.                 ENDI
  138.                 pd = kmdm
  139.                 EXIT
  140.            CASE pd=27
  141.                 x = 27
  142.                 SET COLOR TO
  143.                 EXIT
  144.       ENDC
  145.  ENDD
  146.  RETU
  147. *