再用repl命令加入表中就好了,
如:
REPLACE plan.类别 WITH thisform.类别1.Value
REPLACE plan.张数 WITH thisform.张数1.Value
REPLACE plan.归档时间 WITH thisform.归档时间1.Value
REPLACE plan.编制单位 WITH thisform.编制单位1.Value
REPLACE plan.档案号 WITH thisform.档案号1.Value
REPLACE plan.编制日期 WITH thisform.编制日期1.Value
REPLACE plan.资料名称 WITH thisform.资料名称1.Value
REPLACE plan.保管期限 WITH thisform.保管期限1.Value
REPLACE plan.存放地点 WITH thisform.存放地点1.Value
REPLACE plan.备注 WITH thisform.备注1.Value
首先在表单的数据环境中预先加几个表,如我的建筑租赁管理商业软件中的计算的一个窗体,预先加zlmxb0、zlmxb1表,在程序运行的过程中,动态的生成一些表,然后对某些数据控件使用:.RecordSourceType=1
.RecordSource=thisform.dataenvironment.cursor1.alias
即可。
以下是例子:
select zlmxb0
with thisform.grdzlmxb0
.RecordSourceType=1
.RecordSource=thisform.dataenvironment.cursor1.alias
.column1.width=75
.column1.readonly=.T.
.column2.width=75
.column3.width=75
.column4.width=75
.column5.width=75
.column6.width=75
.column7.width=75
.column1.header1.caption="租用代码"
.column2.header1.caption="租用日期"
.column3.header1.caption="租用合同号"
.column4.header1.caption="经办人"
.column5.header1.caption="除渣单价"
.column6.header1.caption="刷油单价"
.column7.header1.caption="维修单价"
.ScrollBars=2
.refresh
ENDWITH
select zlmxb1
WITH thisform.grdzlmxb1
.RecordSourceType=1
.RecordSource=thisform.dataenvironment.cursor4.alias
.column1.width=100
.column2.width=100
.column3.width=100
.column4.width=100
.column1.readonly=.T.
.column2.readonly=.T.
.column1.header1.caption=" 序 号 "
.column2.header1.caption="材料代码"
.column3.header1.caption="租赁数量"
.column4.header1.caption="日租金价格"
.ScrollBars=2
ENDWITH
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)