From 104245b3c1a65bd367e78325cc93c8bceb887a57 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 3 Oct 2007 16:26:44 +0000 Subject: [PATCH] git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/branches/D2007-DA5@32 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Base_Group.groupproj | 26 +----- .../Configuracion/srvConfiguracion_Impl.dfm | 57 +++++++++++++ .../Configuracion/srvConfiguracion_Impl.pas | 80 +++++++++++++++++++ Source/Servidor/FactuGES_Server.bdsproj | 35 ++++---- Source/Servidor/FactuGES_Server.dpr | 27 ++++++- 5 files changed, 180 insertions(+), 45 deletions(-) create mode 100644 Source/Servidor/Configuracion/srvConfiguracion_Impl.dfm create mode 100644 Source/Servidor/Configuracion/srvConfiguracion_Impl.pas diff --git a/Source/Base_Group.groupproj b/Source/Base_Group.groupproj index ef4ef9aa..2076a8e0 100644 --- a/Source/Base_Group.groupproj +++ b/Source/Base_Group.groupproj @@ -5,8 +5,6 @@ - - Default.Personality @@ -23,32 +21,14 @@ - - - - - - - - - - - - - - - - - - - + - + - + \ No newline at end of file diff --git a/Source/Servidor/Configuracion/srvConfiguracion_Impl.dfm b/Source/Servidor/Configuracion/srvConfiguracion_Impl.dfm new file mode 100644 index 00000000..95fac36b --- /dev/null +++ b/Source/Servidor/Configuracion/srvConfiguracion_Impl.dfm @@ -0,0 +1,57 @@ +object srvConfiguracion: TsrvConfiguracion + OldCreateOrder = True + OnCreate = DARemoteServiceCreate + SessionManager = dmServer.SessionManager + ConnectionName = 'IBX' + ServiceSchema = schConfiguracion + ServiceDataStreamer = Bin2DataStreamer + ExportedDataTables = <> + BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection + Height = 160 + Width = 300 + object schConfiguracion: TDASchema + ConnectionManager = dmServer.ConnectionManager + Datasets = < + item + Params = < + item + Name = 'CODIGO' + DataType = datString + Size = 50 + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + TargetTable = 'CONFIGURACION' + SQL = 'SELECT VALOR'#10'FROM CONFIGURACION'#10'WHERE CODIGO = :CODIGO' + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'VALOR' + TableField = 'VALOR' + end> + end> + Name = 'darValor' + Fields = < + item + Name = 'VALOR' + DataType = datString + Size = 100 + end> + end> + JoinDataTables = <> + UnionDataTables = <> + Commands = <> + RelationShips = <> + UpdateRules = <> + Version = 0 + Left = 40 + Top = 16 + end + object Bin2DataStreamer: TDABin2DataStreamer + Left = 40 + Top = 80 + end +end diff --git a/Source/Servidor/Configuracion/srvConfiguracion_Impl.pas b/Source/Servidor/Configuracion/srvConfiguracion_Impl.pas new file mode 100644 index 00000000..9f64d02c --- /dev/null +++ b/Source/Servidor/Configuracion/srvConfiguracion_Impl.pas @@ -0,0 +1,80 @@ +unit srvConfiguracion_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:} FactuGES_Intf, uDAClasses, uDAScriptingProvider, + uDABusinessProcessor, uDADataTable, uDABINAdapter, uDADataStreamer, + uDABin2DataStreamer; + + +type + { TsrvConfiguracion } + TsrvConfiguracion = class(TDataAbstractService, IsrvConfiguracion) + schConfiguracion: TDASchema; + Bin2DataStreamer: TDABin2DataStreamer; + procedure DARemoteServiceCreate(Sender: TObject); + procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject; + var aConnectionName: string); + protected + { IsrvConfiguracion methods } + function DarValor(const CODIGO: String): String; + end; + +implementation + +{$R *.dfm} +uses + {Generated:} FactuGES_Invk, uDAInterfaces, uDataModuleServer, Variants, + uROClasses; + +procedure Create_srvConfiguracion(out anInstance : IUnknown); +begin + anInstance := TsrvConfiguracion.Create(NIL); +end; + +{ srvConfiguracion } +procedure TsrvConfiguracion.DARemoteServiceCreate(Sender: TObject); +begin + SessionManager := dmServer.SessionManager; +end; + +function TsrvConfiguracion.DarValor(const CODIGO: String): String; +var + ADataSet : IDADataset; +begin + try + ADataSet := schConfiguracion.NewDataset(Connection, 'darValor', ['CODIGO'], [CODIGO]); + ADataSet.Open; + if ADataSet.Dataset.RecordCount > 0 then + Result := ADataSet.Dataset.Fields[0].AsVariant + else + RaiseError('Falta variable de configuracion: ' + CODIGO); + finally + ADataSet.Close; + end; +end; + +procedure TsrvConfiguracion.DataAbstractServiceBeforeAcquireConnection( + aSender: TObject; var aConnectionName: string); +begin + ConnectionName := dmServer.ConnectionName; +end; + +initialization + TROClassFactory.Create('srvConfiguracion', Create_srvConfiguracion, TsrvConfiguracion_Invoker); + +finalization + +end. diff --git a/Source/Servidor/FactuGES_Server.bdsproj b/Source/Servidor/FactuGES_Server.bdsproj index 85c49886..66408e46 100644 --- a/Source/Servidor/FactuGES_Server.bdsproj +++ b/Source/Servidor/FactuGES_Server.bdsproj @@ -103,16 +103,17 @@ True True True - True - True - True - True - True - True - True - True - True - + + True + True + True + True + True + True + True + True + True + 3 0 @@ -180,15 +181,13 @@ domingo, 30 de septiembre de 2007 20:47 - - - RemObjects Pascal Script - RemObjects SDK 3.0 Integration - - False - - - + + + False + + + False