Componentes.Terceros.RemObj.../internal/5.0.24.615/1/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.dfm

338 lines
10 KiB
Plaintext

object BusinessRulesScripts_ServerDataModule: TBusinessRulesScripts_ServerDataModule
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 340
Top = 54
Height = 399
Width = 342
object ROServer: TROIndyHTTPServer
Dispatchers = <
item
Name = 'ROMessage'
Message = ROMessage
Enabled = True
PathInfo = 'Bin'
end>
Port = 8099
Left = 32
Top = 8
end
object ROMessage: TROBinMessage
Left = 34
Top = 56
end
object ConnectionManager: TDAConnectionManager
MaxPoolSize = 10
PoolTimeoutSeconds = 60
PoolBehaviour = pbWait
WaitIntervalSeconds = 1
Connections = <
item
Name = 'ADO'
ConnectionString =
'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
'rID=sa;Password=;'
Default = True
Tag = 0
end>
DriverManager = DriverManager
PoolingEnabled = True
Left = 136
Top = 56
end
object DriverManager: TDADriverManager
DriverDirectory = '%SYSTEM%\'
AutoLoad = False
TraceActive = False
TraceFlags = []
Left = 136
Top = 10
end
object Schema: TDASchema
ConnectionManager = ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'ADO'
TargetTable = 'Products'
SQL =
'SELECT '#10' ProductID, ProductName, SupplierID, CategoryID, Quan' +
'tityPerUnit, '#10' UnitPrice, UnitsInStock, UnitsOnOrder, Reorder' +
'Level, '#10' Discontinued'#10' FROM'#10' Products'
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ProductID'
TableField = 'ProductID'
end
item
DatasetField = 'ProductName'
TableField = 'ProductName'
end
item
DatasetField = 'SupplierID'
TableField = 'SupplierID'
end
item
DatasetField = 'CategoryID'
TableField = 'CategoryID'
end
item
DatasetField = 'QuantityPerUnit'
TableField = 'QuantityPerUnit'
end
item
DatasetField = 'UnitPrice'
TableField = 'UnitPrice'
end
item
DatasetField = 'UnitsInStock'
TableField = 'UnitsInStock'
end
item
DatasetField = 'UnitsOnOrder'
TableField = 'UnitsOnOrder'
end
item
DatasetField = 'ReorderLevel'
TableField = 'ReorderLevel'
end
item
DatasetField = 'Discontinued'
TableField = 'Discontinued'
end>
end>
Name = 'Products'
Fields = <
item
Name = 'ProductID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ProductName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'SupplierID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CategoryID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'QuantityPerUnit'
DataType = datWideString
Size = 20
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'UnitPrice'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'UnitsInStock'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'UnitsOnOrder'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ReorderLevel'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Discontinued'
DataType = datBoolean
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end
item
Params = <>
Statements = <
item
Connection = 'ADO'
TargetTable = 'OrderDetails'
SQL =
'SELECT '#10' OrderID, ProductID, UnitPrice, Quantity, Discount'#10' ' +
'FROM'#10' [Order Details]'
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'OrderID'
TableField = 'OrderID'
end
item
DatasetField = 'ProductID'
TableField = 'ProductID'
end
item
DatasetField = 'UnitPrice'
TableField = 'UnitPrice'
end
item
DatasetField = 'Quantity'
TableField = 'Quantity'
end
item
DatasetField = 'Discount'
TableField = 'Discount'
end>
end>
Name = 'OrderDetails'
Fields = <
item
Name = 'OrderID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ProductID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'UnitPrice'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Quantity'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Discount'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.Script =
'procedure BeforeDelete;'#10'begin'#10' if Gain > 50 then'#10' RaiseError' +
'('#39'Cannot delete orders that make us more then 50$'#39');'#10'end;'#10#10'pro' +
'cedure BeforePost;'#10'begin'#10' if VarIsNull(ProductID) then'#10' Rais' +
'eError('#39'Please specify a name.'#39');'#10' '#10' if Quantity < 1 then'#10' ' +
' RaiseError('#39'Quantity can not be less 1 !'#39');'#10#10' if UnitPrice < ' +
'10 then'#10' Quantity := 10;'#10'end;'#10#10'procedure OnCalcFields;'#10'begin'#10 +
' Gain := UnitPrice*Quantity*(1-Discount);'#10'end;'#10#10'procedure OnNew' +
'Record;'#10'begin'#10' Quantity := 1;'#10'end;'
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end>
Commands = <>
RelationShips = <>
UpdateRules = <>
Left = 43
Top = 150
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 40
Top = 200
end
end