object srvEjercicios: TsrvEjercicios OldCreateOrder = True OnCreate = DARemoteServiceCreate SessionManager = dmServer.SessionManager ServiceSchema = schEjercicios ServiceDataStreamer = Bin2DataStreamer ExportedDataTables = <> BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection Height = 181 Width = 350 object Diagrams: TDADiagrams Left = 150 Top = 90 DiagramData = ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 end object DataDictionary: TDADataDictionary Fields = < item Name = 'Ejercicios_ID' DataType = datAutoInc GeneratorName = 'GEN_CONT_EJERCICIOS_ID' Required = True DisplayLabel = 'ID' ServerAutoRefresh = True end item Name = 'Ejercicios_NOMBRE' DataType = datString Size = 255 DisplayLabel = 'Nombre' end item Name = 'Ejercicios_FECHA_INICIO' DataType = datDateTime DisplayLabel = 'Fecha inicio' end item Name = 'Ejercicios_FECHA_FIN' DataType = datDateTime DisplayLabel = 'Fecha fin' end item Name = 'Ejercicios_ESTADO' DataType = datString Size = 255 DisplayLabel = 'Estado' end item Name = 'Ejercicios_LONG_SUB_CUENTA' DataType = datSmallInt DisplayLabel = 'Long. Subcuenta' end item Name = 'Ejercicios_ID_ASIENTO_APERTURA' DataType = datInteger end item Name = 'Ejercicios_ID_ASIENTO_PERYGAN' DataType = datInteger end item Name = 'Ejercicios_ID_ASIENTO_CIERRE' DataType = datInteger end item Name = 'Ejercicios_ID_EMPRESA' DataType = datInteger end item Name = 'Ejercicios_ACTIVO' DataType = datSmallInt ServerAutoRefresh = True end> Left = 150 Top = 24 end object schEjercicios: TDASchema ConnectionManager = dmServer.ConnectionManager DataDictionary = DataDictionary Diagrams = Diagrams Datasets = < item Params = < item Name = 'ID_EMPRESA' Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True Name = 'IBX' SQL = 'select ID'#10'from cont_ejercicios'#10'where cont_ejercicios.activo = 1'#10 + 'and cont_ejercicios.id_empresa = :ID_EMPRESA'#10 StatementType = stSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end> end> Name = 'darEjercicioActivo' Fields = < item Name = 'ID' DataType = datInteger end> end item Params = <> Statements = < item Connection = 'IBX' TargetTable = 'CONT_EJERCICIOS' StatementType = stAutoSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'ID_EMPRESA' TableField = 'ID_EMPRESA' end item DatasetField = 'NOMBRE' TableField = 'NOMBRE' end item DatasetField = 'FECHA_INICIO' TableField = 'FECHA_INICIO' end item DatasetField = 'FECHA_FIN' TableField = 'FECHA_FIN' end item DatasetField = 'ESTADO' TableField = 'ESTADO' end item DatasetField = 'LONG_SUB_CUENTA' TableField = 'LONG_SUB_CUENTA' end item DatasetField = 'ID_ASIENTO_APERTURA' TableField = 'ID_ASIENTO_APERTURA' end item DatasetField = 'ID_ASIENTO_PERYGAN' TableField = 'ID_ASIENTO_PERYGAN' end item DatasetField = 'ID_ASIENTO_CIERRE' TableField = 'ID_ASIENTO_CIERRE' end item DatasetField = 'ACTIVO' TableField = 'ACTIVO' end> end> Name = 'Ejercicios' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_CONT_EJERCICIOS_ID' ServerAutoRefresh = True DictionaryEntry = 'Ejercicios_ID' InPrimaryKey = True end item Name = 'ID_EMPRESA' DataType = datInteger DictionaryEntry = 'Ejercicios_ID_EMPRESA' end item Name = 'NOMBRE' DataType = datString Size = 255 DictionaryEntry = 'Ejercicios_NOMBRE' end item Name = 'FECHA_INICIO' DataType = datDateTime DictionaryEntry = 'Ejercicios_FECHA_INICIO' end item Name = 'FECHA_FIN' DataType = datDateTime DictionaryEntry = 'Ejercicios_FECHA_FIN' end item Name = 'ESTADO' DataType = datString Size = 255 DictionaryEntry = 'Ejercicios_ESTADO' end item Name = 'LONG_SUB_CUENTA' DataType = datSmallInt DictionaryEntry = 'Ejercicios_LONG_SUB_CUENTA' end item Name = 'ID_ASIENTO_APERTURA' DataType = datInteger DictionaryEntry = 'Ejercicios_ID_ASIENTO_APERTURA' end item Name = 'ID_ASIENTO_PERYGAN' DataType = datInteger DictionaryEntry = 'Ejercicios_ID_ASIENTO_PERYGAN' end item Name = 'ID_ASIENTO_CIERRE' DataType = datInteger DictionaryEntry = 'Ejercicios_ID_ASIENTO_CIERRE' end item Name = 'ACTIVO' DataType = datSmallInt DictionaryEntry = 'Ejercicios_ACTIVO' end> end> JoinDataTables = <> UnionDataTables = <> Commands = < item Params = < item Name = 'id' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True Name = 'IBX' SQL = 'update cont_ejercicios'#10'set activo = 1'#10'where id = (select max(id)' + #10'from cont_ejercicios'#10'where (id <> :id))'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'SetUltimoEjercicioActivo' end item Params = < item Name = 'id_empresa' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True Name = 'IBX' SQL = 'execute procedure proc_set_ejercicios_noactivos :id_empresa'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'SetEjerciciosNoActivos' end item Params = < item Name = 'id_ejercicio_copia' Value = '' end item Name = 'id_ejercicio' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True Name = 'IBX' SQL = 'execute procedure proc_new_pgc :id_ejercicio_copia, :id_ejercici' + 'o'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'GenerarPGC' end item Params = < item Name = 'id_ejercicio_cierre' Value = '' end item Name = 'id_ejercicio_apertura' Value = '' end> Statements = < item Connection = 'IBX' SQL = 'execute procedure PROC_CIERRE_APERTURA :id_ejercicio_cierre, :id' + '_ejercicio_apertura'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'CerrarEjercicio' end> RelationShips = <> UpdateRules = <> Version = 0 Left = 48 Top = 24 end object Bin2DataStreamer: TDABin2DataStreamer Left = 48 Top = 88 end object bpEjercicios: TDABusinessProcessor Schema = schEjercicios ReferencedDataset = 'Ejercicios' ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 248 Top = 24 end end