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(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!代码 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!代码 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 DISTINCT * FROM maejsb!领料单 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', "")
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)")
* 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(20)")
* Props for the 领料.备注 field.
DBSetProp('领料.备注', 'Field', 'KeyField', .F.)
DBSetProp('领料.备注', 'Field', 'Updatable', .T.)
DBSetProp('领料.备注', 'Field', 'UpdateName', 'maejsb!领料单.备注')
DBSetProp('领料.备注', 'Field', 'DataType', "M")
* 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', "C(10)")
* Props for the 领料.管库员 field.
DBSetProp('领料.管库员', 'Field', 'KeyField', .F.)
DBSetProp('领料.管库员', 'Field', 'Updatable', .T.)
DBSetProp('领料.管库员', 'Field', 'UpdateName', 'maejsb!领料单.管库员')
DBSetProp('领料.管库员', 'Field', 'DataType', "C(10)")
* Props for the 领料.领料人 field.
DBSetProp('领料.领料人', 'Field', 'KeyField', .F.)
DBSetProp('领料.领料人', 'Field', 'Updatable', .T.)
DBSetProp('领料.领料人', 'Field', 'UpdateName', 'maejsb!领料单.领料人')
DBSetProp('领料.领料人', 'Field', 'DataType', "C(10)")
ENDFUNC
FUNCTION MakeView_领料1
***************** View setup for 领料1 ***************
CREATE SQL VIEW "领料1" ;
AS SELECT *, 领料单1.数量*领料单1.单价 AS 金额, 领料单1.数量*领料单1.单价+领料单1.综合费 AS 合计金额 FROM maejsb!领料单1 WHERE 领料单1.父表主键 = ?c父表主键
DBSetProp('领料1', 'View', 'UpdateType', 1)
DBSetProp('领料1', 'View', 'WhereType', 3)
DBSetProp('领料1', 'View', 'FetchMemo', .T.)
DBSetProp('领料1', 'View', 'SendUpdates', .T.)
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', "")
DBSetProp('领料1', 'View', 'BatchUpdateCount', 1)
DBSetProp('领料1', 'View', 'ShareConnection', .F.)
*!* Field Level Properties for 领料1
* Props for the 领料1.主键 field.
DBSetProp('领料1.主键', 'Field', 'KeyField', .T.)
DBSetProp('领料1.主键', 'Field', 'Updatable', .T.)
DBSetProp('领料1.主键', 'Field', 'UpdateName', 'maejsb!领料单1.主键')
DBSetProp('领料1.主键', 'Field', 'DataType', "C(8)")
DBSetProp('领料1.主键', 'Field', 'DefaultValue', "GetNewUID()")
* 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(8)")
* 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', "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', "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', "N(11,2)")
* 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(12,2)")
* 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(8)")
* 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(7)")
* Props for the 领料1.金额 field.
DBSetProp('领料1.金额', 'Field', 'KeyField', .F.)
DBSetProp('领料1.金额', 'Field', 'Updatable', .F.)
DBSetProp('领料1.金额', 'Field', 'UpdateName', '领料单1.入库编号*')
DBSetProp('领料1.金额', 'Field', 'DataType', "N(20,2)")
* Props for the 领料1.合计金额 field.
DBSetProp('领料1.合计金额', 'Field', 'KeyField', .F.)
DBSetProp('领料1.合计金额', 'Field', 'Updatable', .F.)
DBSetProp('领料1.合计金额', 'Field', 'UpdateName', '领料单1.入库编号**')
DBSetProp('领料1.合计金额', 'Field', 'DataType', "N(20,2)")
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)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?