Se añaden los ejemplos.

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@49 b6239004-a887-0f4b-9937-50029ccdca16
This commit is contained in:
David Arranz 2009-02-28 17:16:16 +00:00
parent c0e995119a
commit 0cbd2a5477
1074 changed files with 101663 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="..\styles.css">
</head>
<body>
<img src="..\..\da.png" alt="" align="right">
<!-------------------------------------------------------------------------->
<p class="h1">
<span>Briefcase model sample</span>
</p>
<h2>Purpose</h2>
<p>
This example shows how to create a <b>briefcase model</b> using a Data Abstract Client.
</p>
<h2>Getting Started</h2>
<ul>
<li>Launch the Server.</li>
<li>Launch the Client.</li>
<li>The first time the server runs it will ask to fetch the data, else it will load it from disk. </li>
<li>Make some changes to the records.</li><li>Close the client.</li>
<li>Re-open the client and the changes will still be there. </li>
<li>Pressing Apply Updates will send the changes back to the server.</li>
</ul>
<!-------------------------------------------------------------------------->
</body>
</html>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Default.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{DC65E2DF-E6C9-4410-9486-4F175607B752}</Option>
</Option>
</PersonalityInfo>
<Default.Personality>
<Projects>
<Projects Name="BriefcaseModelServer.exe">BriefcaseModelServer.bdsproj</Projects>
<Projects Name="BriefcaseModelClient.exe">BriefcaseModelClient.bdsproj</Projects>
<Projects Name="Targets">BriefcaseModelServer.exe BriefcaseModelClient.exe</Projects>
</Projects>
<Dependencies/>
</Default.Personality>
</BorlandProject>

View File

@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = BriefcaseModelServer.exe BriefcaseModelClient.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
BriefcaseModelServer.exe: BriefcaseModelServer.dpr
$(DCC)
BriefcaseModelClient.exe: BriefcaseModelClient.dpr
$(DCC)

View File

@ -0,0 +1,40 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8aedcb5a-78e5-4e85-8261-093aa6a47a12}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup />
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="BriefcaseModelServer">
<MSBuild Projects="BriefcaseModelServer.dproj" Targets="" />
</Target>
<Target Name="BriefcaseModelServer:Clean">
<MSBuild Projects="BriefcaseModelServer.dproj" Targets="Clean" />
</Target>
<Target Name="BriefcaseModelServer:Make">
<MSBuild Projects="BriefcaseModelServer.dproj" Targets="Make" />
</Target>
<Target Name="BriefcaseModelClient">
<MSBuild Projects="BriefcaseModelClient.dproj" Targets="" />
</Target>
<Target Name="BriefcaseModelClient:Clean">
<MSBuild Projects="BriefcaseModelClient.dproj" Targets="Clean" />
</Target>
<Target Name="BriefcaseModelClient:Make">
<MSBuild Projects="BriefcaseModelClient.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="BriefcaseModelServer;BriefcaseModelClient" />
</Target>
<Target Name="Clean">
<CallTarget Targets="BriefcaseModelServer:Clean;BriefcaseModelClient:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="BriefcaseModelServer:Make;BriefcaseModelClient:Make" />
</Target>
</Project>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{A812C417-01F7-4D10-80C0-3FAC762998EA}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BriefcaseModelClient.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,19 @@
program BriefcaseModelClient;
uses
uROComInit,
Forms,
MidasLib,
BriefcaseModelClientMain in 'BriefcaseModelClientMain.pas' {BriefcaseModelClientMainForm},
BriefcaseModelClientData in 'BriefcaseModelClientData.pas' {BriefcaseModelClientDataModule: TDAClientDataModule},
BriefcaseModelClientChanges in 'BriefcaseModelClientChanges.pas' {BriefcaseModelClientChangesForm};
{$R *.res}
begin
Application.Initialize;
Application.Title := 'Briefcase Model Client';
Application.CreateForm(TBriefcaseModelClientDataModule, BriefcaseModelClientDataModule);
Application.CreateForm(TBriefcaseModelClientMainForm, BriefcaseModelClientMainForm);
Application.Run;
end.

View File

@ -0,0 +1,78 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{bbc1c7e0-ae64-480d-a016-c817f7590577}</ProjectGuid>
<MainSource>BriefcaseModelClient.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BriefcaseModelClient.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BriefcaseModelClient.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BriefcaseModelClient.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BriefcaseModelClientChanges.pas">
<Form>BriefcaseModelClientChangesForm</Form>
</DCCReference>
<DCCReference Include="BriefcaseModelClientData.pas">
<Form>BriefcaseModelClientDataModule</Form>
</DCCReference>
<DCCReference Include="BriefcaseModelClientMain.pas">
<Form>BriefcaseModelClientMainForm</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,58 @@
object BriefcaseModelClientChangesForm: TBriefcaseModelClientChangesForm
Left = 108
Top = 133
AutoScroll = False
Caption = 'Changes'
ClientHeight = 352
ClientWidth = 405
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 123
Width = 405
Height = 8
Cursor = crVSplit
Align = alBottom
Beveled = True
end
object ListView: TListView
Left = 0
Top = 131
Width = 405
Height = 221
Align = alBottom
Columns = <
item
Caption = 'Name'
Width = 200
end
item
Caption = 'Old value'
Width = 100
end
item
Caption = 'New value'
Width = 100
end>
OwnerData = True
ReadOnly = True
RowSelect = True
TabOrder = 0
ViewStyle = vsReport
OnData = ListViewData
end
object ListBox: TListBox
Left = 0
Top = 0
Width = 405
Height = 123
Align = alClient
ItemHeight = 13
TabOrder = 1
OnClick = ListBoxClick
end
end

View File

@ -0,0 +1,115 @@
unit BriefcaseModelClientChanges;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls;
type
TBriefcaseModelClientChangesForm = class(TForm)
ListView: TListView;
Splitter1: TSplitter;
ListBox: TListBox;
procedure ListBoxClick(Sender: TObject);
procedure ListViewData(Sender: TObject; Item: TListItem);
private
{ Private declarations }
procedure SetupListview;
procedure Setup;
public
{ Public declarations }
end;
var
BriefcaseModelClientChangesForm: TBriefcaseModelClientChangesForm;
procedure ShowChanges;
implementation
uses
uDADelta, BriefcaseModelClientData, uDAInterfaces;
{$R *.dfm}
procedure ShowChanges;
begin
with TBriefcaseModelClientChangesForm.Create(Application) do try
Setup;
if ListBox.Count = 0 then Exit;
ShowModal;
finally
Release;
end;
end;
procedure TBriefcaseModelClientChangesForm.ListBoxClick(Sender: TObject);
begin
SetupListView;
end;
procedure TBriefcaseModelClientChangesForm.SetupListview;
begin
ListView.Items.Count := 0;
if ListBox.ItemIndex = -1 then Exit;
ListView.Items.Count := TDADeltaChange(Listbox.Items.Objects[ListBox.ItemIndex]).Delta.LoggedFieldCount;
end;
procedure TBriefcaseModelClientChangesForm.ListViewData(Sender: TObject;
Item: TListItem);
var
DeltaChange: TDADeltaChange;
begin
if (Item = nil) or (Item.Index >= ListView.Items.Count) then Exit;
DeltaChange := TDADeltaChange(Listbox.Items.Objects[ListBox.ItemIndex]);
Item.Caption := DeltaChange.Delta.LoggedFieldNames[Item.Index];
if DeltaChange.ChangeType <> ctInsert then
Item.SubItems.Add(VarToStr(DeltaChange.OldValueByName[Item.Caption]))
else
Item.SubItems.Add('');
if DeltaChange.ChangeType <> ctDelete then
Item.SubItems.Add(VarToStr(DeltaChange.NewValueByName[Item.Caption]))
else
Item.SubItems.Add('');
end;
procedure TBriefcaseModelClientChangesForm.Setup;
procedure AddDelta(Delta: IDADelta);
var
str: string;
i, j: integer;
begin
for i := 0 to Delta.Count - 1 do
with Delta.Changes[i] do begin
case ChangeType of
ctInsert: str := '[New]';
ctUpdate: str := '[Update]';
ctDelete: str := '[Delete]';
end;
str := str + ' ' + Delta.LogicalName + ': ';
for j := 0 to delta.KeyFieldCount - 1 do begin
if ChangeType = ctDelete then
str := str + VarToStr(OldValueByName[delta.KeyFieldNames[j]]) + ','
else
str := str + VarToStr(NewValueByName[delta.KeyFieldNames[j]]) + ','
end;
if delta.KeyFieldCount > 0 then SetLength(Str, Length(str) - 1);
ListBox.Items.AddObject(str, Delta.Changes[i]);
end;
end;
begin
ListBox.Items.Clear;
with BriefcaseModelClientDataModule do begin
if tbl_Customers.DeltaInitialized then AddDelta(tbl_Customers.Delta);
if tbl_Orders.DeltaInitialized then AddDelta(tbl_Orders.Delta);
end;
if ListBox.Count > 0 then begin
ListBox.ItemIndex := 0;
ListBoxClick(ListBox);
end;
end;
end.

View File

@ -0,0 +1,383 @@
object BriefcaseModelClientDataModule: TBriefcaseModelClientDataModule
OldCreateOrder = True
Left = 126
Top = 134
Height = 300
Width = 300
object Channel: TROWinInetHTTPChannel
ServerLocators = <>
DispatchOptions = []
UserAgent = 'RemObjects SDK'
TargetURL = 'http://localhost:8099/BIN'
Left = 40
Top = 8
end
object Message: TROBinMessage
Left = 40
Top = 52
end
object RemoteService: TRORemoteService
Message = Message
Channel = Channel
ServiceName = 'BriefcaseModelService'
Left = 40
Top = 96
end
object DataStreamer: TDABinDataStreamer
Left = 40
Top = 140
end
object RemoteDataAdapter: TDARemoteDataAdapter
GetSchemaCall.RemoteService = RemoteService
GetDataCall.RemoteService = RemoteService
UpdateDataCall.RemoteService = RemoteService
GetScriptsCall.RemoteService = RemoteService
RemoteService = RemoteService
DataStreamer = DataStreamer
Left = 40
Top = 184
end
object tbl_Customers: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CompanyName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactName'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactTitle'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Address'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'City'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Region'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Country'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Phone'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Fax'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
LocalDataStreamer = DataStreamer
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Customers'
IndexDefs = <>
Left = 184
Top = 144
end
object ds_Customers: TDADataSource
DataSet = tbl_Customers.Dataset
DataTable = tbl_Customers
Left = 136
Top = 144
end
object tbl_Orders: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'OrderID'
DataType = datInteger
BlobType = dabtUnknown
LogChanges = False
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'EmployeeID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OrderDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'RequiredDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShippedDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipVia'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Freight'
DataType = datFloat
BlobType = dabtUnknown
DefaultValue = '0'
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipAddress'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCity'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipRegion'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipPostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCountry'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
LocalDataStreamer = DataStreamer
MasterSource = ds_Customers
MasterFields = 'CustomerID'
DetailFields = 'CustomerID'
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Orders'
IndexDefs = <>
Left = 184
Top = 192
end
object ds_Orders: TDADataSource
DataSet = tbl_Orders.Dataset
DataTable = tbl_Orders
Left = 136
Top = 192
end
end

View File

@ -0,0 +1,36 @@
unit BriefcaseModelClientData;
interface
uses
{vcl:} SysUtils, Classes, DB, DBClient,
{RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
{Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
uDACDSDataTable, uDAClasses;
type
TBriefcaseModelClientDataModule = class(TDataModule)
Message: TROBinMessage;
Channel: TROWinInetHTTPChannel;
RemoteService: TRORemoteService;
DataStreamer: TDABinDataStreamer;
RemoteDataAdapter: TDARemoteDataAdapter;
tbl_Customers: TDACDSDataTable;
ds_Customers: TDADataSource;
tbl_Orders: TDACDSDataTable;
ds_Orders: TDADataSource;
private
{ Private declarations }
public
{ Public declarations }
end;
var
BriefcaseModelClientDataModule: TBriefcaseModelClientDataModule;
implementation
{$R *.dfm}
end.

View File

@ -0,0 +1,131 @@
object BriefcaseModelClientMainForm: TBriefcaseModelClientMainForm
Left = 85
Top = 124
AutoScroll = False
Caption = 'Briefcase Model Client'
ClientHeight = 398
ClientWidth = 567
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 215
Width = 567
Height = 5
Cursor = crVSplit
Align = alBottom
Beveled = True
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 567
Height = 34
Align = alTop
TabOrder = 0
object OpenButton: TButton
Left = 10
Top = 7
Width = 90
Height = 22
Caption = 'Fetch Data'
TabOrder = 0
OnClick = OpenButtonClick
end
object ApplyUpdateButton: TButton
Left = 101
Top = 7
Width = 90
Height = 22
Action = ApplyUpdateAction
TabOrder = 1
end
object DiscardChangesButton: TButton
Left = 192
Top = 7
Width = 90
Height = 22
Action = DiscardChangesAction
TabOrder = 2
end
object ShowChangesButton: TButton
Left = 283
Top = 7
Width = 90
Height = 22
Action = ShowChangesAction
TabOrder = 3
end
end
object gCustomers: TDBGrid
Left = 0
Top = 59
Width = 567
Height = 156
Align = alClient
DataSource = BriefcaseModelClientDataModule.ds_Customers
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object gOrders: TDBGrid
Left = 0
Top = 220
Width = 567
Height = 153
Align = alBottom
DataSource = BriefcaseModelClientDataModule.ds_Orders
TabOrder = 2
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object dbnCustomers: TDBNavigator
Left = 0
Top = 34
Width = 567
Height = 25
DataSource = BriefcaseModelClientDataModule.ds_Customers
Align = alTop
TabOrder = 3
end
object dbnOrders: TDBNavigator
Left = 0
Top = 373
Width = 567
Height = 25
DataSource = BriefcaseModelClientDataModule.ds_Orders
Align = alBottom
TabOrder = 4
end
object ActionList1: TActionList
Left = 337
Top = 87
object ApplyUpdateAction: TAction
Caption = 'Apply update'
OnExecute = ApplyUpdateButtonClick
OnUpdate = ApplyUpdateActionUpdate
end
object DiscardChangesAction: TAction
Caption = 'Discard changes'
OnExecute = DiscardChangesButtonClick
OnUpdate = ApplyUpdateActionUpdate
end
object ShowChangesAction: TAction
Caption = 'Show changes'
OnExecute = ShowChangesButtonClick
OnUpdate = ApplyUpdateActionUpdate
end
end
end

View File

@ -0,0 +1,140 @@
unit BriefcaseModelClientMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
DBCtrls, Grids, DBGrids, ActnList;
type
TBriefcaseModelClientMainForm = class(TForm)
Panel1: TPanel;
gCustomers: TDBGrid;
gOrders: TDBGrid;
dbnCustomers: TDBNavigator;
dbnOrders: TDBNavigator;
Splitter1: TSplitter;
OpenButton: TButton;
ApplyUpdateButton: TButton;
DiscardChangesButton: TButton;
ShowChangesButton: TButton;
ActionList1: TActionList;
ApplyUpdateAction: TAction;
DiscardChangesAction: TAction;
ShowChangesAction: TAction;
procedure ApplyUpdateButtonClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure OpenButtonClick(Sender: TObject);
procedure DiscardChangesButtonClick(Sender: TObject);
procedure ShowChangesButtonClick(Sender: TObject);
procedure ApplyUpdateActionUpdate(Sender: TObject);
private
{ Private declarations }
procedure Load;
procedure Save;
procedure FetchData;
public
{ Public declarations }
end;
var
BriefcaseModelClientMainForm: TBriefcaseModelClientMainForm;
implementation
uses
BriefcaseModelClientData, uDADataTable, BriefcaseModelClientChanges;
{$R *.dfm}
procedure TBriefcaseModelClientMainForm.ApplyUpdateButtonClick(Sender: TObject);
begin
BriefcaseModelClientDataModule.RemoteDataAdapter.ApplyUpdates([BriefcaseModelClientDataModule.tbl_Customers]);
end;
procedure TBriefcaseModelClientMainForm.Load;
function loadTable(ATable: TDADataTable): Boolean;
var
aFileName: string;
begin
aFileName := ExtractFilePath(Application.ExeName) + ATable.LogicalName + '.table';
if FileExists(aFileName) then begin
aTable.LoadFromFile(aFileName);
Result := True;
end else
Result := False;
end;
begin
if not loadTable(BriefcaseModelClientDataModule.tbl_Customers) or not loadTable(BriefcaseModelClientDataModule.tbl_Orders) then begin
if MessageDlg('No data table files could be found, do you want to fetch the data from the server?', mtConfirmation, [mbYes, mbNo], 0) = idYes then begin
FetchData;
end;
end;
end;
procedure TBriefcaseModelClientMainForm.Save;
procedure SaveTable(ATable: TDADataTable);
begin
with ATable do
if active then
SaveToFile(ExtractFilePath(Application.ExeName) + LogicalName + '.table');
end;
begin
with BriefcaseModelClientDataModule do begin
SaveTable(tbl_Customers);
SaveTable(tbl_Orders);
end;
end;
procedure TBriefcaseModelClientMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Save;
end;
procedure TBriefcaseModelClientMainForm.FormCreate(Sender: TObject);
begin
Load;
end;
procedure TBriefcaseModelClientMainForm.OpenButtonClick(Sender: TObject);
begin
FetchData;
end;
procedure TBriefcaseModelClientMainForm.FetchData;
begin
BriefcaseModelClientDataModule.tbl_Orders.close;
BriefcaseModelClientDataModule.tbl_Customers.close;
BriefcaseModelClientDataModule.RemoteDataAdapter.Fill([BriefcaseModelClientDataModule.tbl_Customers,
BriefcaseModelClientDataModule.tbl_Orders], true, false);
end;
procedure TBriefcaseModelClientMainForm.DiscardChangesButtonClick(Sender: TObject);
begin
with BriefcaseModelClientDataModule do begin
tbl_Customers.CancelUpdates;
end;
end;
procedure TBriefcaseModelClientMainForm.ShowChangesButtonClick(Sender: TObject);
begin
ShowChanges;
end;
procedure TBriefcaseModelClientMainForm.ApplyUpdateActionUpdate(
Sender: TObject);
begin
with BriefcaseModelClientDataModule do
TAction(Sender).Enabled :=
(tbl_Customers.DeltaInitialized) and ((tbl_Customers.Delta.Count > 0)) or
(tbl_Orders.DeltaInitialized) and ((tbl_Orders.Delta.Count > 0))
end;
end.

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Library Name="BriefcaseModelLibrary" UID="{0C6D69E2-2FEC-49FE-B07B-EE237D69F422}" Version="3.0">
<Services>
<Service Name="BriefcaseModelService" UID="{0FB8B88C-31CC-4924-83DB-FE1DFBA86D57}" Ancestor="DataAbstractService">
<Interfaces>
<Interface Name="Default" UID="{DF3E1E54-2924-4DE3-9834-4B225408D09F}">
<Operations>
</Operations>
</Interface>
</Interfaces>
</Service>
</Services>
<Structs>
</Structs>
<Enums>
</Enums>
<Arrays>
</Arrays>
<Uses>
<Use Name="DataAbstract" UID="{128BE099-ECFA-4936-B507-7CA35F6ADD66}" Rodl="$(Data Abstract for Delphi)\Source\DataAbstract4.RODL">
</Use></Uses>
</Library>

View File

@ -0,0 +1,77 @@
unit BriefcaseModelLibrary_Intf;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, TypInfo,
{RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
{Used RODLs:} DataAbstract4_Intf;
const
{ Library ID }
LibraryUID = '{0C6D69E2-2FEC-49FE-B07B-EE237D69F422}';
TargetNamespace = '';
{ Service Interface ID's }
IBriefcaseModelService_IID : TGUID = '{DF3E1E54-2924-4DE3-9834-4B225408D09F}';
{ Event ID's }
type
{ Forward declarations }
IBriefcaseModelService = interface;
{ IBriefcaseModelService }
IBriefcaseModelService = interface(IDataAbstractService)
['{DF3E1E54-2924-4DE3-9834-4B225408D09F}']
end;
{ CoBriefcaseModelService }
CoBriefcaseModelService = class
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBriefcaseModelService;
end;
{ TBriefcaseModelService_Proxy }
TBriefcaseModelService_Proxy = class(TDataAbstractService_Proxy, IBriefcaseModelService)
protected
function __GetInterfaceName:string; override;
end;
implementation
uses
{vcl:} SysUtils,
{RemObjects:} uROEventRepository, uRORes;
{ CoBriefcaseModelService }
class function CoBriefcaseModelService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBriefcaseModelService;
begin
result := TBriefcaseModelService_Proxy.Create(aMessage, aTransportChannel);
end;
function TBriefcaseModelService_Proxy.__GetInterfaceName:string;
begin
result := 'BriefcaseModelService';
end;
initialization
RegisterProxyClass(IBriefcaseModelService_IID, TBriefcaseModelService_Proxy);
finalization
UnregisterProxyClass(IBriefcaseModelService_IID);
end.

View File

@ -0,0 +1,32 @@
unit BriefcaseModelLibrary_Invk;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes,
{RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Used RODL Intf's:} DataAbstract4_Intf,
{Used RODL Invk's:} DataAbstract4_Invk,
{Generated:} BriefcaseModelLibrary_Intf;
type
TBriefcaseModelService_Invoker = class(TDataAbstractService_Invoker)
private
protected
published
end;
implementation
uses
{RemObjects:} uRORes, uROClient;
end.

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{814985E4-2D7E-4B43-B1B8-2C026284B033}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BriefcaseModelServer.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,24 @@
program BriefcaseModelServer;
{#ROGEN:BriefcaseModelLibrary.RODL} // RemObjects SDK: Careful, do not remove!
uses
uROComInit,
uROComboService,
Forms,
BriefcaseModelServerMain in 'BriefcaseModelServerMain.pas' {BriefcaseModelServerMainForm},
BriefcaseModelServerData in 'BriefcaseModelServerData.pas' {BriefcaseModelServerDataModule: TDataModule},
BriefcaseModelLibrary_Intf in 'BriefcaseModelLibrary_Intf.pas',
BriefcaseModelLibrary_Invk in 'BriefcaseModelLibrary_Invk.pas',
BriefcaseModelService_Impl in 'BriefcaseModelService_Impl.pas' {BriefcaseModelService: TDataAbstractService};
{$R *.res}
{$R RODLFile.res}
begin
Application.Initialize;
Application.Title := 'Briefcase Model Server';
Application.CreateForm(TBriefcaseModelServerDataModule, BriefcaseModelServerDataModule);
Application.CreateForm(TBriefcaseModelServerMainForm, BriefcaseModelServerMainForm);
Application.Run;
end.

View File

@ -0,0 +1,80 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{55d87c1e-5021-4276-a4c8-aef5b2fb31d9}</ProjectGuid>
<MainSource>BriefcaseModelServer.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BriefcaseModelServer.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BriefcaseModelServer.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BriefcaseModelServer.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BriefcaseModelLibrary_Intf.pas" />
<DCCReference Include="BriefcaseModelLibrary_Invk.pas" />
<DCCReference Include="BriefcaseModelServerData.pas">
<Form>BriefcaseModelServerDataModule</Form>
</DCCReference>
<DCCReference Include="BriefcaseModelServerMain.pas">
<Form>BriefcaseModelServerMainForm</Form>
</DCCReference>
<DCCReference Include="BriefcaseModelService_Impl.pas">
<Form>BriefcaseModelService</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,60 @@
object BriefcaseModelServerDataModule: TBriefcaseModelServerDataModule
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 226
Top = 160
Height = 207
Width = 352
object Server: TROIndyHTTPServer
Dispatchers = <
item
Name = 'Message'
Message = Message
Enabled = True
PathInfo = 'Bin'
end>
Port = 8099
Left = 32
Top = 8
end
object Message: TROBinMessage
Left = 32
Top = 56
end
object ConnectionManager: TDAConnectionManager
Connections = <
item
Name = 'Northwind'
ConnectionString =
'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
'egrated Security=SSPI'
Description = 'Microsoft SQL Server 2000, localhost'
Default = True
Tag = 0
end>
DriverManager = DriverManager
PoolingEnabled = True
Left = 136
Top = 56
end
object DriverManager: TDADriverManager
DriverDirectory = '%SYSTEM%\'
TraceActive = False
TraceFlags = []
Left = 136
Top = 10
end
object ADODriver: TDAADODriver
Left = 256
Top = 8
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 32
Top = 104
end
object SessionManager: TROInMemorySessionManager
Left = 136
Top = 104
end
end

View File

@ -0,0 +1,41 @@
unit BriefcaseModelServerData;
interface
uses
SysUtils, Classes,
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
uROBinMessage, uROIndyHTTPServer,
uDAEngine, uDADriverManager, uDAClasses, uROSessions,
uDAADODriver, uROIndyTCPServer;
type
TBriefcaseModelServerDataModule = class(TDataModule)
Server: TROIndyHTTPServer;
Message: TROBinMessage;
ConnectionManager: TDAConnectionManager;
DriverManager: TDADriverManager;
ADODriver: TDAADODriver;
SessionManager: TROInMemorySessionManager;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BriefcaseModelServerDataModule: TBriefcaseModelServerDataModule;
implementation
{$R *.dfm}
procedure TBriefcaseModelServerDataModule.DataModuleCreate(Sender: TObject);
begin
Server.Active := true;
end;
end.

View File

@ -0,0 +1,21 @@
object BriefcaseModelServerMainForm: TBriefcaseModelServerMainForm
Left = 185
Top = 138
BorderStyle = bsDialog
Caption = 'Briefcase Model Server'
ClientHeight = 64
ClientWidth = 228
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
Left = 8
Top = 8
Width = 212
Height = 48
Cursor = crHandPoint
end
end

View File

@ -0,0 +1,25 @@
unit BriefcaseModelServerMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
type
TBriefcaseModelServerMainForm = class(TForm)
DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
BriefcaseModelServerMainForm: TBriefcaseModelServerMainForm;
implementation
{$R *.dfm}
end.

View File

@ -0,0 +1,500 @@
object BriefcaseModelService: TBriefcaseModelService
OldCreateOrder = True
SessionManager = BriefcaseModelServerDataModule.SessionManager
ServiceSchema = Schema
ServiceDataStreamer = DataStreamer
ExportedDataTables = <>
Left = 196
Top = 147
Height = 164
Width = 174
object Schema: TDASchema
ConnectionManager = BriefcaseModelServerDataModule.ConnectionManager
DataDictionary = BriefcaseModelServerDataModule.DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'Northwind'
Default = True
TargetTable = 'Customers'
SQL =
'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
#10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
#10' FROM'#10' Customers'
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'CustomerID'
TableField = 'CustomerID'
end
item
DatasetField = 'CompanyName'
TableField = 'CompanyName'
end
item
DatasetField = 'ContactName'
TableField = 'ContactName'
end
item
DatasetField = 'ContactTitle'
TableField = 'ContactTitle'
end
item
DatasetField = 'Address'
TableField = 'Address'
end
item
DatasetField = 'City'
TableField = 'City'
end
item
DatasetField = 'Region'
TableField = 'Region'
end
item
DatasetField = 'PostalCode'
TableField = 'PostalCode'
end
item
DatasetField = 'Country'
TableField = 'Country'
end
item
DatasetField = 'Phone'
TableField = 'Phone'
end
item
DatasetField = 'Fax'
TableField = 'Fax'
end>
end>
Name = 'Customers'
Fields = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CompanyName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactName'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactTitle'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Address'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'City'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Region'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Country'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Phone'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Fax'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end
item
Params = <>
Statements = <
item
Connection = 'Northwind'
Default = True
TargetTable = 'Orders'
SQL =
'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
' Orders'#10#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'OrderID'
TableField = 'OrderID'
end
item
DatasetField = 'CustomerID'
TableField = 'CustomerID'
end
item
DatasetField = 'EmployeeID'
TableField = 'EmployeeID'
end
item
DatasetField = 'OrderDate'
TableField = 'OrderDate'
end
item
DatasetField = 'RequiredDate'
TableField = 'RequiredDate'
end
item
DatasetField = 'ShippedDate'
TableField = 'ShippedDate'
end
item
DatasetField = 'ShipVia'
TableField = 'ShipVia'
end
item
DatasetField = 'Freight'
TableField = 'Freight'
end
item
DatasetField = 'ShipName'
TableField = 'ShipName'
end
item
DatasetField = 'ShipAddress'
TableField = 'ShipAddress'
end
item
DatasetField = 'ShipCity'
TableField = 'ShipCity'
end
item
DatasetField = 'ShipRegion'
TableField = 'ShipRegion'
end
item
DatasetField = 'ShipPostalCode'
TableField = 'ShipPostalCode'
end
item
DatasetField = 'ShipCountry'
TableField = 'ShipCountry'
end>
end>
Name = 'Orders'
Fields = <
item
Name = 'OrderID'
DataType = datInteger
BlobType = dabtUnknown
LogChanges = False
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'EmployeeID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OrderDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'RequiredDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShippedDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipVia'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Freight'
DataType = datFloat
BlobType = dabtUnknown
DefaultValue = '0'
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipAddress'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCity'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipRegion'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipPostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCountry'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <>
RelationShips = <
item
Name = 'FK_Orders_Customers'
MasterDatasetName = 'Customers'
MasterFields = 'CustomerID'
DetailDatasetName = 'Orders'
DetailFields = 'CustomerID'
RelationshipType = rtForeignKey
end>
UpdateRules = <>
Version = 0
Left = 32
Top = 56
end
object DataStreamer: TDABinDataStreamer
BufferSize = 262144
IsCompatibleV4 = True
Left = 32
Top = 8
end
end

View File

@ -0,0 +1,48 @@
unit BriefcaseModelService_Impl;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Required:} uRORemoteDataModule,
{Ancestor Implementation:} DataAbstractService_Impl,
{Used RODLs:} DataAbstract4_Intf,
{Generated:} BriefcaseModelLibrary_Intf, uDADataStreamer, uDABinAdapter,
uDAClasses;
type
{ TBriefcaseModelService }
TBriefcaseModelService = class(TDataAbstractService, IBriefcaseModelService)
DataStreamer: TDABinDataStreamer;
Schema: TDASchema;
private
protected
{ IBriefcaseModelService methods }
end;
implementation
{$R *.dfm}
uses
{Generated:} BriefcaseModelLibrary_Invk,BriefcaseModelServerData;
procedure Create_BriefcaseModelService(out anInstance : IUnknown);
begin
anInstance := TBriefcaseModelService.Create(nil);
end;
{ BriefcaseModelService }
initialization
TROClassFactory.Create('BriefcaseModelService', Create_BriefcaseModelService, TBriefcaseModelService_Invoker);
finalization
end.

View File

@ -0,0 +1,171 @@
unit BizSchemaClient;
interface
uses
Classes,
SchemaClient_Intf;
type
IBizCustomers = interface(ICustomers)
['{63BAECDD-6091-4A86-BA58-E6FFD5330240}']
end;
TBizCustomersDataTableRules = class(TCustomersDataTableRules, IBizCustomers)
end;
IBizOrders = interface(IOrders)
['{E43D1B71-EEF0-4805-9F1E-EE032353BD0F}']
end;
TBizOrdersDataTableRules = class(TOrdersDataTableRules, IBizOrders)
end;
TBizErrorMessageItem = class
public
Field: string;
ErrorMessage: string;
end;
TBizErrorMessage = class
private
FMessage: string;
FList: TList;
function GetItems(Index: integer): TBizErrorMessageItem;
function GetCount: integer;
function GetAsString: string;
procedure SetAsString(const Value: string);
public
constructor Create;
destructor Destroy; override;
function Add(AField: string; AErrorMessage: string): integer;
procedure Clear;
property ItemCount: integer read GetCount;
property Message: string read FMessage write FMessage;
property Items[Index: integer]: TBizErrorMessageItem read GetItems;
property AsString: string read GetAsString write SetAsString;
end;
implementation
uses uDADataTable, Variants;
{ TBizErrorMessage }
function TBizErrorMessage.Add(AField: string; AErrorMessage: string): integer;
var
Aitem: TBizErrorMessageItem;
begin
Aitem := TBizErrorMessageItem.Create;
Aitem.Field := AField;
Aitem.ErrorMessage := AErrorMessage;
Result := FList.Add(AItem);
end;
procedure TBizErrorMessage.Clear;
var
i: integer;
begin
for i := 0 to Flist.Count - 1 do
TBizErrorMessageItem(FList[i]).Free;
FList.Clear;
end;
constructor TBizErrorMessage.Create;
begin
inherited;
FList := TList.Create;
end;
destructor TBizErrorMessage.Destroy;
begin
Clear;
Flist.Free;
inherited;
end;
function TBizErrorMessage.GetAsString: string;
procedure WriteStringToStream(Str: string; Stream: TMemoryStream);
var
size: LongInt;
begin
size := Length(Str)*sizeof(char);
stream.Write(size, Sizeof(LongInt));
stream.Write(Str[1], size);
end;
var
Stream: TMemoryStream;
cnt: integer;
i: integer;
begin
Stream := TMemoryStream.Create();
try
cnt := Length(Message);
i := Stream.Write(Message[1], cnt*SizeOf(char));
i := 0;
stream.Write(i, sizeof(i));
cnt := GetCount;
stream.Write(cnt, SizeOf(cnt));
for i := 0 to cnt - 1 do
with Items[i] do begin
WriteStringToStream(Field, Stream);
WriteStringToStream(ErrorMessage, Stream);
end;
SetLength(Result, Stream.Size div sizeof(char));
Stream.Seek(0, soFromBeginning);
i := Stream.Read(Result[1], Stream.Size);
finally
Stream.Free;
end;
end;
function TBizErrorMessage.GetCount: integer;
begin
Result := FList.Count;
end;
function TBizErrorMessage.GetItems(Index: integer): TBizErrorMessageItem;
begin
Result := TBizErrorMessageItem(FList[Index]);
end;
procedure TBizErrorMessage.SetAsString(const Value: string);
function ReadStringToStream(Stream: TMemoryStream): string;
var
Size: LongInt;
begin
stream.Read(size, Sizeof(size));
SetLength(result, Size div SizeOf(char));
stream.Read(Result[1], size);
end;
var
Stream: TMemoryStream;
i, cnt: integer;
begin
Clear;
Stream := TMemoryStream.Create();
cnt := Length(Value)*SizeOf(char);
Stream.Write(Value[1], cnt);
try
Message := Pchar(Value);
if Stream.Size < Length(Message)*SizeOf(char) + sizeof(integer) then exit;
Stream.Seek(Length(Message)*SizeOf(char) + sizeof(integer), soFromBeginning);
stream.Read(cnt, SizeOf(cnt));
for i := 0 to cnt - 1 do
with Items[Add('', '')] do begin
Field := ReadStringToStream(Stream);
ErrorMessage := ReadStringToStream(Stream);
end;
finally
Stream.Free;
end;
end;
initialization
RegisterDataTableRules('Customers.ClientRules', TBizCustomersDataTableRules);
RegisterDataTableRules('Orders.ClientRules', TBizOrdersDataTableRules);
end.

View File

@ -0,0 +1,128 @@
unit BizSchemaServer;
interface
uses Classes, SysUtils, uDADataTable, uDABusinessProcessor,
SchemaServer_Intf, BizSchemaClient, uDADelta, uDAInterfaces;
type
TBizCustomersServerRules = class(TCustomersBusinessProcessorRules)
protected
// Business events
procedure BeforeProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean); override;
procedure ProcessError(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange;
const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean; Error: Exception); override;
end;
TBizOrdersServerRules = class(TOrdersBusinessProcessorRules)
protected
// Business events
procedure BeforeProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean); override;
procedure ProcessError(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange;
const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean; Error: Exception); override;
end;
implementation
uses
ServerGlobal, dialogs;
{ TBizCustomersServerRules }
function CheckCustomer(CustID: string): boolean;
var
i: integer;
begin
Result := False;
if Length(CustID) <> 5 then Exit;
for i := 1 to Length(CustID) do
if not (CustID[i] in ['A'..'Z', 'a'..'z']) then Exit;
Result := True;
end;
procedure TBizCustomersServerRules.BeforeProcessChange(Sender: TDABusinessProcessor;
aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean);
begin
inherited;
aChange.Message := '';
if (aChangeType = ctInsert) then begin
with TBizErrorMessage.Create do try
if gCheckCustomerID and not checkCustomer(CustomerID) then
Add('CustomerID', 'CustomerID needs at least 5 characters');
if gCompanyCheck and not SameText(CompanyName, gCompany) then
Add('CompanyName', 'Company name should be ' + gCompany);
finally
if ItemCount > 0 then begin
Message := 'Cannot process an insert ' + sLineBreak +
'(Customer = ''' + CustomerID + ''')';
aChange.Message := asString;
end;
Free;
end;
end;
if (aChangeType = ctDelete) and gDeclineDeleteCustomers then begin
with TBizErrorMessage.Create do try
Message := 'Deleting of customers is not allowed ' + sLineBreak +
'(Customer = ''' + OldCustomerID + ''')';
aChange.Message := asString;
finally
Free;
end;
end;
ProcessChange := aChange.Message = '';
if not ProcessChange then aChange.Status := csFailed;
end;
procedure TBizCustomersServerRules.ProcessError(
Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
aChange: TDADeltaChange; const aCommand: IDASQLCommand;
var CanRemoveFromDelta: boolean; Error: Exception);
begin
aChange.Message := Error.Message;
end;
{ TBizOrdersServerRules }
procedure TBizOrdersServerRules.BeforeProcessChange(
Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
aChange: TDADeltaChange; var ProcessChange: boolean);
begin
inherited;
aChange.Message := '';
if aChangeType <> ctDelete then
if gFreightCheck and (Freight < gFreight) then begin
with TBizErrorMessage.Create do try
Message := 'Cannot process operation ' + sLineBreak + '(OrderID = ' + intToStr(OrderID) + ')';
Add('Freight', 'Freight should be greater than ' + IntToStr(gFreight));
aChange.Message := asString;
finally
Free;
end;
end;
if (aChangeType = ctDelete) and gDeclineDeleteOrders then begin
with TBizErrorMessage.Create do try
Message := 'Deleting of orders is not allowed ' + sLineBreak +
'(OrderID = ''' + IntToStr(OldOrderID) + ''')';
aChange.Message := asString;
finally
Free;
end;
end;
ProcessChange := aChange.Message = '';
if not ProcessChange then aChange.Status := csFailed;
end;
procedure TBizOrdersServerRules.ProcessError(Sender: TDABusinessProcessor;
aChangeType: TDAChangeType; aChange: TDADeltaChange;
const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean;
Error: Exception);
begin
aChange.Message := Error.Message;
aChange.Status := csFailed;
end;
initialization
RegisterBusinessProcessorRules('Customers.ServerRules', TBizCustomersServerRules);
RegisterBusinessProcessorRules('Orders.ServerRules', TBizOrdersServerRules);
end.

View File

@ -0,0 +1,35 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="..\styles.css">
</head>
<body>
<img src="..\..\da.png" alt="" align="right">
<!-------------------------------------------------------------------------->
<p class="h1">
<span>Business Processor sample</span>
</p>
<h2>Purpose</h2>
<p>
This is a good example to show the advantages of a multi-tier architecture: systems can be updated via a server re-deploy without the need to update any client. Also,
the sample shows advanced handling on the client of any errors returned from the
server.
</p>
<h2>Examine the Code</h2>
<ul>
<li>
<b>BizSchemaServer.pas</b>: this unit contains the business rules handlers for the server application.
</li>
<li>
<b>BizSchemaClient.pas</b>: this unit contains the business rules handlers for the client application.<br>
</li>
</ul>
<!-------------------------------------------------------------------------->
</body>
</html>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Default.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{F5074962-16BE-403D-A040-81B66B387996}</Option>
</Option>
</PersonalityInfo>
<Default.Personality>
<Projects>
<Projects Name="BusinessProcessorServer.exe">BusinessProcessorServer.bdsproj</Projects>
<Projects Name="BusinessProcessorClient.exe">BusinessProcessorClient.bdsproj</Projects>
<Projects Name="Targets">BusinessProcessorServer.exe BusinessProcessorClient.exe</Projects>
</Projects>
<Dependencies/>
</Default.Personality>
</BorlandProject>

View File

@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = BusinessProcessorServer.exe BusinessProcessorClient.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
BusinessProcessorServer.exe: BusinessProcessorServer.dpr
$(DCC)
BusinessProcessorClient.exe: BusinessProcessorClient.dpr
$(DCC)

View File

@ -0,0 +1,40 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{e64b5502-8847-4dd5-8e67-4e6d0176cf50}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup />
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="BusinessProcessorServer">
<MSBuild Projects="BusinessProcessorServer.dproj" Targets="" />
</Target>
<Target Name="BusinessProcessorServer:Clean">
<MSBuild Projects="BusinessProcessorServer.dproj" Targets="Clean" />
</Target>
<Target Name="BusinessProcessorServer:Make">
<MSBuild Projects="BusinessProcessorServer.dproj" Targets="Make" />
</Target>
<Target Name="BusinessProcessorClient">
<MSBuild Projects="BusinessProcessorClient.dproj" Targets="" />
</Target>
<Target Name="BusinessProcessorClient:Clean">
<MSBuild Projects="BusinessProcessorClient.dproj" Targets="Clean" />
</Target>
<Target Name="BusinessProcessorClient:Make">
<MSBuild Projects="BusinessProcessorClient.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="BusinessProcessorServer;BusinessProcessorClient" />
</Target>
<Target Name="Clean">
<CallTarget Targets="BusinessProcessorServer:Clean;BusinessProcessorClient:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="BusinessProcessorServer:Make;BusinessProcessorClient:Make" />
</Target>
</Project>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{6B208CB8-98D9-44F2-A556-E88D6F03DE32}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BusinessProcessorClient.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,20 @@
program BusinessProcessorClient;
uses
uROComInit,
Forms,
MidasLib,
BusinessProcessorClientMain in 'BusinessProcessorClientMain.pas' {BusinessProcessorClientMainForm},
BusinessProcessorClientData in 'BusinessProcessorClientData.pas' {BusinessProcessorClientDataModule: TDAClientDataModule},
BizSchemaClient in 'BizSchemaClient.pas',
BusinessProcessorClientUnit1 in 'BusinessProcessorClientUnit1.pas' {BusinessProcessorClientForm2};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TBusinessProcessorClientDataModule, BusinessProcessorClientDataModule);
Application.CreateForm(TBusinessProcessorClientMainForm, BusinessProcessorClientMainForm);
Application.Run;
end.

View File

@ -0,0 +1,79 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{701a77fa-871d-41bc-ab21-ba2b8d978e5b}</ProjectGuid>
<MainSource>BusinessProcessorClient.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BusinessProcessorClient.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BusinessProcessorClient.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BusinessProcessorClient.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BizSchemaClient.pas" />
<DCCReference Include="BusinessProcessorClientData.pas">
<Form>BusinessProcessorClientDataModule</Form>
</DCCReference>
<DCCReference Include="BusinessProcessorClientMain.pas">
<Form>BusinessProcessorClientMainForm</Form>
</DCCReference>
<DCCReference Include="BusinessProcessorClientUnit1.pas">
<Form>BusinessProcessorClientForm2</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,422 @@
object BusinessProcessorClientDataModule: TBusinessProcessorClientDataModule
OldCreateOrder = True
Left = 345
Top = 206
Height = 266
Width = 184
object Channel: TROWinInetHTTPChannel
UserAgent = 'RemObjects SDK'
TargetURL = 'http://localhost:8099/BIN'
ServerLocators = <>
DispatchOptions = []
Left = 40
Top = 8
end
object Message: TROBinMessage
Left = 40
Top = 52
end
object RemoteService: TRORemoteService
Message = Message
Channel = Channel
ServiceName = 'BusinessProcessorService'
Left = 40
Top = 96
end
object DataStreamer: TDABinDataStreamer
BufferSize = 262144
Left = 40
Top = 140
end
object RemoteDataAdapter: TDARemoteDataAdapter
GetSchemaCall.RemoteService = RemoteService
GetDataCall.RemoteService = RemoteService
UpdateDataCall.RemoteService = RemoteService
GetScriptsCall.RemoteService = RemoteService
RemoteService = RemoteService
DataStreamer = DataStreamer
FailureBehavior = fbShowReconcile
OnGenerateRecordMessage = RemoteDataAdapterGenerateRecordMessage
OnShowReconcileRecordInAppUI = RemoteDataAdapterShowReconcileRecordInAppUI
Left = 40
Top = 184
end
object tbl_Customers: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CompanyName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactName'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactTitle'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Address'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'City'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Region'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Country'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Phone'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Fax'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Customers'
BusinessRulesID = 'Customers.ClientRules'
IndexDefs = <>
Left = 89
Top = 100
end
object ds_Customers: TDADataSource
DataSet = tbl_Customers.Dataset
DataTable = tbl_Customers
Left = 118
Top = 99
end
object tbl_Orders: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'OrderID'
DataType = datInteger
BlobType = dabtUnknown
LogChanges = False
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'EmployeeID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OrderDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'RequiredDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShippedDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipVia'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Freight'
DataType = datFloat
BlobType = dabtUnknown
DefaultValue = '0'
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipAddress'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCity'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipRegion'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipPostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCountry'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
ServerCalculated = False
Lookup = False
LookupCache = False
end>
Params = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Value = 'ALFKI'
ParamType = daptUnknown
end>
MasterParamsMappings.Strings = (
'CustomerID=CustomerID')
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
MasterSource = ds_Customers
MasterFields = 'CustomerID'
DetailFields = 'CustomerID'
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Orders'
BusinessRulesID = 'Orders.ClientRules'
IndexDefs = <>
Left = 99
Top = 151
end
object ds_Orders: TDADataSource
DataSet = tbl_Orders.Dataset
DataTable = tbl_Orders
Left = 128
Top = 149
end
end

View File

@ -0,0 +1,86 @@
unit BusinessProcessorClientData;
interface
uses
{vcl:} SysUtils, Classes, DB, DBClient, Variants,
{RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
{Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
uDACDSDataTable, uDADelta;
type
TBusinessProcessorClientDataModule = class(TDataModule)
Message: TROBinMessage;
Channel: TROWinInetHTTPChannel;
RemoteService: TRORemoteService;
DataStreamer: TDABinDataStreamer;
RemoteDataAdapter: TDARemoteDataAdapter;
tbl_Customers: TDACDSDataTable;
ds_Customers: TDADataSource;
tbl_Orders: TDACDSDataTable;
ds_Orders: TDADataSource;
procedure RemoteDataAdapterGenerateRecordMessage(Sender: TObject;
aChange: TDADeltaChange; ADatatable: TDADataTable;
var aMessage: string);
procedure RemoteDataAdapterShowReconcileRecordInAppUI(Sender: TObject;
aChange: TDADeltaChange; aDatatable: TDADataTable;
var aHandled: Boolean; var aAction: TDAReconcileDialogAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessProcessorClientDataModule: TBusinessProcessorClientDataModule;
implementation
uses BusinessProcessorClientUnit1;
{$R *.dfm}
procedure TBusinessProcessorClientDataModule.RemoteDataAdapterGenerateRecordMessage(
Sender: TObject; aChange: TDADeltaChange; ADatatable: TDADataTable;
var aMessage: string);
var
i: integer;
begin
aMessage := 'A problem occured while ';
case achange.ChangeType of
ctInsert: aMessage := aMessage + 'inserting';
ctUpdate: aMessage := aMessage + 'updating';
ctDelete: aMessage := aMessage + 'deleting';
end;
aMessage := aMessage + ' a record in table "' + ADatatable.LogicalName + '"';
if ADatatable = tbl_Customers then begin
aMessage := aMessage + ' , CustomerID = ''';
if aChange.ChangeType = ctInsert then
aMessage := aMessage + VarToStr(aChange.NewValueByName['CustomerID']) + ''''
else
aMessage := aMessage + VarToStr(aChange.OldValueByName['CustomerID']) + '''';
end
else begin
aMessage := aMessage + ' , OrderID = ''';
if aChange.ChangeType = ctInsert then
aMessage := aMessage + VarToStr(aChange.NewValueByName['OrderID']) + ''''
else
aMessage := aMessage + VarToStr(aChange.OldValueByName['OrderID']) + '''';
end;
i := pos(sLineBreak, aChange.Message);
if i = 0 then
aMessage := aMessage + sLineBreak + sLineBreak + aChange.Message
else
aMessage := aMessage + sLineBreak + sLineBreak + copy(aChange.Message, 1, i - 1);
end;
procedure TBusinessProcessorClientDataModule.RemoteDataAdapterShowReconcileRecordInAppUI(
Sender: TObject; aChange: TDADeltaChange; aDatatable: TDADataTable;
var aHandled: Boolean; var aAction: TDAReconcileDialogAction);
begin
BusinessProcessorClientUnit1.ReconcileDialogShowDetails(aChange, ADatatable, AAction);
AHandled := True;
end;
end.

View File

@ -0,0 +1,130 @@
object BusinessProcessorClientMainForm: TBusinessProcessorClientMainForm
Left = 320
Top = 215
AutoScroll = False
Caption = 'BusinessProcessor Client'
ClientHeight = 414
ClientWidth = 624
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 266
Width = 624
Height = 3
Cursor = crVSplit
Align = alBottom
end
object gCustomers: TDBGrid
Left = 0
Top = 58
Width = 624
Height = 208
Align = alClient
DataSource = BusinessProcessorClientDataModule.ds_Customers
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object dbnCustomers: TDBNavigator
Left = 0
Top = 33
Width = 624
Height = 25
DataSource = BusinessProcessorClientDataModule.ds_Customers
Align = alTop
TabOrder = 1
end
object Button1: TButton
Left = 13
Top = 8
Width = 75
Height = 25
Caption = 'Open'
TabOrder = 2
OnClick = Button1Click
end
object Button2: TButton
Left = 91
Top = 7
Width = 75
Height = 25
Caption = 'Button2'
TabOrder = 3
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 624
Height = 33
Align = alTop
BevelOuter = bvNone
TabOrder = 4
object ApplyUpdateButton: TButton
Left = 92
Top = 6
Width = 74
Height = 25
Caption = 'Apply Update'
TabOrder = 0
OnClick = ApplyUpdateButtonClick
end
object OpenButton: TButton
Left = 13
Top = 6
Width = 75
Height = 25
Caption = 'Open/Close'
TabOrder = 1
OnClick = Button1Click
end
object CreateCustomerButton: TButton
Left = 222
Top = 6
Width = 95
Height = 25
Caption = 'Create customer'
TabOrder = 2
OnClick = CreateCustomerButtonClick
end
object CreateOrderButton: TButton
Left = 322
Top = 6
Width = 75
Height = 25
Caption = 'Create order'
TabOrder = 3
OnClick = CreateOrderButtonClick
end
end
object gOrders: TDBGrid
Left = 0
Top = 269
Width = 624
Height = 120
Align = alBottom
DataSource = BusinessProcessorClientDataModule.ds_Orders
TabOrder = 5
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object dbnOrders: TDBNavigator
Left = 0
Top = 389
Width = 624
Height = 25
DataSource = BusinessProcessorClientDataModule.ds_Orders
Align = alBottom
TabOrder = 6
end
end

View File

@ -0,0 +1,77 @@
unit BusinessProcessorClientMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
DBCtrls, Grids, DBGrids;
type
TBusinessProcessorClientMainForm = class(TForm)
gCustomers: TDBGrid;
dbnCustomers: TDBNavigator;
Button1: TButton;
Button2: TButton;
Panel1: TPanel;
ApplyUpdateButton: TButton;
OpenButton: TButton;
gOrders: TDBGrid;
dbnOrders: TDBNavigator;
Splitter1: TSplitter;
CreateCustomerButton: TButton;
CreateOrderButton: TButton;
procedure Button1Click(Sender: TObject);
procedure ApplyUpdateButtonClick(Sender: TObject);
procedure CreateCustomerButtonClick(Sender: TObject);
procedure CreateOrderButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessProcessorClientMainForm: TBusinessProcessorClientMainForm;
implementation
uses
BusinessProcessorClientData, BizSchemaClient, SchemaClient_Intf;
{$R *.dfm}
procedure TBusinessProcessorClientMainForm.Button1Click(Sender: TObject);
begin
with BusinessProcessorClientDataModule.tbl_Customers do
Active := not Active;
end;
procedure TBusinessProcessorClientMainForm.ApplyUpdateButtonClick(Sender: TObject);
begin
with BusinessProcessorClientDataModule.tbl_Customers do
ApplyUpdates();
end;
procedure TBusinessProcessorClientMainForm.CreateCustomerButtonClick(Sender: TObject);
begin
with BusinessProcessorClientDataModule.tbl_Customers as IBizCustomers do begin
Insert;
CustomerID := 'test';
CompanyName := 'test company';
Post;
end;
end;
procedure TBusinessProcessorClientMainForm.CreateOrderButtonClick(Sender: TObject);
begin
with BusinessProcessorClientDataModule.tbl_Orders as IBizOrders do begin
Insert;
OrderID := 1;
Freight := 10;
Post;
end;
end;
end.

View File

@ -0,0 +1,82 @@
object BusinessProcessorClientForm2: TBusinessProcessorClientForm2
Left = 358
Top = 217
Width = 490
Height = 298
BorderIcons = [biSystemMenu]
Caption = 'Show Details'
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poOwnerFormCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object ScrollBox: TScrollBox
Left = 0
Top = 148
Width = 482
Height = 85
Align = alClient
BevelInner = bvNone
BevelOuter = bvNone
BorderStyle = bsNone
TabOrder = 0
end
object BottomPanel: TPanel
Left = 0
Top = 233
Width = 482
Height = 32
Align = alBottom
BevelOuter = bvNone
TabOrder = 1
DesignSize = (
482
32)
object OkButton: TButton
Left = 225
Top = 4
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = '&Ok'
Default = True
ModalResult = 1
TabOrder = 0
OnClick = OkButtonClick
end
object CancelButton: TButton
Left = 304
Top = 4
Width = 95
Height = 25
Anchors = [akRight, akBottom]
Caption = '&Cancel Change'
ModalResult = 2
TabOrder = 1
OnClick = CancelButtonClick
end
object CloseButton: TButton
Left = 404
Top = 4
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Cancel = True
Caption = 'Close'
ModalResult = 7
TabOrder = 2
OnClick = CancelButtonClick
end
end
object TopPanel: TPanel
Left = 0
Top = 0
Width = 482
Height = 148
Align = alTop
BevelOuter = bvNone
TabOrder = 2
end
end

View File

@ -0,0 +1,298 @@
unit BusinessProcessorClientUnit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, uDADelta, uDADataTable, DB, BizSchemaClient, uDARemoteDataAdapter;
type
TBusinessProcessorClientForm2 = class(TForm)
ScrollBox: TScrollBox;
BottomPanel: TPanel;
TopPanel: TPanel;
OkButton: TButton;
CancelButton: TButton;
CloseButton: TButton;
procedure FormCreate(Sender: TObject);
procedure OkButtonClick(Sender: TObject);
procedure CancelButtonClick(Sender: TObject);
private
{ Private declarations }
dbeditHeight, labelheight: integer;
FChange: TDADeltaChange;
Datasource: TDADataSource;
procedure Setup;
procedure GenerateControls;
procedure ApplyErrorMessage(BizErrorMessage: TBizErrorMessage);
procedure OnFieldValueChanged(Sender: TObject);
public
{ Public declarations }
end;
procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable;var AAction: TDAReconcileDialogAction);
implementation
uses
uDAInterfaces, uROClasses, dbCtrls;
{$R *.dfm}
const
labelWidth = 100;
editWidth = 200;
c_Color: TColor = clMoneyGreen;
procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable;var AAction: TDAReconcileDialogAction);
var
FFiltered: Boolean;
FMasterDS: TDADataSource;
FRemoteFetchEnabled: Boolean;
FMasterFields: string;
begin
with TBusinessProcessorClientForm2.Create(Application) do try
FChange := AChange;
FFiltered := ATable.Filtered;
FMasterDS := aTable.MasterSource;
FMasterFields := aTable.MasterFields;
FRemoteFetchEnabled := aTable.RemoteFetchEnabled;
try
ATable.Filtered := False;
aTable.MasterSource := nil;
aTable.MasterFields := '';
aTable.RemoteFetchEnabled := False;
DataSource.DataTable := aTable;
Setup;
case ShowModal() of
mrOk: AAction := rdlgSkip;
mrCancel: AAction := rdlgCancel;
else AAction := rdlgNone;
end;
finally
aTable.RemoteFetchEnabled := FRemoteFetchEnabled;
aTable.Filtered := FFiltered;
aTable.MasterSource := FMasterDS;
aTable.MasterFields := FMasterFields
end;
finally
Release;
end;
end;
{ TShowDetailsForm }
procedure TBusinessProcessorClientForm2.Setup;
var
BizErrorMessage: TBizErrorMessage;
begin
if FChange.ChangeType <> ctDelete then
with DataSource.DataTable do
if not Locate(RecIDFieldName, FChange.RecID, []) then RaiseError('Couldn''t find record #' + FormatRecIDString(FChange.RecID));
GenerateControls;
BizErrorMessage := TBizErrorMessage.Create;
try
BizErrorMessage.AsString := FChange.Message;
ApplyErrorMessage(BizErrorMessage);
finally
BizErrorMessage.Free;
end;
if Screen.Height > Self.Height + (ScrollBox.VertScrollBar.Range - ScrollBox.Height) then
Self.Height := Self.Height + (ScrollBox.VertScrollBar.Range - ScrollBox.Height)
else
Self.Height := Screen.Height;
case FChange.ChangeType of
ctInsert: OkButton.Caption := 'Skip';
ctUpdate: OkButton.Caption := 'Skip';
ctDelete: OkButton.Caption := 'Skip';
end;
end;
procedure TBusinessProcessorClientForm2.GenerateControls;
var
i: integer;
aField: string;
aTop, aleft: integer;
FLabel: TLabel;
FdbEdit: TDBEdit;
FEdit: TEdit;
begin
aleft := 7;
aTop := 7;
for i := 0 to FChange.Delta.LoggedFieldCount - 1 do begin
aField := FChange.Delta.LoggedFieldNames[i];
aTop := 7 + (3 + dbeditHeight) * i;
aleft := 7;
FLabel := TLabel.Create(Self);
with FLabel do begin
Parent := ScrollBox;
Name := 'l_' + aField;
Caption := aField;
Left := aleft;
Top := (dbeditHeight - Height) div 2 + aTop + 1;
Width := labelWidth;
aleft := aleft + 7 + labelWidth;
end;
if FChange.ChangeType in [ctInsert, ctUpdate] then begin
if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
FEdit := TEdit.Create(Self);
with FEdit do begin
Name := 'dbe_' + aField;
Parent := ScrollBox;
Left := aleft;
aleft := aleft + 7 + editWidth;
Top := aTop;
Width := editWidth;
ReadOnly := True;
Text := '[blob]';
end;
end
else begin
FdbEdit := TDBEdit.Create(Self);
with FdbEdit do begin
Name := 'dbe_' + aField;
DataSource := Self.DataSource;
Parent := ScrollBox;
DataField := aField;
Left := aleft;
Top := aTop;
Width := editWidth;
OnChange := OnFieldValueChanged;
aleft := aleft + 7 + editWidth;
if (FChange.ChangeType = ctUpdate) and
not ROVariantsEqual(FChange.OldValues[i], FChange.NewValues[i]) then
Color := c_Color;
end;
end;
end;
if FChange.ChangeType in [ctUpdate, ctDelete] then begin
FEdit := TEdit.Create(Self);
with FEdit do begin
Name := 'e_' + aField;
Parent := ScrollBox;
Left := aleft;
aleft := aleft + 7 + editWidth;
Top := aTop;
Width := editWidth;
ReadOnly := True;
Color := clBtnFace;
if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
Text := '[blob]'
end
else begin
case FChange.ChangeType of
ctDelete: text := VarToStr(FChange.OldValues[i]);
ctUpdate: begin
if not Self.DataSource.DataTable.HasReducedDelta then
text := VarToStr(FChange.OldValues[i])
else
if not VarIsEmpty(FChange.OldValues[i]) then
text := VarToStr(FChange.OldValues[i])
else text := Self.DataSource.DataTable.FieldByName(aField).AsString;
end;
end;
end;
end;
end;
end;
inc(aTop, 20);
inc(aLeft, 7);
//ScrollBox.HorzScrollBar.Range := aleft;
Self.ClientWidth := aleft + ScrollBox.VertScrollBar.Size + 2;
Self.Constraints.MinWidth := Self.Width;
Self.Constraints.MaxWidth := Self.Width;
ScrollBox.VertScrollBar.Range := aTop;
end;
procedure TBusinessProcessorClientForm2.FormCreate(Sender: TObject);
begin
inherited;
with TDBEdit.Create(Self) do try
dbeditHeight := Height;
finally
free;
end;
with TLabel.Create(Self) do try
labelheight := Height;
finally
free;
end;
Datasource := TDADataSource.Create(Self);
end;
procedure TBusinessProcessorClientForm2.OkButtonClick(Sender: TObject);
begin
if DataSource.DataTable.State in [dsEdit, dsInsert] then DataSource.DataTable.Post;
end;
procedure TBusinessProcessorClientForm2.CancelButtonClick(Sender: TObject);
begin
if DataSource.DataTable.State in [dsEdit, dsInsert] then DataSource.DataTable.Cancel;
end;
procedure TBusinessProcessorClientForm2.ApplyErrorMessage(
BizErrorMessage: TBizErrorMessage);
var
i: integer;
FLabel: TLabel;
Fcomp: TComponent;
aTop: integer;
begin
ShowHint := True;
Caption := Datasource.DataTable.LogicalName;
FLabel := TLabel.Create(Self);
with FLabel do begin
Parent := TopPanel;
i := pos(sLineBreak, BizErrorMessage.Message);
if i = 0 then
Caption := BizErrorMessage.Message
else
Caption := copy(BizErrorMessage.Message, 1, i-1);
Hint := Caption;
Left := 7;
Top := 7;
AutoSize := true;
WordWrap := True;
AutoSize := False;
Height:= labelheight * (Width div (Parent.ClientWidth - Left * 2)+1);
Width := Parent.ClientWidth - Left * 2;
{ if BizErrorMessage.ItemCount = 0 then
Height := labelheight * 4
else
Height := labelheight; }
aTop := Height + Top + 3;
Anchors := Anchors + [akRight];
end;
for i := 0 to BizErrorMessage.ItemCount - 1 do begin
with BizErrorMessage.Items[i] do begin
Fcomp := Self.FindComponent('l_' + Field);
if Fcomp <> nil then TLabel(Fcomp).Font.Color := clRed;
FLabel := TLabel.Create(Self);
with FLabel do begin
Parent := TopPanel;
Name := 'error_' + Field;
Caption := ErrorMessage;
Left := 7;
Top := aTop;
AutoSize := True;
Font.Color := clRed;
aTop := Height + Top + 3;
end;
end;
end;
TopPanel.ClientHeight := aTop;
end;
procedure TBusinessProcessorClientForm2.OnFieldValueChanged(
Sender: TObject);
begin
OkButton.Caption := 'Update';
end;
end.

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Library Name="BusinessProcessorLibrary" UID="{EBAEAB9A-1E78-4BB3-8417-2E226959496F}" Version="3.0">
<Services>
<Service Name="BusinessProcessorService" UID="{AB4260DF-BCCA-443A-B981-89EF7EE742F7}" Ancestor="DataAbstractService">
<Interfaces>
<Interface Name="Default" UID="{4404161B-2A9E-4711-AADF-4493AC19BB34}">
<Operations>
</Operations>
</Interface>
</Interfaces>
</Service>
</Services>
<Structs>
</Structs>
<Enums>
</Enums>
<Arrays>
</Arrays>
<Uses>
<Use Name="DataAbstract" UID="{F9ADB13D-3084-44CA-B4E9-025E98E174BE}" Rodl="$(Data Abstract for Delphi)\Source\DataAbstract4.RODL">
</Use></Uses>
</Library>

View File

@ -0,0 +1,77 @@
unit BusinessProcessorLibrary_Intf;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, TypInfo,
{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
{Used RODLs:} DataAbstract4_Intf;
const
{ Library ID }
LibraryUID = '{EBAEAB9A-1E78-4BB3-8417-2E226959496F}';
TargetNamespace = '';
{ Service Interface ID's }
IBusinessProcessorService_IID : TGUID = '{4404161B-2A9E-4711-AADF-4493AC19BB34}';
{ Event ID's }
type
{ Forward declarations }
IBusinessProcessorService = interface;
{ IBusinessProcessorService }
IBusinessProcessorService = interface(IDataAbstractService)
['{4404161B-2A9E-4711-AADF-4493AC19BB34}']
end;
{ CoBusinessProcessorService }
CoBusinessProcessorService = class
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBusinessProcessorService;
end;
{ TBusinessProcessorService_Proxy }
TBusinessProcessorService_Proxy = class(TDataAbstractService_Proxy, IBusinessProcessorService)
protected
function __GetInterfaceName:string; override;
end;
implementation
uses
{vcl:} SysUtils,
{RemObjects:} uROEventRepository, uRORes;
{ CoBusinessProcessorService }
class function CoBusinessProcessorService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBusinessProcessorService;
begin
result := TBusinessProcessorService_Proxy.Create(aMessage, aTransportChannel);
end;
function TBusinessProcessorService_Proxy.__GetInterfaceName:string;
begin
result := 'BusinessProcessorService';
end;
initialization
RegisterProxyClass(IBusinessProcessorService_IID, TBusinessProcessorService_Proxy);
finalization
UnregisterProxyClass(IBusinessProcessorService_IID);
end.

View File

@ -0,0 +1,32 @@
unit BusinessProcessorLibrary_Invk;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes,
{RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Used RODL Intf's:} DataAbstract4_Intf,
{Used RODL Invk's:} DataAbstract4_Invk,
{Generated:} BusinessProcessorLibrary_Intf;
type
TBusinessProcessorService_Invoker = class(TDataAbstractService_Invoker)
private
protected
published
end;
implementation
uses
{RemObjects:} uRORes, uROClient;
end.

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{CF9814E2-631B-4FFA-A943-67792DA5CDC6}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BusinessProcessorServer.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,27 @@
program BusinessProcessorServer;
{#ROGEN:BusinessProcessorLibrary.RODL} // RemObjects SDK: Careful, do not remove!
uses
uROComInit,
uROComboService,
Forms,
BusinessProcessorServerMain in 'BusinessProcessorServerMain.pas' {BusinessProcessorServerMainForm},
BusinessProcessorServerData in 'BusinessProcessorServerData.pas' {BusinessProcessorServerDataModule: TDataModule},
SchemaClient_Intf in 'SchemaClient_Intf.pas',
SchemaServer_Intf in 'SchemaServer_Intf.pas',
BizSchemaServer in 'BizSchemaServer.pas',
ServerGlobal in 'ServerGlobal.pas',
BusinessProcessorLibrary_Intf in 'BusinessProcessorLibrary_Intf.pas',
BusinessProcessorLibrary_Invk in 'BusinessProcessorLibrary_Invk.pas',
BusinessProcessorService_Impl in 'BusinessProcessorService_Impl.pas' {BusinessProcessorService: TDataAbstractService};
{$R *.res}
{$R RODLFile.res}
begin
Application.Initialize;
Application.CreateForm(TBusinessProcessorServerDataModule, BusinessProcessorServerDataModule);
Application.CreateForm(TBusinessProcessorServerMainForm, BusinessProcessorServerMainForm);
Application.Run;
end.

View File

@ -0,0 +1,84 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{dac310a9-44d2-4920-b4d5-46703300c98d}</ProjectGuid>
<MainSource>BusinessProcessorServer.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BusinessProcessorServer.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BusinessProcessorServer.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BusinessProcessorServer.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BizSchemaServer.pas" />
<DCCReference Include="BusinessProcessorLibrary_Intf.pas" />
<DCCReference Include="BusinessProcessorLibrary_Invk.pas" />
<DCCReference Include="BusinessProcessorServerData.pas">
<Form>BusinessProcessorServerDataModule</Form>
</DCCReference>
<DCCReference Include="BusinessProcessorServerMain.pas">
<Form>BusinessProcessorServerMainForm</Form>
</DCCReference>
<DCCReference Include="BusinessProcessorService_Impl.pas">
<Form>BusinessProcessorService</Form>
</DCCReference>
<DCCReference Include="SchemaClient_Intf.pas" />
<DCCReference Include="SchemaServer_Intf.pas" />
<DCCReference Include="ServerGlobal.pas" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,60 @@
object BusinessProcessorServerDataModule: TBusinessProcessorServerDataModule
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 186
Top = 136
Height = 207
Width = 352
object Server: TROIndyHTTPServer
Dispatchers = <
item
Name = 'Message'
Message = Message
Enabled = True
PathInfo = 'Bin'
end>
Port = 8099
Left = 32
Top = 8
end
object Message: TROBinMessage
Left = 32
Top = 56
end
object ConnectionManager: TDAConnectionManager
Connections = <
item
Name = 'Northwind'
ConnectionString =
'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
'egrated Security=SSPI;'
Description = 'Microsoft SQL Server 2000, localhost'
Default = True
Tag = 0
end>
DriverManager = DriverManager
PoolingEnabled = True
Left = 136
Top = 56
end
object DriverManager: TDADriverManager
DriverDirectory = '%SYSTEM%\'
TraceActive = False
TraceFlags = []
Left = 136
Top = 10
end
object ADODriver: TDAADODriver
Left = 256
Top = 8
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 32
Top = 104
end
object SessionManager: TROInMemorySessionManager
Left = 136
Top = 104
end
end

View File

@ -0,0 +1,42 @@
unit BusinessProcessorServerData;
interface
uses
SysUtils, Classes,
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
uROBinMessage, uROIndyHTTPServer,
uDAEngine, uDADriverManager, uDAClasses, uROSessions,
uDAADODriver, uROIndyTCPServer;
type
TBusinessProcessorServerDataModule = class(TDataModule)
Server: TROIndyHTTPServer;
Message: TROBinMessage;
ConnectionManager: TDAConnectionManager;
DriverManager: TDADriverManager;
ADODriver: TDAADODriver;
SessionManager: TROInMemorySessionManager;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessProcessorServerDataModule: TBusinessProcessorServerDataModule;
implementation
{$R *.dfm}
procedure TBusinessProcessorServerDataModule.DataModuleCreate(Sender: TObject);
begin
Server.Active := true;
end;
end.

View File

@ -0,0 +1,105 @@
object BusinessProcessorServerMainForm: TBusinessProcessorServerMainForm
Left = 100
Top = 111
BorderStyle = bsDialog
Caption = 'Business Processor Server'
ClientHeight = 170
ClientWidth = 380
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poScreenCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 7
Top = 7
Width = 39
Height = 13
Caption = 'Checks:'
end
object GroupBox1: TGroupBox
Left = 7
Top = 24
Width = 365
Height = 73
Anchors = [akLeft, akTop, akRight]
Caption = 'Customers'
TabOrder = 0
object cbCheckCustomerID: TCheckBox
Left = 8
Top = 15
Width = 321
Height = 17
Caption = 'New records: CustomerID needs at least 5 characters'
TabOrder = 0
OnClick = cbCheckCustomerIDClick
end
object cbDeclineDeleteCustomers: TCheckBox
Left = 8
Top = 49
Width = 216
Height = 17
Caption = 'Restrict deleting records'
TabOrder = 1
OnClick = cbDeclineDeleteCustomersClick
end
object cbCompany: TCheckBox
Left = 8
Top = 32
Width = 228
Height = 17
Caption = 'New records: Company name for should be '
TabOrder = 2
OnClick = cbCompanyClick
end
object eCompany: TEdit
Left = 245
Top = 30
Width = 110
Height = 21
TabOrder = 3
Text = 'Company'
OnChange = eCompanyChange
end
end
object GroupBox2: TGroupBox
Left = 7
Top = 100
Width = 365
Height = 60
Anchors = [akLeft, akTop, akRight]
Caption = 'Orders'
TabOrder = 1
object cbFreight: TCheckBox
Left = 8
Top = 15
Width = 218
Height = 17
Caption = 'Freight should be greater than'
TabOrder = 0
OnClick = cbFreightClick
end
object cbDeclineDeleteOrders: TCheckBox
Left = 8
Top = 33
Width = 216
Height = 17
Caption = 'Restrict deleting of orders'
TabOrder = 1
OnClick = cbDeclineDeleteOrdersClick
end
object eFreight: TSpinEdit
Left = 245
Top = 12
Width = 110
Height = 22
MaxValue = 0
MinValue = 0
TabOrder = 2
Value = 0
OnChange = eFreightChange
end
end
end

View File

@ -0,0 +1,96 @@
unit BusinessProcessorServerMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uDAPoweredByDataAbstractButton, Spin;
type
TBusinessProcessorServerMainForm = class(TForm)
Label1: TLabel;
GroupBox1: TGroupBox;
cbCheckCustomerID: TCheckBox;
cbDeclineDeleteCustomers: TCheckBox;
cbCompany: TCheckBox;
eCompany: TEdit;
GroupBox2: TGroupBox;
cbFreight: TCheckBox;
cbDeclineDeleteOrders: TCheckBox;
eFreight: TSpinEdit;
procedure cbCompanyClick(Sender: TObject);
procedure eCompanyChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cbFreightClick(Sender: TObject);
procedure eFreightChange(Sender: TObject);
procedure cbDeclineDeleteCustomersClick(Sender: TObject);
procedure cbDeclineDeleteOrdersClick(Sender: TObject);
procedure cbCheckCustomerIDClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessProcessorServerMainForm : TBusinessProcessorServerMainForm;
implementation
uses
ServerGlobal;
{$R *.dfm}
procedure TBusinessProcessorServerMainForm.cbCompanyClick(Sender: TObject);
begin
eCompany.Enabled := cbCompany.Checked;
gCompanyCheck := cbCompany.Checked;
eCompanyChange(eCompany);
end;
procedure TBusinessProcessorServerMainForm.eCompanyChange(Sender: TObject);
begin
gCompany := eCompany.Text;
end;
procedure TBusinessProcessorServerMainForm.FormShow(Sender: TObject);
begin
eCompany.Text := gCompany;
eFreight.Value := gFreight;
cbCompany.Checked := gCompanyCheck;
cbFreight.Checked := gFreightCheck;
cbCompanyClick(cbCompany);
cbFreightClick(cbFreight);
cbDeclineDeleteCustomers.Checked := gDeclineDeleteCustomers;
cbDeclineDeleteOrders.Checked := gDeclineDeleteOrders;
cbCheckCustomerID.Checked := gCheckCustomerID;
end;
procedure TBusinessProcessorServerMainForm.cbFreightClick(Sender: TObject);
begin
eFreight.Enabled := cbFreight.Checked;
gFreightCheck := cbFreight.Checked;
eFreightChange(eFreight);
end;
procedure TBusinessProcessorServerMainForm.eFreightChange(Sender: TObject);
begin
gFreight := eFreight.Value;
end;
procedure TBusinessProcessorServerMainForm.cbDeclineDeleteCustomersClick(Sender: TObject);
begin
gDeclineDeleteCustomers := cbDeclineDeleteCustomers.Checked;
end;
procedure TBusinessProcessorServerMainForm.cbDeclineDeleteOrdersClick(Sender: TObject);
begin
gDeclineDeleteOrders := cbDeclineDeleteOrders.Checked;
end;
procedure TBusinessProcessorServerMainForm.cbCheckCustomerIDClick(Sender: TObject);
begin
gCheckCustomerID := cbCheckCustomerID.Checked;
end;
end.

View File

@ -0,0 +1,712 @@
object BusinessProcessorService: TBusinessProcessorService
OldCreateOrder = True
SessionManager = BusinessProcessorServerDataModule.SessionManager
ServiceSchema = Schema
ServiceDataStreamer = DataStreamer
ExportedDataTables = <>
Left = 200
Top = 200
Height = 300
Width = 300
object DataStreamer: TDABinDataStreamer
Left = 32
Top = 8
end
object Schema: TDASchema
ConnectionManager = BusinessProcessorServerDataModule.ConnectionManager
DataDictionary = BusinessProcessorServerDataModule.DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'Northwind'
TargetTable = 'Customers'
SQL =
'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
#10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
#10' FROM'#10' Customers'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'CustomerID'
TableField = 'CustomerID'
end
item
DatasetField = 'CompanyName'
TableField = 'CompanyName'
end
item
DatasetField = 'ContactName'
TableField = 'ContactName'
end
item
DatasetField = 'ContactTitle'
TableField = 'ContactTitle'
end
item
DatasetField = 'Address'
TableField = 'Address'
end
item
DatasetField = 'City'
TableField = 'City'
end
item
DatasetField = 'Region'
TableField = 'Region'
end
item
DatasetField = 'PostalCode'
TableField = 'PostalCode'
end
item
DatasetField = 'Country'
TableField = 'Country'
end
item
DatasetField = 'Phone'
TableField = 'Phone'
end
item
DatasetField = 'Fax'
TableField = 'Fax'
end>
end>
Name = 'Customers'
Fields = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CompanyName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactName'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ContactTitle'
DataType = datWideString
Size = 30
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Address'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'City'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Region'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Country'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Phone'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Fax'
DataType = datWideString
Size = 24
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end
item
Params = <
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end>
Statements = <
item
Connection = 'Northwind'
TargetTable = 'Orders'
SQL =
'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
' Orders'#10' WHERE'#10' CustomerID = :CustomerID'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'OrderID'
TableField = 'OrderID'
end
item
DatasetField = 'CustomerID'
TableField = 'CustomerID'
end
item
DatasetField = 'EmployeeID'
TableField = 'EmployeeID'
end
item
DatasetField = 'OrderDate'
TableField = 'OrderDate'
end
item
DatasetField = 'RequiredDate'
TableField = 'RequiredDate'
end
item
DatasetField = 'ShippedDate'
TableField = 'ShippedDate'
end
item
DatasetField = 'ShipVia'
TableField = 'ShipVia'
end
item
DatasetField = 'Freight'
TableField = 'Freight'
end
item
DatasetField = 'ShipName'
TableField = 'ShipName'
end
item
DatasetField = 'ShipAddress'
TableField = 'ShipAddress'
end
item
DatasetField = 'ShipCity'
TableField = 'ShipCity'
end
item
DatasetField = 'ShipRegion'
TableField = 'ShipRegion'
end
item
DatasetField = 'ShipPostalCode'
TableField = 'ShipPostalCode'
end
item
DatasetField = 'ShipCountry'
TableField = 'ShipCountry'
end>
end>
Name = 'Orders'
Fields = <
item
Name = 'OrderID'
DataType = datAutoInc
BlobType = dabtUnknown
LogChanges = False
Required = True
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CustomerID'
DataType = datWideString
Size = 5
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'EmployeeID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OrderDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'RequiredDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShippedDate'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipVia'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Freight'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipName'
DataType = datWideString
Size = 40
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipAddress'
DataType = datWideString
Size = 60
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCity'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipRegion'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipPostalCode'
DataType = datWideString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ShipCountry'
DataType = datWideString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end>
Commands = <
item
Params = <
item
Name = 'CustomerID'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'CompanyName'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'ContactName'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'ContactTitle'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Address'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'City'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Region'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'PostalCode'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Country'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Phone'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Fax'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end>
Statements = <
item
Connection = 'Northwind'
TargetTable = 'Customers'
SQL =
'INSERT'#10' INTO Customers'#10' (CustomerID, CompanyName, ContactNam' +
'e, ContactTitle, '#10' Address, City, Region, PostalCode, Countr' +
'y, Phone, '#10' Fax)'#10' VALUES'#10' (:CustomerID, :CompanyName, :C' +
'ontactName, :ContactTitle, '#10' :Address, :City, :Region, :Post' +
'alCode, :Country, :Phone, '#10' :Fax)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_Customers'
end
item
Params = <
item
Name = 'OLD_CustomerID'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end>
Statements = <
item
Connection = 'Northwind'
TargetTable = 'Customers'
SQL =
'DELETE '#10' FROM'#10' Customers'#10' WHERE'#10' (CustomerID = :OLD_Cust' +
'omerID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_Customers'
end
item
Params = <
item
Name = 'CustomerID'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'CompanyName'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'ContactName'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'ContactTitle'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Address'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'City'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Region'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'PostalCode'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Country'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Phone'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'Fax'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end
item
Name = 'OLD_CustomerID'
DataType = datWideString
BlobType = dabtUnknown
Value = ''
ParamType = daptUnknown
end>
Statements = <
item
Connection = 'Northwind'
TargetTable = 'Customers'
SQL =
'UPDATE Customers'#10' SET '#10' CustomerID = :CustomerID, '#10' Compa' +
'nyName = :CompanyName, '#10' ContactName = :ContactName, '#10' Con' +
'tactTitle = :ContactTitle, '#10' Address = :Address, '#10' City = ' +
':City, '#10' Region = :Region, '#10' PostalCode = :PostalCode, '#10' ' +
' Country = :Country, '#10' Phone = :Phone, '#10' Fax = :Fax'#10' WHE' +
'RE'#10' (CustomerID = :OLD_CustomerID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_Customers'
end>
RelationShips = <
item
Name = 'Relationship'
MasterDatasetName = 'Customers'
MasterFields = 'CustomerID'
DetailDatasetName = 'Orders'
DetailFields = 'CustomerID'
end>
UpdateRules = <>
Left = 32
Top = 56
end
object bpCustomers: TDABusinessProcessor
Schema = Schema
InsertCommandName = 'Insert_Customers'
DeleteCommandName = 'Delete_Customers'
UpdateCommandName = 'Update_Customers'
ReferencedDataset = 'Customers'
ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
BusinessRulesID = 'Customers.ServerRules'
Left = 76
Top = 55
end
object bpOrders: TDABusinessProcessor
Schema = Schema
ReferencedDataset = 'Orders'
ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
BusinessRulesID = 'Orders.ServerRules'
Left = 80
Top = 98
end
end

View File

@ -0,0 +1,50 @@
unit BusinessProcessorService_Impl;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Required:} uRORemoteDataModule,
{Ancestor Implementation:} DataAbstractService_Impl,
{Used RODLs:} DataAbstract4_Intf,
{Generated:} BusinessProcessorLibrary_Intf, uDAScriptingProvider,
uDABusinessProcessor, uDAClasses, uDADataStreamer, uDABinAdapter;
type
{ TBusinessProcessorService }
TBusinessProcessorService = class(TDataAbstractService, IBusinessProcessorService)
DataStreamer: TDABinDataStreamer;
Schema: TDASchema;
bpCustomers: TDABusinessProcessor;
bpOrders: TDABusinessProcessor;
private
protected
{ IBusinessProcessorService methods }
end;
implementation
{$R *.dfm}
uses
{Generated:} BusinessProcessorLibrary_Invk,BusinessProcessorServerData;
procedure Create_BusinessProcessorService(out anInstance : IUnknown);
begin
anInstance := TBusinessProcessorService.Create(nil);
end;
{ BusinessProcessorService }
initialization
TROClassFactory.Create('BusinessProcessorService', Create_BusinessProcessorService, TBusinessProcessorService_Invoker);
finalization
end.

View File

@ -0,0 +1,981 @@
unit SchemaClient_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDADataTable;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Customers = '{A9F7C630-77E0-44A8-B46B-E3EE67954A42}';
RID_Orders = '{B5125DCD-A27D-488D-A1A2-4FB5D49D7079}';
{ Data table names }
nme_Customers = 'Customers';
nme_Orders = 'Orders';
{ Customers fields }
fld_CustomersCustomerID = 'CustomerID';
fld_CustomersCompanyName = 'CompanyName';
fld_CustomersContactName = 'ContactName';
fld_CustomersContactTitle = 'ContactTitle';
fld_CustomersAddress = 'Address';
fld_CustomersCity = 'City';
fld_CustomersRegion = 'Region';
fld_CustomersPostalCode = 'PostalCode';
fld_CustomersCountry = 'Country';
fld_CustomersPhone = 'Phone';
fld_CustomersFax = 'Fax';
{ Customers field indexes }
idx_CustomersCustomerID = 0;
idx_CustomersCompanyName = 1;
idx_CustomersContactName = 2;
idx_CustomersContactTitle = 3;
idx_CustomersAddress = 4;
idx_CustomersCity = 5;
idx_CustomersRegion = 6;
idx_CustomersPostalCode = 7;
idx_CustomersCountry = 8;
idx_CustomersPhone = 9;
idx_CustomersFax = 10;
{ Orders fields }
fld_OrdersOrderID = 'OrderID';
fld_OrdersCustomerID = 'CustomerID';
fld_OrdersEmployeeID = 'EmployeeID';
fld_OrdersOrderDate = 'OrderDate';
fld_OrdersRequiredDate = 'RequiredDate';
fld_OrdersShippedDate = 'ShippedDate';
fld_OrdersShipVia = 'ShipVia';
fld_OrdersFreight = 'Freight';
fld_OrdersShipName = 'ShipName';
fld_OrdersShipAddress = 'ShipAddress';
fld_OrdersShipCity = 'ShipCity';
fld_OrdersShipRegion = 'ShipRegion';
fld_OrdersShipPostalCode = 'ShipPostalCode';
fld_OrdersShipCountry = 'ShipCountry';
{ Orders field indexes }
idx_OrdersOrderID = 0;
idx_OrdersCustomerID = 1;
idx_OrdersEmployeeID = 2;
idx_OrdersOrderDate = 3;
idx_OrdersRequiredDate = 4;
idx_OrdersShippedDate = 5;
idx_OrdersShipVia = 6;
idx_OrdersFreight = 7;
idx_OrdersShipName = 8;
idx_OrdersShipAddress = 9;
idx_OrdersShipCity = 10;
idx_OrdersShipRegion = 11;
idx_OrdersShipPostalCode = 12;
idx_OrdersShipCountry = 13;
type
{ ICustomers }
ICustomers = interface(IDAStronglyTypedDataTable)
['{AD74260F-B808-430E-85E6-FB469055C068}']
{ Property getters and setters }
function GetCustomerIDValue: WideString;
procedure SetCustomerIDValue(const aValue: WideString);
function GetCustomerIDIsNull: Boolean;
procedure SetCustomerIDIsNull(const aValue: Boolean);
function GetCompanyNameValue: WideString;
procedure SetCompanyNameValue(const aValue: WideString);
function GetCompanyNameIsNull: Boolean;
procedure SetCompanyNameIsNull(const aValue: Boolean);
function GetContactNameValue: WideString;
procedure SetContactNameValue(const aValue: WideString);
function GetContactNameIsNull: Boolean;
procedure SetContactNameIsNull(const aValue: Boolean);
function GetContactTitleValue: WideString;
procedure SetContactTitleValue(const aValue: WideString);
function GetContactTitleIsNull: Boolean;
procedure SetContactTitleIsNull(const aValue: Boolean);
function GetAddressValue: WideString;
procedure SetAddressValue(const aValue: WideString);
function GetAddressIsNull: Boolean;
procedure SetAddressIsNull(const aValue: Boolean);
function GetCityValue: WideString;
procedure SetCityValue(const aValue: WideString);
function GetCityIsNull: Boolean;
procedure SetCityIsNull(const aValue: Boolean);
function GetRegionValue: WideString;
procedure SetRegionValue(const aValue: WideString);
function GetRegionIsNull: Boolean;
procedure SetRegionIsNull(const aValue: Boolean);
function GetPostalCodeValue: WideString;
procedure SetPostalCodeValue(const aValue: WideString);
function GetPostalCodeIsNull: Boolean;
procedure SetPostalCodeIsNull(const aValue: Boolean);
function GetCountryValue: WideString;
procedure SetCountryValue(const aValue: WideString);
function GetCountryIsNull: Boolean;
procedure SetCountryIsNull(const aValue: Boolean);
function GetPhoneValue: WideString;
procedure SetPhoneValue(const aValue: WideString);
function GetPhoneIsNull: Boolean;
procedure SetPhoneIsNull(const aValue: Boolean);
function GetFaxValue: WideString;
procedure SetFaxValue(const aValue: WideString);
function GetFaxIsNull: Boolean;
procedure SetFaxIsNull(const aValue: Boolean);
{ Properties }
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
property ContactName: WideString read GetContactNameValue write SetContactNameValue;
property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
property Address: WideString read GetAddressValue write SetAddressValue;
property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
property City: WideString read GetCityValue write SetCityValue;
property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
property Region: WideString read GetRegionValue write SetRegionValue;
property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
property Country: WideString read GetCountryValue write SetCountryValue;
property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
property Phone: WideString read GetPhoneValue write SetPhoneValue;
property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
property Fax: WideString read GetFaxValue write SetFaxValue;
property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
end;
{ TCustomersDataTableRules }
TCustomersDataTableRules = class(TDADataTableRules, ICustomers)
private
protected
{ Property getters and setters }
function GetCustomerIDValue: WideString; virtual;
procedure SetCustomerIDValue(const aValue: WideString); virtual;
function GetCustomerIDIsNull: Boolean; virtual;
procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
function GetCompanyNameValue: WideString; virtual;
procedure SetCompanyNameValue(const aValue: WideString); virtual;
function GetCompanyNameIsNull: Boolean; virtual;
procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
function GetContactNameValue: WideString; virtual;
procedure SetContactNameValue(const aValue: WideString); virtual;
function GetContactNameIsNull: Boolean; virtual;
procedure SetContactNameIsNull(const aValue: Boolean); virtual;
function GetContactTitleValue: WideString; virtual;
procedure SetContactTitleValue(const aValue: WideString); virtual;
function GetContactTitleIsNull: Boolean; virtual;
procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
function GetAddressValue: WideString; virtual;
procedure SetAddressValue(const aValue: WideString); virtual;
function GetAddressIsNull: Boolean; virtual;
procedure SetAddressIsNull(const aValue: Boolean); virtual;
function GetCityValue: WideString; virtual;
procedure SetCityValue(const aValue: WideString); virtual;
function GetCityIsNull: Boolean; virtual;
procedure SetCityIsNull(const aValue: Boolean); virtual;
function GetRegionValue: WideString; virtual;
procedure SetRegionValue(const aValue: WideString); virtual;
function GetRegionIsNull: Boolean; virtual;
procedure SetRegionIsNull(const aValue: Boolean); virtual;
function GetPostalCodeValue: WideString; virtual;
procedure SetPostalCodeValue(const aValue: WideString); virtual;
function GetPostalCodeIsNull: Boolean; virtual;
procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
function GetCountryValue: WideString; virtual;
procedure SetCountryValue(const aValue: WideString); virtual;
function GetCountryIsNull: Boolean; virtual;
procedure SetCountryIsNull(const aValue: Boolean); virtual;
function GetPhoneValue: WideString; virtual;
procedure SetPhoneValue(const aValue: WideString); virtual;
function GetPhoneIsNull: Boolean; virtual;
procedure SetPhoneIsNull(const aValue: Boolean); virtual;
function GetFaxValue: WideString; virtual;
procedure SetFaxValue(const aValue: WideString); virtual;
function GetFaxIsNull: Boolean; virtual;
procedure SetFaxIsNull(const aValue: Boolean); virtual;
{ Properties }
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
property ContactName: WideString read GetContactNameValue write SetContactNameValue;
property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
property Address: WideString read GetAddressValue write SetAddressValue;
property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
property City: WideString read GetCityValue write SetCityValue;
property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
property Region: WideString read GetRegionValue write SetRegionValue;
property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
property Country: WideString read GetCountryValue write SetCountryValue;
property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
property Phone: WideString read GetPhoneValue write SetPhoneValue;
property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
property Fax: WideString read GetFaxValue write SetFaxValue;
property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IOrders }
IOrders = interface(IDAStronglyTypedDataTable)
['{837F52E1-CF1E-44B5-9026-31E65685B868}']
{ Property getters and setters }
function GetOrderIDValue: Integer;
procedure SetOrderIDValue(const aValue: Integer);
function GetOrderIDIsNull: Boolean;
procedure SetOrderIDIsNull(const aValue: Boolean);
function GetCustomerIDValue: WideString;
procedure SetCustomerIDValue(const aValue: WideString);
function GetCustomerIDIsNull: Boolean;
procedure SetCustomerIDIsNull(const aValue: Boolean);
function GetEmployeeIDValue: Integer;
procedure SetEmployeeIDValue(const aValue: Integer);
function GetEmployeeIDIsNull: Boolean;
procedure SetEmployeeIDIsNull(const aValue: Boolean);
function GetOrderDateValue: DateTime;
procedure SetOrderDateValue(const aValue: DateTime);
function GetOrderDateIsNull: Boolean;
procedure SetOrderDateIsNull(const aValue: Boolean);
function GetRequiredDateValue: DateTime;
procedure SetRequiredDateValue(const aValue: DateTime);
function GetRequiredDateIsNull: Boolean;
procedure SetRequiredDateIsNull(const aValue: Boolean);
function GetShippedDateValue: DateTime;
procedure SetShippedDateValue(const aValue: DateTime);
function GetShippedDateIsNull: Boolean;
procedure SetShippedDateIsNull(const aValue: Boolean);
function GetShipViaValue: Integer;
procedure SetShipViaValue(const aValue: Integer);
function GetShipViaIsNull: Boolean;
procedure SetShipViaIsNull(const aValue: Boolean);
function GetFreightValue: Float;
procedure SetFreightValue(const aValue: Float);
function GetFreightIsNull: Boolean;
procedure SetFreightIsNull(const aValue: Boolean);
function GetShipNameValue: WideString;
procedure SetShipNameValue(const aValue: WideString);
function GetShipNameIsNull: Boolean;
procedure SetShipNameIsNull(const aValue: Boolean);
function GetShipAddressValue: WideString;
procedure SetShipAddressValue(const aValue: WideString);
function GetShipAddressIsNull: Boolean;
procedure SetShipAddressIsNull(const aValue: Boolean);
function GetShipCityValue: WideString;
procedure SetShipCityValue(const aValue: WideString);
function GetShipCityIsNull: Boolean;
procedure SetShipCityIsNull(const aValue: Boolean);
function GetShipRegionValue: WideString;
procedure SetShipRegionValue(const aValue: WideString);
function GetShipRegionIsNull: Boolean;
procedure SetShipRegionIsNull(const aValue: Boolean);
function GetShipPostalCodeValue: WideString;
procedure SetShipPostalCodeValue(const aValue: WideString);
function GetShipPostalCodeIsNull: Boolean;
procedure SetShipPostalCodeIsNull(const aValue: Boolean);
function GetShipCountryValue: WideString;
procedure SetShipCountryValue(const aValue: WideString);
function GetShipCountryIsNull: Boolean;
procedure SetShipCountryIsNull(const aValue: Boolean);
{ Properties }
property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
property Freight: Float read GetFreightValue write SetFreightValue;
property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
property ShipName: WideString read GetShipNameValue write SetShipNameValue;
property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
end;
{ TOrdersDataTableRules }
TOrdersDataTableRules = class(TDADataTableRules, IOrders)
private
protected
{ Property getters and setters }
function GetOrderIDValue: Integer; virtual;
procedure SetOrderIDValue(const aValue: Integer); virtual;
function GetOrderIDIsNull: Boolean; virtual;
procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
function GetCustomerIDValue: WideString; virtual;
procedure SetCustomerIDValue(const aValue: WideString); virtual;
function GetCustomerIDIsNull: Boolean; virtual;
procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
function GetEmployeeIDValue: Integer; virtual;
procedure SetEmployeeIDValue(const aValue: Integer); virtual;
function GetEmployeeIDIsNull: Boolean; virtual;
procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
function GetOrderDateValue: DateTime; virtual;
procedure SetOrderDateValue(const aValue: DateTime); virtual;
function GetOrderDateIsNull: Boolean; virtual;
procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
function GetRequiredDateValue: DateTime; virtual;
procedure SetRequiredDateValue(const aValue: DateTime); virtual;
function GetRequiredDateIsNull: Boolean; virtual;
procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
function GetShippedDateValue: DateTime; virtual;
procedure SetShippedDateValue(const aValue: DateTime); virtual;
function GetShippedDateIsNull: Boolean; virtual;
procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
function GetShipViaValue: Integer; virtual;
procedure SetShipViaValue(const aValue: Integer); virtual;
function GetShipViaIsNull: Boolean; virtual;
procedure SetShipViaIsNull(const aValue: Boolean); virtual;
function GetFreightValue: Float; virtual;
procedure SetFreightValue(const aValue: Float); virtual;
function GetFreightIsNull: Boolean; virtual;
procedure SetFreightIsNull(const aValue: Boolean); virtual;
function GetShipNameValue: WideString; virtual;
procedure SetShipNameValue(const aValue: WideString); virtual;
function GetShipNameIsNull: Boolean; virtual;
procedure SetShipNameIsNull(const aValue: Boolean); virtual;
function GetShipAddressValue: WideString; virtual;
procedure SetShipAddressValue(const aValue: WideString); virtual;
function GetShipAddressIsNull: Boolean; virtual;
procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
function GetShipCityValue: WideString; virtual;
procedure SetShipCityValue(const aValue: WideString); virtual;
function GetShipCityIsNull: Boolean; virtual;
procedure SetShipCityIsNull(const aValue: Boolean); virtual;
function GetShipRegionValue: WideString; virtual;
procedure SetShipRegionValue(const aValue: WideString); virtual;
function GetShipRegionIsNull: Boolean; virtual;
procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
function GetShipPostalCodeValue: WideString; virtual;
procedure SetShipPostalCodeValue(const aValue: WideString); virtual;
function GetShipPostalCodeIsNull: Boolean; virtual;
procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
function GetShipCountryValue: WideString; virtual;
procedure SetShipCountryValue(const aValue: WideString); virtual;
function GetShipCountryIsNull: Boolean; virtual;
procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
{ Properties }
property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
property Freight: Float read GetFreightValue write SetFreightValue;
property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
property ShipName: WideString read GetShipNameValue write SetShipNameValue;
property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TCustomersDataTableRules }
constructor TCustomersDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TCustomersDataTableRules.Destroy;
begin
inherited;
end;
function TCustomersDataTableRules.GetCustomerIDValue: WideString;
begin
result := DataTable.Fields[idx_CustomersCustomerID].AsWideString;
end;
procedure TCustomersDataTableRules.SetCustomerIDValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersCustomerID].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetCustomerIDIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersCustomerID].IsNull;
end;
procedure TCustomersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersCustomerID].AsVariant := Null;
end;
function TCustomersDataTableRules.GetCompanyNameValue: WideString;
begin
result := DataTable.Fields[idx_CustomersCompanyName].AsWideString;
end;
procedure TCustomersDataTableRules.SetCompanyNameValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersCompanyName].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetCompanyNameIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersCompanyName].IsNull;
end;
procedure TCustomersDataTableRules.SetCompanyNameIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersCompanyName].AsVariant := Null;
end;
function TCustomersDataTableRules.GetContactNameValue: WideString;
begin
result := DataTable.Fields[idx_CustomersContactName].AsWideString;
end;
procedure TCustomersDataTableRules.SetContactNameValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersContactName].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetContactNameIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersContactName].IsNull;
end;
procedure TCustomersDataTableRules.SetContactNameIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersContactName].AsVariant := Null;
end;
function TCustomersDataTableRules.GetContactTitleValue: WideString;
begin
result := DataTable.Fields[idx_CustomersContactTitle].AsWideString;
end;
procedure TCustomersDataTableRules.SetContactTitleValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersContactTitle].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetContactTitleIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersContactTitle].IsNull;
end;
procedure TCustomersDataTableRules.SetContactTitleIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersContactTitle].AsVariant := Null;
end;
function TCustomersDataTableRules.GetAddressValue: WideString;
begin
result := DataTable.Fields[idx_CustomersAddress].AsWideString;
end;
procedure TCustomersDataTableRules.SetAddressValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersAddress].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetAddressIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersAddress].IsNull;
end;
procedure TCustomersDataTableRules.SetAddressIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersAddress].AsVariant := Null;
end;
function TCustomersDataTableRules.GetCityValue: WideString;
begin
result := DataTable.Fields[idx_CustomersCity].AsWideString;
end;
procedure TCustomersDataTableRules.SetCityValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersCity].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetCityIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersCity].IsNull;
end;
procedure TCustomersDataTableRules.SetCityIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersCity].AsVariant := Null;
end;
function TCustomersDataTableRules.GetRegionValue: WideString;
begin
result := DataTable.Fields[idx_CustomersRegion].AsWideString;
end;
procedure TCustomersDataTableRules.SetRegionValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersRegion].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetRegionIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersRegion].IsNull;
end;
procedure TCustomersDataTableRules.SetRegionIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersRegion].AsVariant := Null;
end;
function TCustomersDataTableRules.GetPostalCodeValue: WideString;
begin
result := DataTable.Fields[idx_CustomersPostalCode].AsWideString;
end;
procedure TCustomersDataTableRules.SetPostalCodeValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersPostalCode].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetPostalCodeIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersPostalCode].IsNull;
end;
procedure TCustomersDataTableRules.SetPostalCodeIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersPostalCode].AsVariant := Null;
end;
function TCustomersDataTableRules.GetCountryValue: WideString;
begin
result := DataTable.Fields[idx_CustomersCountry].AsWideString;
end;
procedure TCustomersDataTableRules.SetCountryValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersCountry].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetCountryIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersCountry].IsNull;
end;
procedure TCustomersDataTableRules.SetCountryIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersCountry].AsVariant := Null;
end;
function TCustomersDataTableRules.GetPhoneValue: WideString;
begin
result := DataTable.Fields[idx_CustomersPhone].AsWideString;
end;
procedure TCustomersDataTableRules.SetPhoneValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersPhone].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetPhoneIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersPhone].IsNull;
end;
procedure TCustomersDataTableRules.SetPhoneIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersPhone].AsVariant := Null;
end;
function TCustomersDataTableRules.GetFaxValue: WideString;
begin
result := DataTable.Fields[idx_CustomersFax].AsWideString;
end;
procedure TCustomersDataTableRules.SetFaxValue(const aValue: WideString);
begin
DataTable.Fields[idx_CustomersFax].AsWideString := aValue;
end;
function TCustomersDataTableRules.GetFaxIsNull: boolean;
begin
result := DataTable.Fields[idx_CustomersFax].IsNull;
end;
procedure TCustomersDataTableRules.SetFaxIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_CustomersFax].AsVariant := Null;
end;
{ TOrdersDataTableRules }
constructor TOrdersDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TOrdersDataTableRules.Destroy;
begin
inherited;
end;
function TOrdersDataTableRules.GetOrderIDValue: Integer;
begin
result := DataTable.Fields[idx_OrdersOrderID].AsInteger;
end;
procedure TOrdersDataTableRules.SetOrderIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_OrdersOrderID].AsInteger := aValue;
end;
function TOrdersDataTableRules.GetOrderIDIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersOrderID].IsNull;
end;
procedure TOrdersDataTableRules.SetOrderIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersOrderID].AsVariant := Null;
end;
function TOrdersDataTableRules.GetCustomerIDValue: WideString;
begin
result := DataTable.Fields[idx_OrdersCustomerID].AsWideString;
end;
procedure TOrdersDataTableRules.SetCustomerIDValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersCustomerID].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetCustomerIDIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersCustomerID].IsNull;
end;
procedure TOrdersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersCustomerID].AsVariant := Null;
end;
function TOrdersDataTableRules.GetEmployeeIDValue: Integer;
begin
result := DataTable.Fields[idx_OrdersEmployeeID].AsInteger;
end;
procedure TOrdersDataTableRules.SetEmployeeIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_OrdersEmployeeID].AsInteger := aValue;
end;
function TOrdersDataTableRules.GetEmployeeIDIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersEmployeeID].IsNull;
end;
procedure TOrdersDataTableRules.SetEmployeeIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersEmployeeID].AsVariant := Null;
end;
function TOrdersDataTableRules.GetOrderDateValue: DateTime;
begin
result := DataTable.Fields[idx_OrdersOrderDate].AsDateTime;
end;
procedure TOrdersDataTableRules.SetOrderDateValue(const aValue: DateTime);
begin
DataTable.Fields[idx_OrdersOrderDate].AsDateTime := aValue;
end;
function TOrdersDataTableRules.GetOrderDateIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersOrderDate].IsNull;
end;
procedure TOrdersDataTableRules.SetOrderDateIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersOrderDate].AsVariant := Null;
end;
function TOrdersDataTableRules.GetRequiredDateValue: DateTime;
begin
result := DataTable.Fields[idx_OrdersRequiredDate].AsDateTime;
end;
procedure TOrdersDataTableRules.SetRequiredDateValue(const aValue: DateTime);
begin
DataTable.Fields[idx_OrdersRequiredDate].AsDateTime := aValue;
end;
function TOrdersDataTableRules.GetRequiredDateIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersRequiredDate].IsNull;
end;
procedure TOrdersDataTableRules.SetRequiredDateIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersRequiredDate].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShippedDateValue: DateTime;
begin
result := DataTable.Fields[idx_OrdersShippedDate].AsDateTime;
end;
procedure TOrdersDataTableRules.SetShippedDateValue(const aValue: DateTime);
begin
DataTable.Fields[idx_OrdersShippedDate].AsDateTime := aValue;
end;
function TOrdersDataTableRules.GetShippedDateIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShippedDate].IsNull;
end;
procedure TOrdersDataTableRules.SetShippedDateIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShippedDate].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipViaValue: Integer;
begin
result := DataTable.Fields[idx_OrdersShipVia].AsInteger;
end;
procedure TOrdersDataTableRules.SetShipViaValue(const aValue: Integer);
begin
DataTable.Fields[idx_OrdersShipVia].AsInteger := aValue;
end;
function TOrdersDataTableRules.GetShipViaIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipVia].IsNull;
end;
procedure TOrdersDataTableRules.SetShipViaIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipVia].AsVariant := Null;
end;
function TOrdersDataTableRules.GetFreightValue: Float;
begin
result := DataTable.Fields[idx_OrdersFreight].AsFloat;
end;
procedure TOrdersDataTableRules.SetFreightValue(const aValue: Float);
begin
DataTable.Fields[idx_OrdersFreight].AsFloat := aValue;
end;
function TOrdersDataTableRules.GetFreightIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersFreight].IsNull;
end;
procedure TOrdersDataTableRules.SetFreightIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersFreight].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipNameValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipName].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipNameValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipName].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipNameIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipName].IsNull;
end;
procedure TOrdersDataTableRules.SetShipNameIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipName].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipAddressValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipAddress].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipAddressValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipAddress].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipAddressIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipAddress].IsNull;
end;
procedure TOrdersDataTableRules.SetShipAddressIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipAddress].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipCityValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipCity].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipCityValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipCity].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipCityIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipCity].IsNull;
end;
procedure TOrdersDataTableRules.SetShipCityIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipCity].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipRegionValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipRegion].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipRegionValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipRegion].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipRegionIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipRegion].IsNull;
end;
procedure TOrdersDataTableRules.SetShipRegionIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipRegion].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipPostalCodeValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipPostalCode].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipPostalCodeValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipPostalCode].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipPostalCodeIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipPostalCode].IsNull;
end;
procedure TOrdersDataTableRules.SetShipPostalCodeIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipPostalCode].AsVariant := Null;
end;
function TOrdersDataTableRules.GetShipCountryValue: WideString;
begin
result := DataTable.Fields[idx_OrdersShipCountry].AsWideString;
end;
procedure TOrdersDataTableRules.SetShipCountryValue(const aValue: WideString);
begin
DataTable.Fields[idx_OrdersShipCountry].AsWideString := aValue;
end;
function TOrdersDataTableRules.GetShipCountryIsNull: boolean;
begin
result := DataTable.Fields[idx_OrdersShipCountry].IsNull;
end;
procedure TOrdersDataTableRules.SetShipCountryIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_OrdersShipCountry].AsVariant := Null;
end;
initialization
RegisterDataTableRules(RID_Customers, TCustomersDataTableRules);
RegisterDataTableRules(RID_Orders, TOrdersDataTableRules);
end.

View File

@ -0,0 +1,15 @@
unit ServerGlobal;
interface
var
gCompany: string = 'Company';
gCompanyCheck: Boolean = True;
gFreightCheck: Boolean = True;
gFreight: integer = 20;
gDeclineDeleteCustomers: Boolean = True;
gDeclineDeleteOrders: Boolean = True;
gCheckCustomerID: Boolean = True;
implementation
end.

View File

@ -0,0 +1,40 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="..\styles.css">
</head>
<body>
<img src="..\..\da.png" alt="" align="right">
<!-------------------------------------------------------------------------->
<p class="h1">
<span>BusinessRulesScripts</span>
</p>
<h2>Purpose</h2>
<p>
This example demonstrates how client side scripts can be <b>modified on the server</b>
and then <b>downloaded to the client</b> via a simple call.
</p>
<p>
When you compile and launch the server, it displays a memo containing various client
side rules executed within event handlers such as BeforePost.
</p>
<p>
You can test it by compiling and launching the client. Try deleting an
item with a <b>gain &gt; 90</b>, for example.
</p>
<p>
Next modify the server memo and click <b>Refresh Scripts from Server</b>
to see that your change has been actioned.
</p>
<p>
Note how the strong typing allows simple reference to field names, thus
making script changes as simple as possible.
</p>
<!-------------------------------------------------------------------------->
</body>
</html>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Default.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{CED06B4E-A2AA-4E9D-BA08-976E2F0D2CD7}</Option>
</Option>
</PersonalityInfo>
<Default.Personality>
<Projects>
<Projects Name="BusinessRulesScripts_Server.exe">BusinessRulesScripts_Server.bdsproj</Projects>
<Projects Name="BusinessRulesScripts_Client.exe">BusinessRulesScripts_Client.bdsproj</Projects>
<Projects Name="Targets">BusinessRulesScripts_Server.exe BusinessRulesScripts_Client.exe</Projects>
</Projects>
<Dependencies/>
</Default.Personality>
</BorlandProject>

View File

@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = BusinessRulesScripts_Server.exe BusinessRulesScripts_Client.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
BusinessRulesScripts_Server.exe: BusinessRulesScripts_Server.dpr
$(DCC)
BusinessRulesScripts_Client.exe: BusinessRulesScripts_Client.dpr
$(DCC)

View File

@ -0,0 +1,40 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{d1f18c23-83b8-4d53-bd98-adcf9fdf1af0}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup />
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="BusinessRulesScripts_Server">
<MSBuild Projects="BusinessRulesScripts_Server.dproj" Targets="" />
</Target>
<Target Name="BusinessRulesScripts_Server:Clean">
<MSBuild Projects="BusinessRulesScripts_Server.dproj" Targets="Clean" />
</Target>
<Target Name="BusinessRulesScripts_Server:Make">
<MSBuild Projects="BusinessRulesScripts_Server.dproj" Targets="Make" />
</Target>
<Target Name="BusinessRulesScripts_Client">
<MSBuild Projects="BusinessRulesScripts_Client.dproj" Targets="" />
</Target>
<Target Name="BusinessRulesScripts_Client:Clean">
<MSBuild Projects="BusinessRulesScripts_Client.dproj" Targets="Clean" />
</Target>
<Target Name="BusinessRulesScripts_Client:Make">
<MSBuild Projects="BusinessRulesScripts_Client.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="BusinessRulesScripts_Server;BusinessRulesScripts_Client" />
</Target>
<Target Name="Clean">
<CallTarget Targets="BusinessRulesScripts_Server:Clean;BusinessRulesScripts_Client:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="BusinessRulesScripts_Server:Make;BusinessRulesScripts_Client:Make" />
</Target>
</Project>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Library Name="BusinessRulesScriptsLibrary" UID="{E97481D6-EA65-4F8F-8CB0-128A20DA2B2C}" Version="3.0">
<Services>
<Service Name="NewService" UID="{B8D2EDC0-DD48-4C7B-B506-8350A6F0D212}" Ancestor="DataAbstractService">
<Interfaces>
<Interface Name="Default" UID="{25DCCAE5-CA08-41B5-8DFC-03C4E548FE33}">
<Documentation>
<![CDATA[
Service NewService. This service has been automatically generated using the Data Abstract template you can find in the Templates directory.]]>
</Documentation>
<Operations>
</Operations>
</Interface>
</Interfaces>
</Service>
</Services>
<Structs>
</Structs>
<Enums>
</Enums>
<Arrays>
</Arrays>
<Uses>
<Use Name="DataAbstract4_RODL" UID="{5DD1C963-7992-4876-A74F-BA54534E8654}" Rodl="$(Data Abstract for Delphi)\Source\DataAbstract4.RODL">
</Use></Uses>
</Library>

View File

@ -0,0 +1,95 @@
unit BusinessRulesScriptsLibrary_Intf;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, TypInfo,
{RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
{Used RODLs:} DataAbstract4_Intf;
const
{ Library ID }
LibraryUID = '{E97481D6-EA65-4F8F-8CB0-128A20DA2B2C}';
{ Service Interface ID's }
INewService_IID : TGUID = '{25DCCAE5-CA08-41B5-8DFC-03C4E548FE33}';
{ Event ID's }
type
{ Forward declarations }
INewService = interface;
{ INewService }
INewService = interface(IDataAbstractService)
['{25DCCAE5-CA08-41B5-8DFC-03C4E548FE33}']
function GetDatasetScripts(const DatasetNames: String): String;
end;
{ CoNewService }
CoNewService = class
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
end;
{ TNewService_Proxy }
TNewService_Proxy = class(TDataAbstractService_Proxy, INewService)
protected
function __GetInterfaceName:string; override;
function GetDatasetScripts(const DatasetNames: String): String;
end;
implementation
uses
{vcl:} SysUtils,
{RemObjects:} uROEventRepository, uRORes;
{ CoNewService }
class function CoNewService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
begin
result := TNewService_Proxy.Create(aMessage, aTransportChannel);
end;
{ TNewService_Proxy }
function TNewService_Proxy.__GetInterfaceName:string;
begin
result := 'NewService';
end;
function TNewService_Proxy.GetDatasetScripts(const DatasetNames: String): String;
begin
try
__Message.InitializeRequestMessage(__TransportChannel, 'BusinessRulesScriptsLibrary', __InterfaceName, 'GetDatasetScripts');
__Message.Write('DatasetNames', TypeInfo(String), DatasetNames, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(String), result, []);
finally
__Message.FreeStream;
end
end;
initialization
RegisterProxyClass(INewService_IID, TNewService_Proxy);
finalization
UnregisterProxyClass(INewService_IID);
end.

View File

@ -0,0 +1,54 @@
unit BusinessRulesScriptsLibrary_Invk;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes,
{RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Used RODL Intf's:} DataAbstract4_Intf,
{Used RODL Invk's:} DataAbstract4_Invk,
{Generated:} BusinessRulesScriptsLibrary_Intf;
type
TNewService_Invoker = class(TDataAbstractService_Invoker)
private
protected
published
procedure Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
implementation
uses
{RemObjects:} uRORes, uROClient;
{ TNewService_Invoker }
procedure TNewService_Invoker.Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetDatasetScripts(const DatasetNames: String): String; }
var
DatasetNames: String;
lResult: String;
begin
try
__Message.Read('DatasetNames', TypeInfo(String), DatasetNames, []);
lResult := (__Instance as INewService).GetDatasetScripts(DatasetNames);
__Message.InitializeResponseMessage(__Transport, 'BusinessRulesScriptsLibrary', 'NewService', 'GetDatasetScriptsResponse');
__Message.Write('Result', TypeInfo(String), lResult, []);
__Message.Finalize;
finally
end;
end;
end.

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{4D1546F9-A907-442E-89D1-1DBC969B556B}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BusinessRulesScripts_Client.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,17 @@
program BusinessRulesScripts_Client;
uses
uROComInit,
Forms,
BusinessRulesScripts_ClientMain in 'BusinessRulesScripts_ClientMain.pas' {BusinessRulesScripts_ClientMainForm},
BusinessRulesScripts_ClientData in 'BusinessRulesScripts_ClientData.pas' {BusinessRulesScripts_ClientDataModule: TDAClientDataModule};
{$R *.res}
begin
Application.Initialize;
Application.Title := 'BusinessRulesScripts Client';
Application.CreateForm(TBusinessRulesScripts_ClientDataModule, BusinessRulesScripts_ClientDataModule);
Application.CreateForm(TBusinessRulesScripts_ClientMainForm, BusinessRulesScripts_ClientMainForm);
Application.Run;
end.

View File

@ -0,0 +1,75 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{d6188ece-37af-4464-a5cb-347a71598f81}</ProjectGuid>
<MainSource>BusinessRulesScripts_Client.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BusinessRulesScripts_Client.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BusinessRulesScripts_Client.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BusinessRulesScripts_Client.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BusinessRulesScripts_ClientData.pas">
<Form>BusinessRulesScripts_ClientDataModule</Form>
</DCCReference>
<DCCReference Include="BusinessRulesScripts_ClientMain.pas">
<Form>BusinessRulesScripts_ClientMainForm</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,386 @@
object BusinessRulesScripts_ClientDataModule: TBusinessRulesScripts_ClientDataModule
OldCreateOrder = True
Left = 447
Top = 246
Height = 382
Width = 300
object ROChannel: TROWinInetHTTPChannel
UserAgent = 'RemObjects SDK'
TargetURL = 'http://localhost:8099/BIN'
ServerLocators = <>
DispatchOptions = []
Left = 40
Top = 8
end
object ROMessage: TROBinMessage
Left = 40
Top = 52
end
object RemoteService: TRORemoteService
Message = ROMessage
Channel = ROChannel
ServiceName = 'NewService'
Left = 41
Top = 96
end
object BinDataStreamer: TDABinDataStreamer
Left = 40
Top = 142
end
object dtProducts: TDACDSDataTable
ScriptingProvider = DAPSScriptingProvider
RemoteUpdatesOptions = []
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
item
Name = 'Gain'
DataType = datFloat
BlobType = dabtUnknown
LogChanges = False
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = True
Lookup = False
LookupCache = False
end>
Params = <>
MasterMappingMode = mmDataRequest
StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Products'
IndexDefs = <>
Left = 128
Top = 160
end
object dsProducts: TDADataSource
DataSet = dtProducts.Dataset
DataTable = dtProducts
Left = 127
Top = 187
end
object DAPSScriptingProvider: TDAPSScriptingProvider
ScriptEngine.CompilerOptions = [icAllowNoBegin, icAllowNoEnd, icBooleanShortCircuit]
ScriptEngine.Plugins = <
item
Plugin = DAPSScriptingProvider.PluginClasses
end
item
Plugin = DAPSScriptingProvider.PluginDB
end
item
Plugin = DAPSScriptingProvider.PluginDateUtils
end>
ScriptEngine.UsePreProcessor = False
Left = 128
Top = 256
end
object RemoteDataAdapter: TDARemoteDataAdapter
GetSchemaCall.RemoteService = RemoteService
GetSchemaCall.MethodName = 'GetSchema'
GetSchemaCall.Params = <
item
Name = 'aFilter'
DataType = rtString
Flag = fIn
Value = Null
end
item
Name = 'Result'
DataType = rtString
Flag = fResult
Value = Null
end>
GetSchemaCall.Default = False
GetSchemaCall.IncomingSchemaParameter = 'Result'
GetSchemaCall.OutgoingFilterParameter = 'aFilter'
GetDataCall.RemoteService = RemoteService
GetDataCall.MethodName = 'GetData'
GetDataCall.Params = <
item
Name = 'aTableNameArray'
DataType = rtUserDefined
Flag = fIn
TypeName = 'StringArray'
Value = Null
end
item
Name = 'aTableRequestInfoArray'
DataType = rtUserDefined
Flag = fIn
TypeName = 'TableRequestInfoArray'
Value = Null
end
item
Name = 'Result'
DataType = rtBinary
Flag = fResult
Value = Null
end>
GetDataCall.Default = False
GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
GetDataCall.IncomingDataParameter = 'Result'
UpdateDataCall.RemoteService = RemoteService
UpdateDataCall.MethodName = 'UpdateData'
UpdateDataCall.Params = <
item
Name = 'aDelta'
DataType = rtBinary
Flag = fIn
end
item
Name = 'Result'
DataType = rtBinary
Flag = fResult
end>
UpdateDataCall.Default = False
UpdateDataCall.OutgoingDeltaParameter = 'aDelta'
UpdateDataCall.IncomingDeltaParameter = 'Result'
GetScriptsCall.RemoteService = RemoteService
GetScriptsCall.MethodName = 'GetDatasetScripts'
GetScriptsCall.Params = <
item
Name = 'Result'
DataType = rtString
Flag = fResult
end
item
Name = 'DatasetNames'
DataType = rtString
Flag = fIn
Value = Null
end>
GetScriptsCall.Default = False
GetScriptsCall.OutgoingTableNamesParameter = 'DatasetNames'
GetScriptsCall.IncomingScriptParameter = 'Result'
RemoteService = RemoteService
DataStreamer = BinDataStreamer
AutoFillScripts = True
Left = 128
Top = 103
end
object dtOrderDetails: TDACDSDataTable
ScriptingProvider = DAPSScriptingProvider
RemoteUpdatesOptions = []
Fields = <
item
Name = 'OrderID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = True
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ProductName'
DataType = datString
Size = 50
BlobType = dabtUnknown
LogChanges = False
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = True
LookupSource = dsProducts
LookupKeyFields = 'ProductID'
LookupResultField = 'ProductName'
KeyFields = 'ProductID'
LookupCache = True
end
item
Name = 'ProductID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Visible = False
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
DisplayFormat = '0.##'
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'Gain'
DataType = datFloat
BlobType = dabtUnknown
LogChanges = False
DisplayWidth = 0
DisplayFormat = '0.##'
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = True
Lookup = False
LookupCache = False
end>
Params = <>
MasterMappingMode = mmDataRequest
StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
RemoteDataAdapter = RemoteDataAdapter
ReadOnly = False
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'OrderDetails'
IndexDefs = <>
Left = 157
Top = 159
end
object dsOrderDetails: TDADataSource
DataSet = dtOrderDetails.Dataset
DataTable = dtOrderDetails
Left = 158
Top = 188
end
end

View File

@ -0,0 +1,37 @@
unit BusinessRulesScripts_ClientData;
interface
uses {vcl:} SysUtils, Classes, DB, DBClient,
{RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
{Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
uDAScriptingProvider, uDACDSDataTable,
uDAPSScriptingProvider, uDADataStreamer, uDARemoteDataAdapter;
type
TBusinessRulesScripts_ClientDataModule = class(TDataModule)
ROMessage: TROBinMessage;
ROChannel: TROWinInetHTTPChannel;
RemoteService: TRORemoteService;
BinDataStreamer: TDABinDataStreamer;
dtProducts: TDACDSDataTable;
dsProducts: TDADataSource;
DAPSScriptingProvider: TDAPSScriptingProvider;
RemoteDataAdapter: TDARemoteDataAdapter;
dtOrderDetails: TDACDSDataTable;
dsOrderDetails: TDADataSource;
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessRulesScripts_ClientDataModule: TBusinessRulesScripts_ClientDataModule;
implementation
{$R *.dfm}
initialization
end.

View File

@ -0,0 +1,79 @@
object BusinessRulesScripts_ClientMainForm: TBusinessRulesScripts_ClientMainForm
Left = 163
Top = 30
AutoScroll = False
BorderWidth = 5
Caption = 'Business Rules Script Client'
ClientHeight = 316
ClientWidth = 565
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object BitBtn1: TBitBtn
Left = 0
Top = 0
Width = 169
Height = 25
Caption = 'Refresh Scripts from Server'
TabOrder = 0
OnClick = BitBtn1Click
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFA467698E5D598E5D598E5D598E5D598E5D598E
5D598E5D598E5D598E5D598E5D598E5D5980504BFF00FFFF00FFFF00FFA46769
FCEACEF3DABCF2D5B1F0D0A7EECB9EEDC793EDC28BE9BD81E9BD7FE9BD7FEFC4
8180504BFF00FFFF00FFFF00FFA0675BFEEFDAF6E0C6F2DABCF2D5B2C1C18800
7000007000BDB672E9BD82E9BD7FEFC48180504BFF00FFFF00FFFF00FFA0675B
FFF4E5F7E5CF007000C4CA97007000C2C187C0BD80007000BDB66FEABF81EFC4
8080504BFF00FFFF00FFFF00FFA7756BFFFBF0F8EADC007000007000C4C998F2
D5B1F0D0A9BFBD80007000EBC28AEFC58380504BFF00FFFF00FFFF00FFA7756B
FFFFFCFAF0E6007000007000007000F2DABAF2D5B1F0D0A7EECB9DEBC793F2C9
8C80504BFF00FFFF00FFFF00FFBC8268FFFFFFFEF7F2FAEFE6F8EAD9F7E3CFF6
E0C5007000007000007000EECC9EF3CE9780504BFF00FFFF00FFFF00FFBC8268
FFFFFFFFFEFC007000CADABAF7EADAF6E3CFC5CE9F007000007000F0D0A6F6D3
A080504BFF00FFFF00FFFF00FFD1926DFFFFFFFFFFFFCEE7CC007000CADAB8C9
D7B0007000C6CC9E007000F4D8B1EBCFA480504BFF00FFFF00FFFF00FFD1926D
FFFFFFFFFFFFFFFFFFCEE7CC007000007000C9D5B0F8E7D1FBEACEDECEB4B6AA
9380504BFF00FFFF00FFFF00FFDA9D75FFFFFFFFFFFFFFFFFFFFFFFFFFFEFCFC
F6EFFCF3E6EDD8C9A0675BA0675BA0675BA0675BFF00FFFF00FFFF00FFDA9D75
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFBFFFEF7DAC1BAA0675BE19E55E68F
31B56D4DFF00FFFF00FFFF00FFE7AB79FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFDCC7C5A0675BF8B55CBF7A5CFF00FFFF00FFFF00FFFF00FFE7AB79
FBF4F0FBF4EFFAF3EFFAF3EFF8F2EFF7F2EFF7F2EFD8C2C0A0675BC1836CFF00
FFFF00FFFF00FFFF00FFFF00FFE7AB79CF8E68CF8E68CF8E68CF8E68CF8E68CF
8E68CF8E68CF8E68A0675BFF00FFFF00FFFF00FFFF00FFFF00FF}
end
object gOrderDetails: TDBGrid
Left = 0
Top = 33
Width = 565
Height = 283
Align = alBottom
Anchors = [akLeft, akTop, akRight, akBottom]
DataSource = BusinessRulesScripts_ClientDataModule.dsOrderDetails
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'Tahoma'
TitleFont.Style = []
end
object DBNavigator1: TDBNavigator
Left = 176
Top = 0
Width = 370
Height = 25
DataSource = BusinessRulesScripts_ClientDataModule.dsOrderDetails
TabOrder = 2
end
end

View File

@ -0,0 +1,45 @@
unit BusinessRulesScripts_ClientMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
Buttons, ExtCtrls, DBCtrls, Grids, DBGrids;
type
TBusinessRulesScripts_ClientMainForm = class(TForm)
BitBtn1: TBitBtn;
gOrderDetails: TDBGrid;
DBNavigator1: TDBNavigator;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessRulesScripts_ClientMainForm: TBusinessRulesScripts_ClientMainForm;
implementation
uses
BusinessRulesScripts_ClientData;
{$R *.dfm}
procedure TBusinessRulesScripts_ClientMainForm.BitBtn1Click(Sender: TObject);
begin
BusinessRulesScripts_ClientDataModule.dtOrderDetails.LoadScript();
gOrderDetails.Refresh();
end;
procedure TBusinessRulesScripts_ClientMainForm.FormCreate(Sender: TObject);
begin
BusinessRulesScripts_ClientDataModule.dtOrderDetails.Open();
end;
end.

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{FFAC48F8-D2E5-4F68-9B69-0716120E4B35}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">BusinessRulesScripts_Server.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,23 @@
program BusinessRulesScripts_Server;
{#ROGEN:BusinessRulesScriptsLibrary.rodl} // RemObjects: Careful, do not remove!
uses
uROComInit,
Forms,
BusinessRulesScripts_ServerMain in 'BusinessRulesScripts_ServerMain.pas' {BusinessRulesScripts_ServerMainForm},
BusinessRulesScripts_ServerData in 'BusinessRulesScripts_ServerData.pas' {BusinessRulesScripts_ServerDataModule: TDataModule},
BusinessRulesScriptsLibrary_Intf in 'BusinessRulesScriptsLibrary_Intf.pas',
BusinessRulesScriptsLibrary_Invk in 'BusinessRulesScriptsLibrary_Invk.pas',
NewService_Impl in 'NewService_Impl.pas' {NewService: TDataAbstractService};
{$R *.res}
{$R RODLFile.res}
begin
Application.Initialize;
Application.Title := 'BusinessRulesScripts Server';
Application.CreateForm(TBusinessRulesScripts_ServerDataModule, BusinessRulesScripts_ServerDataModule);
Application.CreateForm(TBusinessRulesScripts_ServerMainForm, BusinessRulesScripts_ServerMainForm);
Application.Run;
end.

View File

@ -0,0 +1,80 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{61f4e143-e541-455f-bfd4-108c7175e3aa}</ProjectGuid>
<MainSource>BusinessRulesScripts_Server.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>BusinessRulesScripts_Server.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">BusinessRulesScripts_Server.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="BusinessRulesScripts_Server.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="BusinessRulesScriptsLibrary_Intf.pas" />
<DCCReference Include="BusinessRulesScriptsLibrary_Invk.pas" />
<DCCReference Include="BusinessRulesScripts_ServerData.pas">
<Form>BusinessRulesScripts_ServerDataModule</Form>
</DCCReference>
<DCCReference Include="BusinessRulesScripts_ServerMain.pas">
<Form>BusinessRulesScripts_ServerMainForm</Form>
</DCCReference>
<DCCReference Include="NewService_Impl.pas">
<Form>NewService</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,336 @@
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;Integrated Security=SSPI;'
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

View File

@ -0,0 +1,39 @@
unit BusinessRulesScripts_ServerData;
interface
uses
SysUtils, Classes,
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
uROBinMessage, uROIndyHTTPServer,
uDADriverManager, uDAClasses, uDAEngine, uDAADODriver, uROIndyTCPServer,
uDADataTable, uDABINAdapter;
type
TBusinessRulesScripts_ServerDataModule = class(TDataModule)
ROServer: TROIndyHTTPServer;
ROMessage: TROBinMessage;
DriverManager: TDADriverManager;
ConnectionManager: TDAConnectionManager;
Schema: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessRulesScripts_ServerDataModule: TBusinessRulesScripts_ServerDataModule;
implementation
{$R *.dfm}
procedure TBusinessRulesScripts_ServerDataModule.DataModuleCreate(Sender: TObject);
begin
ROServer.Active := true;
end;
end.

View File

@ -0,0 +1,40 @@
object BusinessRulesScripts_ServerMainForm: TBusinessRulesScripts_ServerMainForm
Left = 90
Top = 79
AutoScroll = False
BorderWidth = 5
Caption = 'Business Rules Scripts Server'
ClientHeight = 406
ClientWidth = 614
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
Left = 0
Top = 0
Width = 212
Height = 48
Cursor = crHandPoint
end
object ed_Script: TMemo
Left = 0
Top = 54
Width = 614
Height = 352
Align = alBottom
Anchors = [akLeft, akTop, akRight, akBottom]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ScrollBars = ssVertical
TabOrder = 0
OnChange = ed_ScriptChange
end
end

View File

@ -0,0 +1,45 @@
unit BusinessRulesScripts_ServerMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
uROBinMessage, uROIndyHTTPServer;
type
TBusinessRulesScripts_ServerMainForm = class(TForm)
RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
ed_Script: TMemo;
procedure FormCreate(Sender: TObject);
procedure ed_ScriptChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BusinessRulesScripts_ServerMainForm: TBusinessRulesScripts_ServerMainForm;
implementation
uses
BusinessRulesScripts_ServerData;
{$R *.dfm}
procedure TBusinessRulesScripts_ServerMainForm.FormCreate(Sender: TObject);
begin
with BusinessRulesScripts_ServerDataModule.Schema.Datasets.DatasetByName('OrderDetails').BusinessRulesClient do
ed_Script.Text := StringReplace(Script, #10, sLineBreak, [rfReplaceAll]);
end;
procedure TBusinessRulesScripts_ServerMainForm.ed_ScriptChange(Sender: TObject);
begin
with BusinessRulesScripts_ServerDataModule.Schema.Datasets.DatasetByName('OrderDetails').BusinessRulesClient do
Script := ed_Script.Text;
end;
end.

View File

@ -0,0 +1,15 @@
object NewService: TNewService
OldCreateOrder = True
AcquireConnection = True
ServiceSchema = BusinessRulesScripts_ServerDataModule.Schema
ServiceDataStreamer = BinDataStreamer
ExportedDataTables = <>
Left = 188
Top = 181
Height = 150
Width = 205
object BinDataStreamer: TDABinDataStreamer
Left = 33
Top = 18
end
end

View File

@ -0,0 +1,45 @@
unit NewService_Impl;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Ancestor Implementation:} DataAbstractService_Impl,
{Used RODLs:} DataAbstract4_Intf,
{Generated:} BusinessRulesScriptsLibrary_Intf, uDADataStreamer,
uDABinAdapter,uDAInterfaces;
type
{ TNewService }
TNewService = class(TDataAbstractService, INewService)
BinDataStreamer: TDABinDataStreamer;
private
protected
end;
implementation
{$R *.dfm}
uses
{Generated:} BusinessRulesScriptsLibrary_Invk, BusinessRulesScripts_ServerData,TypInfo;
procedure Create_NewService(out anInstance: IUnknown);
begin
anInstance := TNewService.Create(nil);
end;
initialization
TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker);
finalization
end.

View File

@ -0,0 +1,31 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="..\styles.css">
</head>
<body>
<img src="..\..\da.png" alt="" align=right>
<!-------------------------------------------------------------------------->
<p class="h1">
Calculated Fields Example
</p>
<h2>Purpose</h2>
<p>
This example shows how to handle calculated fields server side and client
side.
</p>
<h2>Examine the Code</h2>
<p>
<b>Server side</b> fields are processed via the <b>BinAdapter's OnWriteFieldValue</b>
event handler (see <b>CalcFieldsService_Impl</b>).
</p>
<p>
On the <b>client side</b>, they are handled as you would expect via <b>dtCustomers.OnCalcFields</b>
(see <b>CalcFields_ClientData</b>). Note though, how the client field actually references
the server value.
</p>
<!-------------------------------------------------------------------------->
</body>
</html>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Default.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{FEE7EB90-4635-4022-B5E9-A2E21086B02B}</Option>
</Option>
</PersonalityInfo>
<Default.Personality>
<Projects>
<Projects Name="CalcFields_Server.exe">CalcFields_Server.bdsproj</Projects>
<Projects Name="CalcFields_Client.exe">CalcFields_Client.bdsproj</Projects>
<Projects Name="Targets">CalcFields_Server.exe CalcFields_Client.exe</Projects>
</Projects>
<Dependencies/>
</Default.Personality>
</BorlandProject>

View File

@ -0,0 +1,23 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = CalcFields_Server.exe CalcFields_Client.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
CalcFields_Client.exe: CalcFields_Client.dpr
$(DCC)
CalcFields_Server.exe: CalcFields_Server.dpr
$(DCC)

View File

@ -0,0 +1,40 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{70b86ab1-4399-4031-8bb6-28a50d072647}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup />
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="CalcFields_Server">
<MSBuild Projects="CalcFields_Server.dproj" Targets="" />
</Target>
<Target Name="CalcFields_Server:Clean">
<MSBuild Projects="CalcFields_Server.dproj" Targets="Clean" />
</Target>
<Target Name="CalcFields_Server:Make">
<MSBuild Projects="CalcFields_Server.dproj" Targets="Make" />
</Target>
<Target Name="CalcFields_Client">
<MSBuild Projects="CalcFields_Client.dproj" Targets="" />
</Target>
<Target Name="CalcFields_Client:Clean">
<MSBuild Projects="CalcFields_Client.dproj" Targets="Clean" />
</Target>
<Target Name="CalcFields_Client:Make">
<MSBuild Projects="CalcFields_Client.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="CalcFields_Server;CalcFields_Client" />
</Target>
<Target Name="Clean">
<CallTarget Targets="CalcFields_Server:Clean;CalcFields_Client:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="CalcFields_Server:Make;CalcFields_Client:Make" />
</Target>
</Project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Library Name="CalcFieldsLibrary" UID="{A54F3492-C4C5-4161-8536-FE04F7DE88E5}" Version="3.0">
<Services>
<Service Name="CalcFieldsService" UID="{9D552847-0CCD-473A-81B3-795B66399143}" Ancestor="DataAbstractService">
<Interfaces>
<Interface Name="Default" UID="{7113FC5C-4AB9-4583-B4E6-5F7F5A975E0A}">
<Documentation><![CDATA[
Service NewService. This service has been automatically generated using the Data Abstract template you can find in the Templates directory.]]></Documentation><Operations>
</Operations>
</Interface>
</Interfaces>
</Service>
</Services>
<EventSinks>
</EventSinks>
<Structs>
</Structs>
<Enums>
</Enums>
<Arrays>
</Arrays>
<Uses>
<Use Name="DataAbstract" UID="{ED3B8FD7-802F-4482-BB4C-442C3FE64B4C}" Rodl="$(Data Abstract for Delphi)\Source\DataAbstract4.RODL" AbsoluteRodl="C:\Program Files (x86)\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4.RODL">
</Use></Uses>
</Library>

View File

@ -0,0 +1,82 @@
unit CalcFieldsLibrary_Intf;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
{$I Remobjects.inc}
interface
uses
{vcl:} Classes, TypInfo,
{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
{Used RODLs:} DataAbstract4_Intf;
const
{ Library ID }
LibraryUID = '{A54F3492-C4C5-4161-8536-FE04F7DE88E5}';
TargetNamespace = '';
{ Service Interface ID's }
ICalcFieldsService_IID : TGUID = '{7113FC5C-4AB9-4583-B4E6-5F7F5A975E0A}';
{ Event ID's }
type
{ Forward declarations }
ICalcFieldsService = interface;
{ Enumerateds }
{ ICalcFieldsService }
ICalcFieldsService = interface(IDataAbstractService)
['{7113FC5C-4AB9-4583-B4E6-5F7F5A975E0A}']
end;
{ CoCalcFieldsService }
CoCalcFieldsService = class
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ICalcFieldsService;
end;
{ TCalcFieldsService_Proxy }
TCalcFieldsService_Proxy = class(TDataAbstractService_Proxy, ICalcFieldsService)
protected
function __GetInterfaceName:string; override;
end;
implementation
uses
{vcl:} SysUtils,
{RemObjects:} uROEventRepository, uROSerializer, uRORes;
{ CoCalcFieldsService }
class function CoCalcFieldsService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ICalcFieldsService;
begin
result := TCalcFieldsService_Proxy.Create(aMessage, aTransportChannel);
end;
function TCalcFieldsService_Proxy.__GetInterfaceName:string;
begin
result := 'CalcFieldsService';
end;
initialization
RegisterProxyClass(ICalcFieldsService_IID, TCalcFieldsService_Proxy);
finalization
UnregisterProxyClass(ICalcFieldsService_IID);
end.

View File

@ -0,0 +1,35 @@
unit CalcFieldsLibrary_Invk;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
{$I Remobjects.inc}
interface
uses
{vcl:} Classes,
{RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Used RODL Intf's:} DataAbstract4_Intf,
{Used RODL Invk's:} DataAbstract4_Invk,
{Generated:} CalcFieldsLibrary_Intf;
type
TCalcFieldsService_Invoker = class(TDataAbstractService_Invoker)
private
protected
published
end;
implementation
uses
{RemObjects:} uRORes, uROClient;
initialization
end.

View File

@ -0,0 +1,83 @@
object CalcFieldsService: TCalcFieldsService
OldCreateOrder = True
OnCreate = DataAbstractServiceCreate
ServiceSchema = Schema
ServiceDataStreamer = DataStreamer
ExportedDataTables = <>
Height = 300
Width = 300
object DataStreamer: TDABin2DataStreamer
OnWriteFieldValue = DataStreamerWriteFieldValue
Left = 32
Top = 8
end
object Schema: TDASchema
ConnectionManager = CalcFields_ServerDataForm.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'ADO'
TargetTable = 'Customers'
SQL = 'SELECT '#10' CustomerID, CompanyName'#10#10' FROM'#10' Customers'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'CustomerID'
TableField = 'CustomerID'
end
item
DatasetField = 'CompanyName'
TableField = 'CompanyName'
end
item
DatasetField = 'ServerCalculated'
TableField = '<unknown>'
end>
end>
Name = 'Customers'
Fields = <
item
Name = 'CustomerID'
DataType = datString
Size = 5
InPrimaryKey = True
end
item
Name = 'CompanyName'
DataType = datString
Size = 40
end
item
Name = 'ServerCalculated'
DataType = datInteger
LogChanges = False
ReadOnly = True
ServerCalculated = True
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <>
RelationShips = <>
UpdateRules = <>
Version = 0
Left = 32
Top = 56
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 32
Top = 103
end
object bpCustomers: TDABusinessProcessor
Schema = Schema
ReferencedDataset = 'Customers'
ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 112
Top = 56
end
end

View File

@ -0,0 +1,75 @@
unit CalcFieldsService_Impl;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Ancestor Implementation:} DataAbstractService_Impl,
{Used RODLs:} DataAbstract4_Intf,
{Generated:} CalcFieldsLibrary_Intf, uDAScriptingProvider,
uDABusinessProcessor, uDAInterfaces, uDAClasses, uDADataStreamer,
uDABin2DataStreamer;
const
{ Dataset names for Schema }
ds_Customers = 'Customers';
type
{ TCalcFieldsService }
TCalcFieldsService = class(TDataAbstractService, ICalcFieldsService)
DataStreamer: TDABin2DataStreamer;
bpCustomers: TDABusinessProcessor;
Schema: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataStreamerWriteFieldValue(const aField: TDAField;
var Value: Variant);
procedure DataAbstractServiceCreate(Sender: TObject);
private
fNextCalcValue: Integer;
protected
end;
implementation
{$R *.dfm}
uses
{Generated:} CalcFieldsLibrary_Invk, CalcFields_ServerData;
procedure Create_CalcFieldsService(out anInstance: IUnknown);
begin
anInstance := TCalcFieldsService.Create(nil);
end;
{ CalcFieldsService }
procedure TCalcFieldsService.DataStreamerWriteFieldValue(
const aField: TDAField; var Value: Variant);
begin
if SameText(aField.Name, 'ServerCalculated') then
begin
Value := fNextCalcValue;
Inc(fNextCalcValue);
end;
end;
procedure TCalcFieldsService.DataAbstractServiceCreate(Sender: TObject);
begin
inherited;
fNextCalcValue := 100;
end;
initialization
TROClassFactory.Create('CalcFieldsService', Create_CalcFieldsService, TCalcFieldsService_Invoker);
finalization
end.

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{1F7E3666-5A67-4702-8BED-705025CE0211}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">CalcFields_Client.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>

View File

@ -0,0 +1,17 @@
program CalcFields_Client;
uses
uROComInit,
Forms,
CalcFields_ClientMain in 'CalcFields_ClientMain.pas' {CalcFields_ClientMainForm},
CalcFields_ClientData in 'CalcFields_ClientData.pas' {CalcFields_ClientDataForm: TDAClientDataModule};
{$R *.res}
begin
Application.Initialize;
Application.Title := 'CalcFields - Client';
Application.CreateForm(TCalcFields_ClientDataForm, CalcFields_ClientDataForm);
Application.CreateForm(TCalcFields_ClientMainForm, CalcFields_ClientMainForm);
Application.Run;
end.

View File

@ -0,0 +1,75 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{507351df-1ced-4f28-becd-e7e287bd9083}</ProjectGuid>
<MainSource>CalcFields_Client.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>CalcFields_Client.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1058</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">CalcFields_Client.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="CalcFields_Client.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="CalcFields_ClientData.pas">
<Form>CalcFields_ClientDataForm</Form>
</DCCReference>
<DCCReference Include="CalcFields_ClientMain.pas">
<Form>CalcFields_ClientMainForm</Form>
</DCCReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

Some files were not shown because too many files have changed in this diff Show More