gendatabase.prg

来自「山泉的早期工资管理VB程序.可以一看,不错的」· PRG 代码 · 共 1,351 行 · 第 1/5 页

PRG
1,351 行
字号
DBSetProp('代码类型', 'View', 'FetchSize', 100)
DBSetProp('代码类型', 'View', 'MaxRecords', -1)
DBSetProp('代码类型', 'View', 'Tables', '')
DBSetProp('代码类型', 'View', 'Prepared', .F.)
DBSetProp('代码类型', 'View', 'CompareMemo', .T.)
DBSetProp('代码类型', 'View', 'FetchAsNeeded', .F.)
DBSetProp('代码类型', 'View', 'FetchSize', 100)
DBSetProp('代码类型', 'View', 'Comment', "")
DBSetProp('代码类型', 'View', 'BatchUpdateCount', 1)
DBSetProp('代码类型', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 代码类型
* Props for the 代码类型.类型 field.
DBSetProp('代码类型.类型', 'Field', 'KeyField', .F.)
DBSetProp('代码类型.类型', 'Field', 'Updatable', .F.)
DBSetProp('代码类型.类型', 'Field', 'UpdateName', 'maejsb!代码.类型')
DBSetProp('代码类型.类型', 'Field', 'DataType', "C(10)")
ENDFUNC
 
FUNCTION MakeView_计量
***************** View setup for 计量 ***************

CREATE SQL VIEW "计量" ; 
   AS SELECT 计量费用.主键, 计量费用.编号, 计量费用.仪器名称,  计量费用.型号规格, 计量费用.日期, 计量费用.数量, 计量费用.单位,  计量费用.单价, 计量费用.科室, 计量费用.数量*计量费用.单价 AS 金额,  计量费用.检定单位 FROM maejsb!计量费用 WHERE 计量费用.科室 LIKE ?c科室 ORDER BY 计量费用.编号 DESC

DBSetProp('计量', 'View', 'UpdateType', 1)
DBSetProp('计量', 'View', 'WhereType', 3)
DBSetProp('计量', 'View', 'FetchMemo', .T.)
DBSetProp('计量', 'View', 'SendUpdates', .T.)
DBSetProp('计量', 'View', 'UseMemoSize', 255)
DBSetProp('计量', 'View', 'FetchSize', 100)
DBSetProp('计量', 'View', 'MaxRecords', -1)
DBSetProp('计量', 'View', 'Tables', 'maejsb!计量费用')
DBSetProp('计量', 'View', 'Prepared', .F.)
DBSetProp('计量', 'View', 'CompareMemo', .T.)
DBSetProp('计量', 'View', 'FetchAsNeeded', .F.)
DBSetProp('计量', 'View', 'FetchSize', 100)
DBSetProp('计量', 'View', 'Comment', "* 登记计量费用" + CHR(13) + "")
DBSetProp('计量', 'View', 'BatchUpdateCount', 1)
DBSetProp('计量', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 计量
* Props for the 计量.主键 field.
DBSetProp('计量.主键', 'Field', 'KeyField', .T.)
DBSetProp('计量.主键', 'Field', 'Updatable', .T.)
DBSetProp('计量.主键', 'Field', 'UpdateName', 'maejsb!计量费用.主键')
DBSetProp('计量.主键', 'Field', 'DataType', "C(8)")
DBSetProp('计量.主键', 'Field', 'DefaultValue', "GetNewUid()")
* Props for the 计量.编号 field.
DBSetProp('计量.编号', 'Field', 'KeyField', .F.)
DBSetProp('计量.编号', 'Field', 'Updatable', .T.)
DBSetProp('计量.编号', 'Field', 'UpdateName', 'maejsb!计量费用.编号')
DBSetProp('计量.编号', 'Field', 'DataType', "C(7)")
* Props for the 计量.仪器名称 field.
DBSetProp('计量.仪器名称', 'Field', 'KeyField', .F.)
DBSetProp('计量.仪器名称', 'Field', 'Updatable', .T.)
DBSetProp('计量.仪器名称', 'Field', 'UpdateName', 'maejsb!计量费用.仪器名称')
DBSetProp('计量.仪器名称', 'Field', 'DataType', "C(50)")
* Props for the 计量.型号规格 field.
DBSetProp('计量.型号规格', 'Field', 'KeyField', .F.)
DBSetProp('计量.型号规格', 'Field', 'Updatable', .T.)
DBSetProp('计量.型号规格', 'Field', 'UpdateName', 'maejsb!计量费用.型号规格')
DBSetProp('计量.型号规格', 'Field', 'DataType', "C(50)")
* Props for the 计量.日期 field.
DBSetProp('计量.日期', 'Field', 'KeyField', .F.)
DBSetProp('计量.日期', 'Field', 'Updatable', .T.)
DBSetProp('计量.日期', 'Field', 'UpdateName', 'maejsb!计量费用.日期')
DBSetProp('计量.日期', 'Field', 'DataType', "D")
* Props for the 计量.数量 field.
DBSetProp('计量.数量', 'Field', 'KeyField', .F.)
DBSetProp('计量.数量', 'Field', 'Updatable', .T.)
DBSetProp('计量.数量', 'Field', 'UpdateName', 'maejsb!计量费用.数量')
DBSetProp('计量.数量', 'Field', 'DataType', "I")
* Props for the 计量.单位 field.
DBSetProp('计量.单位', 'Field', 'KeyField', .F.)
DBSetProp('计量.单位', 'Field', 'Updatable', .T.)
DBSetProp('计量.单位', 'Field', 'UpdateName', 'maejsb!计量费用.单位')
DBSetProp('计量.单位', 'Field', 'DataType', "C(20)")
* Props for the 计量.单价 field.
DBSetProp('计量.单价', 'Field', 'KeyField', .F.)
DBSetProp('计量.单价', 'Field', 'Updatable', .T.)
DBSetProp('计量.单价', 'Field', 'UpdateName', 'maejsb!计量费用.单价')
DBSetProp('计量.单价', 'Field', 'DataType', "N(11,2)")
* Props for the 计量.科室 field.
DBSetProp('计量.科室', 'Field', 'KeyField', .F.)
DBSetProp('计量.科室', 'Field', 'Updatable', .T.)
DBSetProp('计量.科室', 'Field', 'UpdateName', 'maejsb!计量费用.科室')
DBSetProp('计量.科室', 'Field', 'DataType', "C(20)")
* Props for the 计量.金额 field.
DBSetProp('计量.金额', 'Field', 'KeyField', .F.)
DBSetProp('计量.金额', 'Field', 'Updatable', .F.)
DBSetProp('计量.金额', 'Field', 'UpdateName', '计量费用.检定单位*')
DBSetProp('计量.金额', 'Field', 'DataType', "N(20,2)")
* Props for the 计量.检定单位 field.
DBSetProp('计量.检定单位', 'Field', 'KeyField', .F.)
DBSetProp('计量.检定单位', 'Field', 'Updatable', .T.)
DBSetProp('计量.检定单位', 'Field', 'UpdateName', 'maejsb!计量费用.检定单位')
DBSetProp('计量.检定单位', 'Field', 'DataType', "C(50)")
ENDFUNC
 
FUNCTION MakeView_检定单位
***************** View setup for 检定单位 ***************

CREATE SQL VIEW "检定单位" ; 
   AS SELECT 代码.名称 FROM maejsb!代码 WHERE 代码.类型 = '检定单位' ORDER BY 代码.名称

DBSetProp('检定单位', 'View', 'UpdateType', 1)
DBSetProp('检定单位', 'View', 'WhereType', 3)
DBSetProp('检定单位', 'View', 'FetchMemo', .T.)
DBSetProp('检定单位', 'View', 'SendUpdates', .F.)
DBSetProp('检定单位', 'View', 'UseMemoSize', 255)
DBSetProp('检定单位', 'View', 'FetchSize', 100)
DBSetProp('检定单位', 'View', 'MaxRecords', -1)
DBSetProp('检定单位', 'View', 'Tables', 'maejsb!代码')
DBSetProp('检定单位', 'View', 'Prepared', .F.)
DBSetProp('检定单位', 'View', 'CompareMemo', .T.)
DBSetProp('检定单位', 'View', 'FetchAsNeeded', .F.)
DBSetProp('检定单位', 'View', 'FetchSize', 100)
DBSetProp('检定单位', 'View', 'Comment', "")
DBSetProp('检定单位', 'View', 'BatchUpdateCount', 1)
DBSetProp('检定单位', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 检定单位
* Props for the 检定单位.名称 field.
DBSetProp('检定单位.名称', 'Field', 'KeyField', .F.)
DBSetProp('检定单位.名称', 'Field', 'Updatable', .T.)
DBSetProp('检定单位.名称', 'Field', 'UpdateName', 'maejsb!代码.名称')
DBSetProp('检定单位.名称', 'Field', 'DataType', "C(50)")
ENDFUNC
 
FUNCTION MakeView_维修单位
***************** View setup for 维修单位 ***************

CREATE SQL VIEW "维修单位" ; 
   AS SELECT 供应商.名称 FROM maejsb!供应商 ORDER BY 供应商.名称

DBSetProp('维修单位', 'View', 'UpdateType', 1)
DBSetProp('维修单位', 'View', 'WhereType', 3)
DBSetProp('维修单位', 'View', 'FetchMemo', .T.)
DBSetProp('维修单位', 'View', 'SendUpdates', .F.)
DBSetProp('维修单位', 'View', 'UseMemoSize', 255)
DBSetProp('维修单位', 'View', 'FetchSize', 100)
DBSetProp('维修单位', 'View', 'MaxRecords', -1)
DBSetProp('维修单位', 'View', 'Tables', 'maejsb!供应商')
DBSetProp('维修单位', 'View', 'Prepared', .F.)
DBSetProp('维修单位', 'View', 'CompareMemo', .T.)
DBSetProp('维修单位', 'View', 'FetchAsNeeded', .F.)
DBSetProp('维修单位', 'View', 'FetchSize', 100)
DBSetProp('维修单位', 'View', 'Comment', "")
DBSetProp('维修单位', 'View', 'BatchUpdateCount', 1)
DBSetProp('维修单位', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 维修单位
* Props for the 维修单位.名称 field.
DBSetProp('维修单位.名称', 'Field', 'KeyField', .F.)
DBSetProp('维修单位.名称', 'Field', 'Updatable', .T.)
DBSetProp('维修单位.名称', 'Field', 'UpdateName', 'maejsb!供应商.名称')
DBSetProp('维修单位.名称', 'Field', 'DataType', "C(50)")
ENDFUNC
 
FUNCTION MakeView_产品编号
***************** View setup for 产品编号 ***************

CREATE SQL VIEW "产品编号" ; 
   AS SELECT 入库单1.产品名称, 入库单1.型号规格, 入库单1.数量, 入库单1.单位,  入库单1.单价, 入库单.编号 FROM  maejsb!入库单 INNER JOIN maejsb!入库单1    ON  入库单.主键 = 入库单1.父表主键

DBSetProp('产品编号', 'View', 'UpdateType', 1)
DBSetProp('产品编号', 'View', 'WhereType', 3)
DBSetProp('产品编号', 'View', 'FetchMemo', .T.)
DBSetProp('产品编号', 'View', 'SendUpdates', .F.)
DBSetProp('产品编号', 'View', 'UseMemoSize', 255)
DBSetProp('产品编号', 'View', 'FetchSize', 100)
DBSetProp('产品编号', 'View', 'MaxRecords', -1)
DBSetProp('产品编号', 'View', 'Tables', '')
DBSetProp('产品编号', 'View', 'Prepared', .F.)
DBSetProp('产品编号', 'View', 'CompareMemo', .T.)
DBSetProp('产品编号', 'View', 'FetchAsNeeded', .F.)
DBSetProp('产品编号', 'View', 'FetchSize', 100)
DBSetProp('产品编号', 'View', 'Comment', "")
DBSetProp('产品编号', 'View', 'BatchUpdateCount', 1)
DBSetProp('产品编号', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 产品编号
* Props for the 产品编号.产品名称 field.
DBSetProp('产品编号.产品名称', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.产品名称', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.产品名称', 'Field', 'UpdateName', 'maejsb!入库单1.产品名称')
DBSetProp('产品编号.产品名称', 'Field', 'DataType', "C(50)")
* Props for the 产品编号.型号规格 field.
DBSetProp('产品编号.型号规格', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.型号规格', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.型号规格', 'Field', 'UpdateName', 'maejsb!入库单1.型号规格')
DBSetProp('产品编号.型号规格', 'Field', 'DataType', "C(50)")
* Props for the 产品编号.数量 field.
DBSetProp('产品编号.数量', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.数量', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.数量', 'Field', 'UpdateName', 'maejsb!入库单1.数量')
DBSetProp('产品编号.数量', 'Field', 'DataType', "I")
* Props for the 产品编号.单位 field.
DBSetProp('产品编号.单位', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.单位', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.单位', 'Field', 'UpdateName', 'maejsb!入库单1.单位')
DBSetProp('产品编号.单位', 'Field', 'DataType', "C(20)")
* Props for the 产品编号.单价 field.
DBSetProp('产品编号.单价', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.单价', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.单价', 'Field', 'UpdateName', 'maejsb!入库单1.单价')
DBSetProp('产品编号.单价', 'Field', 'DataType', "N(11,2)")
* Props for the 产品编号.编号 field.
DBSetProp('产品编号.编号', 'Field', 'KeyField', .F.)
DBSetProp('产品编号.编号', 'Field', 'Updatable', .F.)
DBSetProp('产品编号.编号', 'Field', 'UpdateName', 'maejsb!入库单.编号')
DBSetProp('产品编号.编号', 'Field', 'DataType', "C(7)")
ENDFUNC
 
FUNCTION MakeView_产品1
***************** View setup for 产品1 ***************

CREATE SQL VIEW "产品1" ; 
   AS SELECT 入库单1.产品名称, 入库单1.型号规格, 入库单1.数量, 入库单1.单位,  入库单1.单价, 入库单.编号, 入库单1.主键, 入库单1.父表主键 FROM  maejsb!入库单 INNER JOIN maejsb!入库单1    ON  入库单.主键 = 入库单1.父表主键 WHERE 入库单1.产品名称 LIKE ?m.cDisplayValue

DBSetProp('产品1', 'View', 'UpdateType', 1)
DBSetProp('产品1', 'View', 'WhereType', 3)
DBSetProp('产品1', 'View', 'FetchMemo', .T.)
DBSetProp('产品1', 'View', 'SendUpdates', .F.)
DBSetProp('产品1', 'View', 'UseMemoSize', 255)
DBSetProp('产品1', 'View', 'FetchSize', 100)
DBSetProp('产品1', 'View', 'MaxRecords', -1)
DBSetProp('产品1', 'View', 'Tables', 'maejsb!入库单1')
DBSetProp('产品1', 'View', 'Prepared', .F.)
DBSetProp('产品1', 'View', 'CompareMemo', .T.)
DBSetProp('产品1', 'View', 'FetchAsNeeded', .F.)
DBSetProp('产品1', 'View', 'FetchSize', 100)
DBSetProp('产品1', 'View', 'Comment', "* 领料单中选择产品用" + CHR(13) + "")
DBSetProp('产品1', 'View', 'BatchUpdateCount', 1)
DBSetProp('产品1', 'View', 'ShareConnection', .F.)

*!* Field Level Properties for 产品1
* Props for the 产品1.产品名称 field.
DBSetProp('产品1.产品名称', 'Field', 'KeyField', .F.)
DBSetProp('产品1.产品名称', 'Field', 'Updatable', .T.)
DBSetProp('产品1.产品名称', 'Field', 'UpdateName', 'maejsb!入库单1.产品名称')
DBSetProp('产品1.产品名称', 'Field', 'DataType', "C(50)")
* Props for the 产品1.型号规格 field.
DBSetProp('产品1.型号规格', 'Field', 'KeyField', .F.)
DBSetProp('产品1.型号规格', 'Field', 'Updatable', .T.)
DBSetProp('产品1.型号规格', 'Field', 'UpdateName', 'maejsb!入库单1.型号规格')
DBSetProp('产品1.型号规格', 'Field', 'DataType', "C(50)")
* Props for the 产品1.数量 field.
DBSetProp('产品1.数量', 'Field', 'KeyField', .F.)
DBSetProp('产品1.数量', 'Field', 'Updatable', .T.)
DBSetProp('产品1.数量', 'Field', 'UpdateName', 'maejsb!入库单1.数量')
DBSetProp('产品1.数量', 'Field', 'DataType', "I")
* Props for the 产品1.单位 field.
DBSetProp('产品1.单位', 'Field', 'KeyField', .F.)
DBSetProp('产品1.单位', 'Field', 'Updatable', .T.)
DBSetProp('产品1.单位', 'Field', 'UpdateName', 'maejsb!入库单1.单位')
DBSetProp('产品1.单位', 'Field', 'DataType', "C(20)")
* Props for the 产品1.单价 field.
DBSetProp('产品1.单价', 'Field', 'KeyField', .F.)
DBSetProp('产品1.单价', 'Field', 'Updatable', .T.)
DBSetProp('产品1.单价', 'Field', 'UpdateName', 'maejsb!入库单1.单价')
DBSetProp('产品1.单价', 'Field', 'DataType', "N(11,2)")
* Props for the 产品1.编号 field.
DBSetProp('产品1.编号', 'Field', 'KeyField', .F.)
DBSetProp('产品1.编号', 'Field', 'Updatable', .F.)
DBSetProp('产品1.编号', 'Field', 'UpdateName', '

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?