8000元的工作!只需回答一个问题!

bolly 2001-07-25 03:11:36
请说明以下程序运行的结果.

{mfdtitle.i "c+ "} /*GH69*/

define variable comp like ps_comp no-undo.
define variable level as integer no-undo.
define variable maxlevel as integer format ">>>"
label "Levels" no-undo.
/*GH69* define variable eff_date like exd_eff_date no-undo. */
/*GH69*/ define variable eff_date as date no-undo label "As of Date".
define variable parent like ps_par no-undo.
define variable parent1 like ps_par no-undo.
define variable parent2 like ps_par no-undo.
define variable skpge like mfc_logical initial no
label "New Page Each Parent" no-undo.
define variable sort_ref like mfc_logical initial no
label "Sort by Reference" no-undo.
define buffer bommstr for bom_mstr.
define variable desc1 like pt_desc1 format "x(40)" no-undo.
define variable um like pt_um no-undo.
define variable phantom like mfc_logical format "yes"
label "Ph" no-undo.
define variable iss_pol like pt_iss_pol format "/no" no-undo.
define variable record as integer extent 100 no-undo.
define variable lvl as character format "x(10)"
label "Level" no-undo.
define variable new_parent like mfc_logical.
define variable dep like xcm_dept.
define variable lines as integer.
/*H100*/ define variable op like ro_op format ">>>>>>".
/*H100*/ define variable op1 like ro_op format ">>>>>>".
/*huo*/ define variable xpts_sub_part like pts_sub_part.
define variable xpts_qty_per like pts_qty_per.
define variable cate like xcm_cate.
define variable wt like pt_net_wt.
define variable pm like pt_pm_code.
define variable cdesc like xca_desc format "x(16)".
eff_date = today.

form
parent1 colon 22
/*H100 parent2 label {t001.i} colon 49 skip (1) */
/*H100*/ parent2 label {t001.i} colon 49 skip
/*H100*/ op colon 22
/*H100*/ op1 label {t001.i} colon 49 skip (1)
eff_date colon 22 skip
maxlevel colon 22 skip
skpge colon 22 skip
sort_ref colon 22 skip
with frame a width 80 side-labels attr-space.

repeat:

/* INPUT FORM */
if parent2 = hi_char then parent2 = "".
/*H100*/ if op1 = 999999 then op1 = 0.

update parent1 parent2
/*H100*/ op op1
eff_date maxlevel skpge sort_ref with frame a.

bcdparm = "".
{mfquoter.i parent1 }
{mfquoter.i parent2 }
/*H100*/ {mfquoter.i op }
/*H100*/ {mfquoter.i op1 }
{mfquoter.i eff_date }
{mfquoter.i maxlevel }
{mfquoter.i skpge }
{mfquoter.i sort_ref }

if parent2 = "" then parent2 = hi_char.
/*H100*/ if op1 = 0 then op1 = 999999.

/* SELECT PRINTER */
{mfselbpr.i "printer" 132}
{mfphead.i}

form header
skip(1) .
/* with frame a1 page-top.
view frame a1.
*/
for each bom_mstr no-lock
/*J12T*/ where bom_fsm_type = " " /* SKIP SERVICE BOM'S */
/*J12T*/ and bom_parent >= parent1 and bom_parent <= parent2:

/*J12T* where bom_parent >= parent1 and bom_parent <= parent2: */
/*J12T* REMOVED RELIANCE ON QAD_WKFL FOR SERVICE BOM DETERMINATION ***
./*G740*/ if can-find(qad_wkfl where qad_key1 = "bom_fsm"
./*G740*/ and qad_key2 = bom_parent)
./*G740*/ then
./*G740*/ next.
.*J12T*/
assign comp = bom_parent
maxlevel = min(maxlevel,99)
level = 1.

if sort_ref then
find first ps_mstr use-index ps_parref where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
else
find first ps_mstr use-index ps_parcomp where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
if not available ps_mstr then next.

find pt_mstr no-lock where pt_part = bom_parent no-error.

assign parent = ps_par
phantom = if available pt_mstr then pt_phantom else no
new_parent = yes
wt = pt_net_wt.
/* view frame phead. */

repeat with frame ddt2 down:

/*DETAIL FORM */
form
lvl
ps_comp
cate
cdesc
pm
desc1
ps_qty_per
um
wt
phantom
ps_ps_code
ps_start
ps_end
with frame ddt2 width 200 no-attr-space no-box.

if new_parent = yes then do:

if page-size - line-counter < 7 then page.

display "PARENT" @ lvl parent @ ps_comp
pt_desc1 when (available pt_mstr) @ desc1
bom_desc when (not available pt_mstr) @ desc1
pt_pm_code when ( available pt_mstr) @ pm
pt_um when (available pt_mstr) @ um
bom_batch_um when (not available pt_mstr) @ um
phantom @ phantom.

down 1.

if available pt_mstr and pt_desc2 > "" then do:
display pt_desc2 @ desc1.
down 1.
end.
/* if available pt_mstr and pt_rev <> "" then do:
display "Rev: " + pt_rev format "X(24)" @ desc1.
down 1.
end. */
new_parent = no.
end. /* if new_parent = yes */

if not available ps_mstr then do:
repeat:
level = level - 1.
if level < 1 then leave.
find ps_mstr
where recid(ps_mstr) = record[level] no-lock no-error.
comp = ps_par.
if sort_ref then
find next ps_mstr use-index ps_parref
where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
else
find next ps_mstr use-index ps_parcomp
where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
if available ps_mstr then leave.
end.
end. /* if not available ps_mstr */
if level < 1 then leave.

if eff_date = ? or (eff_date <> ? and
(ps_start = ? or ps_start <= eff_date)
and (ps_end = ? or eff_date <= ps_end)) then do:

assign um = ""
desc1 = "Item not in inventory"
iss_pol = no
phantom = no.
wt = 0.
find pt_mstr where pt_part = ps_comp no-lock no-error.
if available pt_mstr then do:
assign um = pt_um
pm = pt_pm_code
desc1 = pt_desc1
iss_pol = pt_iss_pol
wt = pt_net_wt
phantom = pt_phantom.
end.
else do:
find bommstr no-lock
where bommstr.bom_parent = ps_comp no-error.
if available bommstr then
assign um = bommstr.bom_batch_um
desc1 = bommstr.bom_desc.
end.
cate = "".
dep = "".
cdesc = "".
find xcm_mstr where xcm_part = ps_comp no-error.
if available xcm_mstr then do :
if xcm_cate <> " " then cate = xcm_cate.
else dep = xcm_dept.
end.
if cate <> "" then do:
find xca_mstr where xca_cate = cate no-error.
if available xca_mstr then cdesc = xca_desc.
end.
record[level] = recid(ps_mstr).
lvl = "........".
lvl = substring(lvl,1,min (level - 1,9)) + string(level).
if length(lvl) > 10
then lvl = substring(lvl,length (lvl) - 9,10).

lines = 1.
if ps_rmks > "" then lines = lines + 1.
if available pt_mstr and pt_desc2 > ""
then lines = lines + 1.
if available pt_mstr and pt_rev > ""
then lines = lines + 1.
if page-size - line-counter < lines then page.
if cate <> "" then do:
display lvl ps_comp cate cdesc pm desc1 ps_qty_per
um
wt
phantom
ps_ps_code ps_start ps_end
with frame ddt2.
end.
else do:
display lvl ps_comp dep @ cate cdesc pm desc1 ps_qty_per
um wt phantom ps_ps_code ps_start ps_end
with frame ddt2.
end.


/*huo*/ /* if ps_scrp_pct <> 0
then display ps_scrp_pct with frame det2.
*/
if available pt_mstr and pt_desc2 > "" then do:
down 1.
display pt_desc2 @ desc1.
end.
/* if available pt_mstr and pt_rev <> "" then do:
down 1.
display "Rev: " + pt_rev format "X(24)" @ desc1.
end.
if length(ps_rmks) <> 0 then do:
down 1.
/* put desc2 at 22. */
display ps_rmks @ desc1.
end. */
/*hslin990713*/ find pts_det no-lock use-index pts_par
where pts_par=comp
and pts_part=ps_comp no-error.
/*hslin990710*/ if available pts_det then do:
/* down 1.*/
find xcm_mstr where xcm_part = pts_sub_part no-error.
if available xcm_mstr then cate = xcm_cate.
find xca_mstr where xca_cate = cate no-error.
if available xca_mstr then cdesc = xca_desc.
down 1.
display "Alt.: " + pts_sub_part format "x(25)" @ ps_par
cate @ cate cdesc @ cdesc
pts_qty_per format "->>>,>>9.9<<<<<<".
end.
find pts_det no-lock where pts_part =ps_comp no-error.
if available pts_det then do:
if pts_par="" then do:
/*down 1.*/
find xcm_mstr where xcm_part = pts_sub_part no-error.
if available xcm_mstr then cate = xcm_cate.
find xca_mstr where xca_cate = cate no-error.
if available xca_mstr then cdesc = xca_desc.
down 1.
display "Alt.: " + pts_sub_part format "x(25)" @ ps_par
cate @ cate cdesc @ cdesc
pts_qty_per format "->>>,>>9.9<<<<<<".
end.
end.
if level < maxlevel or maxlevel = 0 then do:
comp = ps_comp.
level = level + 1.
if sort_ref
then find first ps_mstr use-index ps_parref
where ps_par = comp
/*H100 and (ps_op >= op and ps_op <= op1) */
no-lock no-error.
else
find first ps_mstr use-index ps_parcomp
where ps_par = comp
/*H100 and (ps_op >= op and ps_op <= op1) */
no-lock no-error.
end.
else do:
if sort_ref
then find next ps_mstr use-index ps_parref
where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
else
find next ps_mstr use-index ps_parcomp
where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
end.
end. /* if eff_date = ? or ... */
else do:
if sort_ref then
find next ps_mstr use-index ps_parref where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
else
find next ps_mstr use-index ps_parcomp
where ps_par = comp
/*H100*/ and (ps_op >= op and ps_op <= op1)
no-lock no-error.
end.
end. /* repeat with frame det2 */

if skpge then page.
else put skip(1).

{mfrpexit.i}
end. /* for each bom_mstr */

/* REPORT TRAILER */
{mfrtrail.i}

end. /* repeat */
...全文
4825 97 打赏 收藏 转发到动态 举报
写回复
用AI写文章
97 条回复
切换为时间正序
请发表友善的回复…
发表回复
bolly 2001-11-08
  • 打赏
  • 举报
回复
哈哈哈!

bolly 2001-08-20
  • 打赏
  • 举报
回复
這里有8000快點來拿
bolly 2001-08-03
  • 打赏
  • 举报
回复
大家快來吧! 這里有一個8000元的工作.
silichip 2001-08-01
  • 打赏
  • 举报
回复
什么东西吗?我KAO,不值 8000元?
joebao 2001-07-31
  • 打赏
  • 举报
回复
不要太残忍了好不好!呜....!:~[
nikita_win 2001-07-31
  • 打赏
  • 举报
回复
没水准!!!这种程序根本就不是给人看的,连个注释都不作,你不会说编这个程序的人可以拿
8000块吧,那你不如找我去工作,因为,我起码还知道应该做必要的大量的注释···呵呵~
胡言乱语,切莫当真

还有这个程序的开发平台到底是什么?你知道吗?如果知道,何必问大家这么无聊的问题呢?

:P
cds27 2001-07-31
  • 打赏
  • 举报
回复
搞不好是帮他挣8000元
pjisfeng 2001-07-31
  • 打赏
  • 举报
回复
我KAO,,机器码都出来了,,利害,,利害,,
tollxu 2001-07-31
  • 打赏
  • 举报
回复
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
0000040050000003000000600002000604040000060060000000320004000
0540054000000000600000000004300000000000003000600000002000000
0054005400000070000000060000000030000007000000004000000000000
0000004040000002000007002000000100000065000000010004000060000
0005000000008000000100004000000200000000060000030000600000200
0065000000100006000030001000000600000000000000500500000002000
RedGuest 2001-07-30
  • 打赏
  • 举报
回复
gz
emailcdh 2001-07-30
  • 打赏
  • 举报
回复
就是呀.连注释都无.不可忍!
working_boy 2001-07-30
  • 打赏
  • 举报
回复
结果肯定是:
你的屏幕.GetDc()->TextOut(0,0,"$8000");
daiguan 2001-07-30
  • 打赏
  • 举报
回复
大概能看懂一些,不过还是先要找本书(估计找不到),这到底是什么吗????
估计是一种已经被淘汰的类sql语言吧还是你是在开玩笑?不过好像挺像回事.
但要这东西编数据库,我还是去设计一套mysql比较好
explorer007 2001-07-30
  • 打赏
  • 举报
回复
我靠
SuperZZZ 2001-07-29
  • 打赏
  • 举报
回复
小儿科!8000元?不值!
wolfAone 2001-07-29
  • 打赏
  • 举报
回复
unit DBPanel;

interface

uses
windows, messages, sysutils, classes,graphics, controls, forms, dialogs,
extctrls, dbctrls, stdctrls, db;

type
TDBPanel = class(tpanel)
private
{ private declarations }
fleft: integer;
ftop: integer;
maxtextlen: integer;
maxlabellen: integer;
fscrollbox: tscrollbox; {滚动控件}
flineheight: integer;
fclick: tnotifyevent;
editors: array of tdbcombobox;
file://- >具体进行编辑所用的数据控件数组,动态生成
labels: array of tlabel;
file://- >各字段的标题,动态生成
okbutton: tbutton;
file://- >最后增加的确定按钮,用于实现提交动作。
{ 数据源}
fdatasource: tdatasource;
fcolumns: integer;
file://- >输入表格的列数
protected
{ protected declarations }
procedure freeeditors;
file://- >释放数据输入控件的内存
public
procedure createeditors(ds: tdatasource; colcount: integer);
file://- >创建各字段的数据输入控件
constructor create(aowner:
tcomponent); override;
destructor destroy; override;
procedure akeypress(sender:
tobject; var key: char);
procedure akeydown(sender:
tobject; var key: word; shift:
tshiftstate);
procedure clearhits(itemindex: integer);
procedure addhits(itemindex:
integer; hits: array of string);
function editor(index: integer):
tdbcombobox;
{ public declarations }
published
property leftlimit: integer read
fleft write fleft default 10;
property toplimit: integer read
ftop write ftop default 10;
property editorlen: integer read
maxtextlen write maxtextlen;
property labellen: integer read
maxlabellen write maxlabellen default 100;
property lineheight: integer read
flineheight write flineheight default 15;
property onokclick: tnotifyevent
read fclick write fclick;
property datasource: tdatasource
read fdatasource write fdatasource;
file://数据源
property columns: integer read
fcolumns write fcolumns;//- >表列数
{ published declarations }
end;
procedure Register;

implementation


{ 为第i字段增加提示信息的方法}
procedure tdbpanel.addhits(itemindex:
integer; hits: array of string);
var
m,n,i: integer;
begin
n := length(editors);
m := length(hits);
if itemindex< n then begin
for i:=0 to m-1 do editors[itemindex].items.add(hits[i]);
end;
end;

procedure tdbpanel.akeydown
(sender: tobject; var key: word;
shift: tshiftstate);
begin
if (sender is tdbcombobox) then begin
case key of
vk_next: (sender as tdbcombobox)
.datasource.dataset.next;
vk_prior: (sender as tdbcombobox)
.datasource.dataset.prior;
end;
end;
end;

procedure tdbpanel.akeypress(sender: tobject; var key: char);
begin
if (sender is tdbcombobox) then begin
if key=#13 then (owner as tform).perform(wm_nextdlgctl, 0, 0);
end;
end;

procedure tdbpanel.clearhits(itemindex: integer);
var
n: integer;
begin
n := length(editors);
if itemindex< n then editors[itemindex].items.clear;
end;

constructor tdbpanel.create(aowner: tcomponent);
begin
inherited create(aowner);
fleft :=10;
ftop := 10;
maxtextlen := 100;
maxlabellen := 100;
flineheight := 15;
end;

{ 创建各字段的数据输入控件的方法}
procedure tdbpanel.createeditors(ds: tdatasource; colcount: integer);
var
i, n, rowcount: integer;
textheight: integer;
begin
if datasource.dataset.active then begin
n := datasource.dataset.fieldcount;
{ 计算最大的标题长度及显示长度}
datasource.dataset.first;
{ 计算高度}
textheight := canvas.textheight(datasource
.dataset.fields[0].displaylabel) + flineheight; file://10;
{ 计算行列数}
rowcount := n div columns;
if n mod columns <> 0 then inc(rowcount);
{ 分配内存}
freeeditors;
setlength(editors, n);
setlength(labels, n);
{ 创建滚动盒}
fscrollbox := tscrollbox.create(owner);
fscrollbox.parent := self;
fscrollbox.align := alclient;
{ 创建编辑}
for i:=0 to n-1 do begin
{ 创建标题}
labels[i] := tlabel.create(owner);
labels[i].parent := fscrollbox; file://self;
labels[i].caption := datasource.dataset.fields[i].displaylabel;
labels[i].left := fleft + (maxlabellen +
maxtextlen + 10) * (i div rowcount);
labels[i].width := maxlabellen;
labels[i].top := ftop + (i mod rowcount) * textheight + 5;
{ 创建编辑对象}
editors[i] := tdbcombobox.create(owner);
editors[i].parent := fscrollbox; file://self;
editors[i].left := labels[i].left + labels[i].width;
editors[i].width := maxtextlen;
editors[i].top := ftop + (i mod rowcount) * textheight;
editors[i].datasource := datasource;
editors[i].datafield := datasource.dataset.fields[i].fieldname;
editors[i].onkeypress := akeypress;
editors[i].onkeydown := akeydown;
end;
{ 创建ok按钮}
okbutton := tbutton.create(owner);
okbutton.parent := fscrollbox;
okbutton.left := editors[n-1].left;
okbutton.top := editors[n-1].top + textheight;
okbutton.caption := '确定';
okbutton.onclick := fclick;
end;
end;

destructor tdbpanel.destroy;
begin
freeeditors;
inherited destroy;
end;

function tdbpanel.editor(index: integer): tdbcombobox;
begin
if index< length(editors) then result := editors[index]
else result := nil;
end;

procedure tdbpanel.freeeditors;
var
i,n: integer;
begin
{ 内存的释放是要有顺序的!必须以创建的相反的顺序进行!
尤其是当组件之间有父子关系时}
if okbutton<>nil then okbutton.free;
if editors<>nil then begin
n := length(editors);
for i:=0 to n-1 do editors[i].free;
editors := nil;
n := length(labels);
for i:=0 to n-1 do labels[i].free;
labels := nil;
end;
if fscrollbox<>nil then begin
fscrollbox.free;
fscrollbox := nil;
end;
end;

procedure Register;
begin
RegisterComponents('OK', [TDBPanel]);
end;

end.




转贴哦.
fmding 2001-07-29
  • 打赏
  • 举报
回复
我要去用冷水洗头
yangwang 2001-07-29
  • 打赏
  • 举报
回复
无聊
我才是蝙蝠侠 2001-07-29
  • 打赏
  • 举报
回复
一群疯子!!!!!!!!!!!!!
liuguantocsdn 2001-07-29
  • 打赏
  • 举报
回复
你们又调皮了
加载更多回复(77)

5,931

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧