object srvObras: TsrvObras OldCreateOrder = True OnCreate = DARemoteServiceCreate ConnectionName = 'IBX' ServiceSchema = schObras ServiceDataStreamer = Bin2DataStreamer AllowWhereSQL = True ExportedDataTables = <> Height = 220 Width = 370 object Diagrams: TDADiagrams Left = 150 Top = 82 DiagramData = ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + ''#13#10' '#13#10 + ''#13#10 end object DataDictionary: TDADataDictionary Fields = < item Name = 'Obras_CALLE' DataType = datString Size = 255 DisplayLabel = 'Calle' end item Name = 'Obras_PROVINCIA' DataType = datString Size = 255 DisplayLabel = 'Provincia' end item Name = 'Obras_POBLACION' DataType = datString Size = 255 DisplayLabel = 'Poblaci'#243'n' end item Name = 'Obras_CODIGO_POSTAL' DataType = datString Size = 10 DisplayLabel = 'C'#243'digo postal' end item Name = 'Obras_TELEFONO' DataType = datString Size = 25 DisplayLabel = 'Tel'#233'fono' end item Name = 'Obras_MOVIL' DataType = datString Size = 25 DisplayLabel = 'M'#243'vil' end item Name = 'Obras_FAX' DataType = datString Size = 25 DisplayLabel = 'Fax' end item Name = 'Obras_OBSERVACIONES' DataType = datMemo DisplayLabel = 'Observaciones' end item Name = 'Obras_ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' Required = True DisplayLabel = 'ID' ServerAutoRefresh = True end item Name = 'Obras_ID_EMPRESA' DataType = datInteger DisplayLabel = 'ID_EMPRESA' end item Name = 'Obras_FECHA_ALTA' DataType = datDateTime DisplayLabel = 'FECHA_ALTA' end item Name = 'Obras_PERSONA_CONTACTO' DataType = datString Size = 255 DisplayLabel = 'Persona de contacto' end item Name = 'Obras_FECHA_MODIFICACION' DataType = datDateTime DisplayLabel = 'FECHA_MODIFICACION' end item Name = 'Obras_USUARIO' DataType = datString Size = 20 DisplayLabel = 'USUARIO' end item Name = 'Obras_NOMBRE' DataType = datString Size = 255 DisplayLabel = 'Nombre' end item Name = 'Obras_ID_CLIENTE' DataType = datInteger end item Name = 'Obras_NOMBRE_CLIENTE' DataType = datString Size = 255 DisplayLabel = 'Cliente' end item Name = 'Obras_ID_SUBCONTRATA' DataType = datInteger end item Name = 'Obras_NOMBRE_SUBCONTRATA' DataType = datString Size = 255 DisplayLabel = 'Subcontrata' end item Name = 'Obras_ID_EJECUCION' DataType = datInteger DisplayLabel = 'ID_EJECUCION' end item Name = 'ObrasEjecuciones_ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJECUCIONES_ID' Required = True end item Name = 'ObrasEjecuciones_ID_OBRA' DataType = datInteger DisplayLabel = 'ID_OBRA' end item Name = 'ObrasEjecuciones_FECHA_INICIO' DataType = datDateTime DisplayLabel = 'Inicio' end item Name = 'ObrasEjecuciones_FECHA_FIN' DataType = datDateTime DisplayLabel = 'Finalizaci'#243'n' end item Name = 'ObrasEjecuciones_ID_SUBCONTRATA' DataType = datInteger DisplayLabel = 'ID_SUBCONTRATA' end item Name = 'ObrasEjecuciones_NOMBRE' DataType = datString Size = 255 DisplayLabel = 'Subcontrata' end item Name = 'ObrasEjecuciones_OBSERVACIONES' DataType = datMemo DisplayLabel = 'Observaciones' end item Name = 'ObrasEjecuciones_IMPORTE_GASTOS' DataType = datCurrency LogChanges = False DisplayLabel = 'Gastos' Alignment = taRightJustify end item Name = 'ObrasEjecuciones_IMPORTE_INGRESOS' DataType = datCurrency LogChanges = False DisplayLabel = 'Ingresos' Alignment = taRightJustify end item Name = 'ObrasEjecuciones_IMPORTE_TOTAL' DataType = datCurrency LogChanges = False DisplayLabel = 'Total' Alignment = taRightJustify end item Name = 'ObrasEjecuciones_FECHA_ALTA' DataType = datDateTime end item Name = 'ObrasEjecuciones_FECHA_MODIFICACION' DataType = datDateTime end item Name = 'ObrasEjecucionesPresupuestos_ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PRESUPUESTOS_ID' Required = True DisplayLabel = 'ID' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPresupuestos_ID_EJECUCION' DataType = datInteger DisplayLabel = 'ID_EJECUCION' end item Name = 'ObrasEjecucionesPresupuestos_ID_PRESUPUESTO' DataType = datInteger DisplayLabel = 'ID_PRESUPUESTO' end item Name = 'ObrasEjecucionesPedidosProveedor_ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PEDIDOS_PROV_ID' Required = True DisplayLabel = 'ID' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_ID_EJECUCION' DataType = datInteger DisplayLabel = 'ID_EJECUCION' end item Name = 'ObrasEjecucionesPedidosProveedor_ID_PEDIDO' DataType = datInteger DisplayLabel = 'ID_PEDIDO' end item Name = 'ObrasEjecucionesPedidosProveedor_ID_PRESUPUESTO' DataType = datInteger DisplayLabel = 'ID_PRESUPUESTO' end item Name = 'ObrasEjecucionesPresupuestos_REFERENCIA' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Referencia' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPresupuestos_FECHA_PRESUPUESTO' DataType = datDateTime LogChanges = False DisplayLabel = 'Fecha presupuesto' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPresupuestos_SITUACION' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Situaci'#243'n' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPresupuestos_BASE_IMPONIBLE' DataType = datCurrency LogChanges = False DisplayLabel = 'Base imponible' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPresupuestos_NOMBRE' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Nombre' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_SITUACION' DataType = datString Size = 9 LogChanges = False DisplayLabel = 'Situaci'#243'n' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_ID_PROVEEDOR' DataType = datInteger LogChanges = False DisplayLabel = 'ID_PROVEEDOR' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_NOMBRE' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Proveedor' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_REFERENCIA' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Referencia' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_FECHA_PEDIDO' DataType = datDateTime LogChanges = False DisplayLabel = 'Fecha pedido' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_FECHA_ENTREGA' DataType = datDateTime LogChanges = False DisplayLabel = 'Fecha de entrega' end item Name = 'ObrasEjecucionesPedidosProveedor_ID_ALMACEN' DataType = datInteger LogChanges = False DisplayLabel = 'ID_ALMACEN' end item Name = 'ObrasEjecucionesPedidosProveedor_NOMBRE_ALMACEN' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Almac'#233'n' end item Name = 'ObrasEjecucionesPedidosProveedor_ID_OBRA' DataType = datInteger LogChanges = False DisplayLabel = 'ID_OBRA' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_NOMBRE_OBRA' DataType = datString Size = 255 LogChanges = False DisplayLabel = 'Obra para reserva' ServerAutoRefresh = True end item Name = 'ObrasEjecucionesPedidosProveedor_BASE_IMPONIBLE' DataType = datCurrency LogChanges = False DisplayLabel = 'Base imponible' Alignment = taRightJustify ServerAutoRefresh = True end> Left = 150 Top = 22 end object schObras: 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 TargetTable = 'OBRAS' Name = 'IBX' SQL = 'Select ID, NOMBRE'#10'from ALMACENES'#10'where TIPO_ALMACEN = '#39'OBRA'#39#10'and' + ' ID_EMPRESA = :ID_EMPRESA'#10'order by NOMBRE'#10#10 StatementType = stSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'NOMBRE' TableField = 'NOMBRE' end> end> Name = 'ListaObras' Fields = < item Name = 'ID' DataType = datInteger end item Name = 'NOMBRE' DataType = datString Size = 255 end> end item Params = <> Statements = < item Connection = 'IBX' TargetTable = 'V_OBRAS' 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 = 'CALLE' TableField = 'CALLE' end item DatasetField = 'PROVINCIA' TableField = 'PROVINCIA' end item DatasetField = 'POBLACION' TableField = 'POBLACION' end item DatasetField = 'CODIGO_POSTAL' TableField = 'CODIGO_POSTAL' end item DatasetField = 'TELEFONO' TableField = 'TELEFONO' end item DatasetField = 'MOVIL' TableField = 'MOVIL' end item DatasetField = 'FAX' TableField = 'FAX' end item DatasetField = 'PERSONA_CONTACTO' TableField = 'PERSONA_CONTACTO' end item DatasetField = 'OBSERVACIONES' TableField = 'OBSERVACIONES' end item DatasetField = 'ID_CLIENTE' TableField = 'ID_CLIENTE' end item DatasetField = 'NOMBRE_CLIENTE' TableField = 'NOMBRE_CLIENTE' end item DatasetField = 'FECHA_ALTA' TableField = 'FECHA_ALTA' end item DatasetField = 'FECHA_MODIFICACION' TableField = 'FECHA_MODIFICACION' end item DatasetField = 'USUARIO' TableField = 'USUARIO' end item DatasetField = 'ID_EJECUCION' TableField = 'ID_EJECUCION' end> end> Name = 'Obras' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' ServerAutoRefresh = True DictionaryEntry = 'Obras_ID' InPrimaryKey = True end item Name = 'ID_EMPRESA' DataType = datInteger DictionaryEntry = 'Obras_ID_EMPRESA' end item Name = 'NOMBRE' DataType = datString Size = 255 DictionaryEntry = 'Obras_NOMBRE' end item Name = 'CALLE' DataType = datString Size = 255 DictionaryEntry = 'Obras_CALLE' end item Name = 'PROVINCIA' DataType = datString Size = 255 DictionaryEntry = 'Obras_PROVINCIA' end item Name = 'POBLACION' DataType = datString Size = 255 DictionaryEntry = 'Obras_POBLACION' end item Name = 'CODIGO_POSTAL' DataType = datString Size = 10 DictionaryEntry = 'Obras_CODIGO_POSTAL' end item Name = 'TELEFONO' DataType = datString Size = 25 DictionaryEntry = 'Obras_TELEFONO' end item Name = 'MOVIL' DataType = datString Size = 25 DictionaryEntry = 'Obras_MOVIL' end item Name = 'FAX' DataType = datString Size = 25 DictionaryEntry = 'Obras_FAX' end item Name = 'PERSONA_CONTACTO' DataType = datString Size = 255 DictionaryEntry = 'Obras_PERSONA_CONTACTO' end item Name = 'OBSERVACIONES' DataType = datMemo DictionaryEntry = 'Obras_OBSERVACIONES' end item Name = 'ID_CLIENTE' DataType = datInteger DictionaryEntry = 'Obras_ID_CLIENTE' end item Name = 'NOMBRE_CLIENTE' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'Obras_NOMBRE_CLIENTE' end item Name = 'FECHA_ALTA' DataType = datDateTime DictionaryEntry = 'Obras_FECHA_ALTA' end item Name = 'FECHA_MODIFICACION' DataType = datDateTime DictionaryEntry = 'Obras_FECHA_MODIFICACION' end item Name = 'USUARIO' DataType = datString Size = 20 DictionaryEntry = 'Obras_USUARIO' end item Name = 'ID_EJECUCION' DataType = datInteger ServerAutoRefresh = True end> end item Params = <> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PRESUPUESTOS' SQL = 'select obras_ejecuciones_presupuestos.id,'#10' obras_ejecucion' + 'es_presupuestos.id_ejecucion, obras_ejecuciones_presupuestos.id_' + 'presupuesto,'#10' presupuestos_cliente.referencia, presupuesto' + 's_cliente.fecha_presupuesto,'#10' presupuestos_cliente.situaci' + 'on, presupuestos_cliente.base_imponible,'#10' contactos.nombre' + #10'from obras_ejecuciones_presupuestos'#10'inner join presupuestos_cli' + 'ente on (presupuestos_cliente.id = obras_ejecuciones_presupuesto' + 's.id_presupuesto)'#10'inner join contactos on (contactos.id = presup' + 'uestos_cliente.id_cliente)'#10'where {where}'#10 StatementType = stSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'ID_EJECUCION' TableField = 'ID_EJECUCION' end item DatasetField = 'ID_PRESUPUESTO' TableField = 'ID_PRESUPUESTO' end item DatasetField = 'REFERENCIA' TableField = '' SQLOrigin = 'REFERENCIA' end item DatasetField = 'FECHA_PRESUPUESTO' TableField = '' SQLOrigin = 'FECHA_PRESUPUESTO' end item DatasetField = 'SITUACION' TableField = '' SQLOrigin = 'SITUACION' end item DatasetField = 'BASE_IMPONIBLE' TableField = '' SQLOrigin = 'BASE_IMPONIBLE' end item DatasetField = 'NOMBRE' TableField = '' SQLOrigin = 'NOMBRE' end> end> Name = 'ObrasEjecucionesPresupuestos' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PRESUPUESTOS_ID' DictionaryEntry = 'ObrasEjecucionesPresupuestos_ID' InPrimaryKey = True end item Name = 'ID_EJECUCION' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPresupuestos_ID_EJECUCION' end item Name = 'ID_PRESUPUESTO' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPresupuestos_ID_PRESUPUESTO' end item Name = 'REFERENCIA' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPresupuestos_REFERENCIA' end item Name = 'FECHA_PRESUPUESTO' DataType = datDateTime ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPresupuestos_FECHA_PRESUPUESTO' end item Name = 'SITUACION' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPresupuestos_SITUACION' end item Name = 'BASE_IMPONIBLE' DataType = datCurrency ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPresupuestos_BASE_IMPONIBLE' end item Name = 'NOMBRE' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPresupuestos_NOMBRE' end> end item Params = <> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PEDIDOS_PROV' SQL = 'select obras_ejecuciones_pedidos_prov.id,'#10' obras_ejecucion' + 'es_pedidos_prov.id_ejecucion,'#10' obras_ejecuciones_pedidos_p' + 'rov.id_pedido,'#10' obras_ejecuciones_pedidos_prov.id_presupue' + 'sto,'#10' v_ped_prov_situacion.situacion,'#10' pedidos_prove' + 'edor.id_proveedor,'#10' contactos.nombre,'#10' pedidos_prove' + 'edor.referencia,'#10' pedidos_proveedor.fecha_pedido,'#10' p' + 'edidos_proveedor.fecha_entrega,'#10' pedidos_proveedor.id_alma' + 'cen,'#10' almacenes.nombre as nombre_almacen,'#10' pedidos_p' + 'roveedor.id_obra,'#10' obras.nombre as nombre_obra,'#10' ped' + 'idos_proveedor.base_imponible'#10'from obras_ejecuciones_pedidos_pro' + 'v'#10' inner join v_ped_prov_situacion on (v_ped_prov_situacion.id' + '_pedido = obras_ejecuciones_pedidos_prov.id_pedido)'#10' inner joi' + 'n pedidos_proveedor on (pedidos_proveedor.id = obras_ejecuciones' + '_pedidos_prov.id_pedido)'#10' inner join contactos on (contactos.i' + 'd = pedidos_proveedor.id_proveedor)'#10' left outer join almacenes' + ' on (almacenes.id = pedidos_proveedor.id_almacen)'#10' left outer ' + 'join almacenes as obras on (obras.id = pedidos_proveedor.id_obra' + ')'#10'where {where}'#10 StatementType = stSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'ID_EJECUCION' TableField = 'ID_EJECUCION' end item DatasetField = 'ID_PEDIDO' TableField = 'ID_PEDIDO' end item DatasetField = 'ID_PRESUPUESTO' TableField = 'ID_PRESUPUESTO' end item DatasetField = 'ID_PROVEEDOR' TableField = '' SQLOrigin = 'ID_PROVEEDOR' end item DatasetField = 'NOMBRE' TableField = '' SQLOrigin = 'NOMBRE' end item DatasetField = 'REFERENCIA' TableField = '' SQLOrigin = 'REFERENCIA' end item DatasetField = 'FECHA_PEDIDO' TableField = '' SQLOrigin = 'FECHA_PEDIDO' end item DatasetField = 'FECHA_ENTREGA' TableField = '' SQLOrigin = 'FECHA_ENTREGA' end item DatasetField = 'ID_ALMACEN' TableField = '' SQLOrigin = 'ID_ALMACEN' end item DatasetField = 'ID_OBRA' TableField = '' SQLOrigin = 'ID_OBRA' end item DatasetField = 'BASE_IMPONIBLE' TableField = '' SQLOrigin = 'BASE_IMPONIBLE' end item DatasetField = 'NOMBRE_ALMACEN' TableField = '' SQLOrigin = 'NOMBRE_ALMACEN' end item DatasetField = 'NOMBRE_OBRA' TableField = '' SQLOrigin = 'NOMBRE_OBRA' end item DatasetField = 'SITUACION' TableField = '' SQLOrigin = 'SITUACION' end> end> Name = 'ObrasEjecucionesPedidosProveedor' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PEDIDOS_PROV_ID' ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID' InPrimaryKey = True end item Name = 'ID_EJECUCION' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_EJECUCION' end item Name = 'ID_PEDIDO' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_PEDIDO' end item Name = 'ID_PRESUPUESTO' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_PRESUPUESTO' end item Name = 'SITUACION' DataType = datString Size = 9 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_SITUACION' end item Name = 'ID_PROVEEDOR' DataType = datInteger ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_PROVEEDOR' end item Name = 'NOMBRE' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_NOMBRE' end item Name = 'REFERENCIA' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_REFERENCIA' end item Name = 'FECHA_PEDIDO' DataType = datDateTime ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_FECHA_PEDIDO' end item Name = 'FECHA_ENTREGA' DataType = datDateTime DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_FECHA_ENTREGA' end item Name = 'ID_ALMACEN' DataType = datInteger DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_ALMACEN' end item Name = 'NOMBRE_ALMACEN' DataType = datString Size = 255 DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_NOMBRE_ALMACEN' end item Name = 'ID_OBRA' DataType = datInteger ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_ID_OBRA' end item Name = 'NOMBRE_OBRA' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_NOMBRE_OBRA' end item Name = 'BASE_IMPONIBLE' DataType = datCurrency ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecucionesPedidosProveedor_BASE_IMPONIBLE' end> end item Params = <> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'V_OBRAS_EJECUCIONES' StatementType = stAutoSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'ID_OBRA' TableField = 'ID_OBRA' end item DatasetField = 'FECHA_INICIO' TableField = 'FECHA_INICIO' end item DatasetField = 'FECHA_FIN' TableField = 'FECHA_FIN' end item DatasetField = 'ID_SUBCONTRATA' TableField = 'ID_SUBCONTRATA' end item DatasetField = 'NOMBRE' TableField = 'NOMBRE' end item DatasetField = 'IMPORTE_GASTOS' TableField = 'IMPORTE_GASTOS' end item DatasetField = 'IMPORTE_INGRESOS' TableField = 'IMPORTE_INGRESOS' end item DatasetField = 'IMPORTE_TOTAL' TableField = 'IMPORTE_TOTAL' end item DatasetField = 'OBSERVACIONES' TableField = 'OBSERVACIONES' end item DatasetField = 'FECHA_ALTA' TableField = 'FECHA_ALTA' end item DatasetField = 'FECHA_MODIFICACION' TableField = 'FECHA_MODIFICACION' end> end> Name = 'ObrasEjecuciones' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJECUCIONES_ID' DictionaryEntry = 'ObrasEjecuciones_ID' InPrimaryKey = True end item Name = 'ID_OBRA' DataType = datInteger DictionaryEntry = 'ObrasEjecuciones_ID_OBRA' end item Name = 'FECHA_INICIO' DataType = datDateTime DictionaryEntry = 'ObrasEjecuciones_FECHA_INICIO' end item Name = 'FECHA_FIN' DataType = datDateTime DictionaryEntry = 'ObrasEjecuciones_FECHA_FIN' end item Name = 'ID_SUBCONTRATA' DataType = datInteger DictionaryEntry = 'ObrasEjecuciones_ID_SUBCONTRATA' end item Name = 'NOMBRE' DataType = datString Size = 255 DictionaryEntry = 'ObrasEjecuciones_NOMBRE' end item Name = 'IMPORTE_GASTOS' DataType = datCurrency ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecuciones_IMPORTE_GASTOS' end item Name = 'IMPORTE_INGRESOS' DataType = datCurrency ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecuciones_IMPORTE_INGRESOS' end item Name = 'IMPORTE_TOTAL' DataType = datCurrency ServerAutoRefresh = True DictionaryEntry = 'ObrasEjecuciones_IMPORTE_TOTAL' end item Name = 'OBSERVACIONES' DataType = datMemo DictionaryEntry = 'ObrasEjecuciones_OBSERVACIONES' end item Name = 'FECHA_ALTA' DataType = datDateTime DictionaryEntry = 'ObrasEjecuciones_FECHA_ALTA' end item Name = 'FECHA_MODIFICACION' DataType = datDateTime DictionaryEntry = 'ObrasEjecuciones_FECHA_MODIFICACION' end> end> JoinDataTables = <> UnionDataTables = <> Commands = < item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' Value = '' end item Name = 'ID_EMPRESA' Value = '' end item Name = 'NOMBRE' Value = '' end item Name = 'CALLE' Value = '' end item Name = 'PROVINCIA' Value = '' end item Name = 'POBLACION' Value = '' end item Name = 'CODIGO_POSTAL' Value = '' end item Name = 'TELEFONO' Value = '' end item Name = 'MOVIL' Value = '' end item Name = 'FAX' Value = '' end item Name = 'PERSONA_CONTACTO' Value = '' end item Name = 'OBSERVACIONES' Value = '' end item Name = 'USUARIO' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'INSERT'#10' INTO ALMACENES'#10' (ID, ID_EMPRESA, TIPO_ALMACEN, NOMBR' + 'E, CALLE, PROVINCIA, POBLACION, CODIGO_POSTAL,'#10' TELEFONO, MO' + 'VIL, FAX, PERSONA_CONTACTO, OBSERVACIONES, '#10' FECHA_ALTA, USU' + 'ARIO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, '#39'OBRA'#39', :NOMBRE, :CALLE, :' + 'PROVINCIA, :POBLACION,'#10' :CODIGO_POSTAL, :TELEFONO, :MOVIL, :' + 'FAX, :PERSONA_CONTACTO, '#10' :OBSERVACIONES, CURRENT_TIMESTAMP,' + ' :USUARIO)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_Obras' end item Params = < item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'DELETE '#10' FROM'#10' ALMACENES'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_Obras' end item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' Value = '' end item Name = 'ID_EMPRESA' Value = '' end item Name = 'NOMBRE' Value = '' end item Name = 'CALLE' Value = '' end item Name = 'PROVINCIA' Value = '' end item Name = 'POBLACION' Value = '' end item Name = 'CODIGO_POSTAL' Value = '' end item Name = 'TELEFONO' Value = '' end item Name = 'MOVIL' Value = '' end item Name = 'FAX' Value = '' end item Name = 'PERSONA_CONTACTO' Value = '' end item Name = 'OBSERVACIONES' Value = '' end item Name = 'USUARIO' Value = '' end item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'UPDATE ALMACENES'#10' SET'#10' ID = :ID,'#10' ID_EMPRESA = :ID_EMPRES' + 'A, '#10' NOMBRE = :NOMBRE, '#10' CALLE = :CALLE, '#10' PROVINCIA = ' + ':PROVINCIA, '#10' POBLACION = :POBLACION, '#10' CODIGO_POSTAL = :C' + 'ODIGO_POSTAL, '#10' TELEFONO = :TELEFONO, '#10' MOVIL = :MOVIL, '#10' ' + ' FAX = :FAX, '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO, '#10' O' + 'BSERVACIONES = :OBSERVACIONES, '#10' FECHA_MODIFICACION = CURRENT' + '_TIMESTAMP,'#10' USUARIO = :USUARIO'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_Obras' end item Params = < item Name = 'ID_ALMACEN' DataType = datInteger Value = '0' end item Name = 'ID_CLIENTE' DataType = datInteger Value = '0' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_DATOS' SQL = 'INSERT'#10' INTO OBRAS_DATOS'#10' (ID_ALMACEN, ID_CLIENTE)'#10' VALUES'#10 + ' (:ID_ALMACEN, :ID_CLIENTE)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_OBRAS_DATOS' end item Params = < item Name = 'OLD_ID_ALMACEN' DataType = datInteger Value = '0' end> Statements = < item ConnectionType = 'Interbase' TargetTable = 'OBRAS_DATOS' SQL = 'DELETE '#10' FROM'#10' OBRAS_DATOS'#10' WHERE'#10' (ID_ALMACEN = :OLD_ID' + '_ALMACEN)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_OBRAS_DATOS' end item Params = < item Name = 'ID_CLIENTE' Value = '' end item Name = 'OLD_ID_ALMACEN' Value = '' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_DATOS' SQL = 'UPDATE OBRAS_DATOS'#10' SET '#10' ID_CLIENTE = :ID_CLIENTE'#10' WHERE'#10' ' + ' (ID_ALMACEN = :OLD_ID_ALMACEN)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_OBRAS_DATOS' end item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJECUCIONES_ID' Value = '' end item Name = 'ID_OBRA' DataType = datInteger Value = '0' end item Name = 'FECHA_INICIO' DataType = datDateTime Value = '0:00:00' end item Name = 'FECHA_FIN' DataType = datDateTime Value = '0:00:00' end item Name = 'ID_SUBCONTRATA' DataType = datInteger Value = '0' end item Name = 'OBSERVACIONES' DataType = datMemo Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES' SQL = 'INSERT'#10' INTO OBRAS_EJECUCIONES'#10' (ID, ID_OBRA, FECHA_INICIO, ' + 'FECHA_FIN, ID_SUBCONTRATA, '#10' OBSERVACIONES, FECHA_ALTA)'#10' VA' + 'LUES'#10' (:ID, :ID_OBRA, :FECHA_INICIO, :FECHA_FIN, :ID_SUBCONTR' + 'ATA, '#10' :OBSERVACIONES, CURRENT_TIMESTAMP)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_OBRAS_EJECUCIONES' end item Params = < item Name = 'OLD_ID' DataType = datInteger Value = '0' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES' SQL = 'DELETE '#10' FROM'#10' OBRAS_EJECUCIONES'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_OBRAS_EJECUCIONES' end item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJECUCIONES_ID' Value = '' end item Name = 'ID_OBRA' Value = '' end item Name = 'FECHA_INICIO' Value = '' end item Name = 'FECHA_FIN' Value = '' end item Name = 'ID_SUBCONTRATA' Value = '' end item Name = 'OBSERVACIONES' Value = '' end item Name = 'OLD_ID' Value = '' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES' SQL = 'UPDATE OBRAS_EJECUCIONES'#10' SET'#10' ID = :ID,'#10' ID_OBRA = :ID_O' + 'BRA,'#10' FECHA_INICIO = :FECHA_INICIO, '#10' FECHA_FIN = :FECHA_F' + 'IN, '#10' ID_SUBCONTRATA = :ID_SUBCONTRATA, '#10' OBSERVACIONES = ' + ':OBSERVACIONES,'#10' FECHA_MODIFICACION = CURRENT_TIMESTAMP'#10' WHE' + 'RE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_OBRAS_EJECUCIONES' end item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PRESUPUESTOS_ID' Value = '0' end item Name = 'ID_EJECUCION' DataType = datInteger Value = '0' end item Name = 'ID_PRESUPUESTO' DataType = datInteger Value = '0' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PRESUPUESTOS' SQL = 'INSERT'#10' INTO OBRAS_EJECUCIONES_PRESUPUESTOS'#10' (ID, ID_EJECUCI' + 'ON, ID_PRESUPUESTO)'#10' VALUES'#10' (:ID, :ID_EJECUCION, :ID_PRESUP' + 'UESTO)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_OBRAS_EJECUCIONES_PRESUPUESTOS' end item Params = < item Name = 'OLD_ID' DataType = datInteger Value = '0' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PRESUPUESTOS' SQL = 'DELETE '#10' FROM'#10' OBRAS_EJECUCIONES_PRESUPUESTOS'#10' WHERE'#10' (I' + 'D = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_OBRAS_EJECUCIONES_PRESUPUESTOS' end item Params = < item Name = 'ID_EJECUCION' Value = '' end item Name = 'ID_PRESUPUESTO' Value = '' end item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PRESUPUESTOS' SQL = 'UPDATE OBRAS_EJECUCIONES_PRESUPUESTOS'#10' SET '#10' ID_EJECUCION = ' + ':ID_EJECUCION,'#10' ID_PRESUPUESTO = :ID_PRESUPUESTO'#10' WHERE'#10' ' + '(ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_OBRAS_EJECUCIONES_PRESUPUESTOS' end item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_OBRAS_EJEC_PEDIDOS_PROV_ID' Value = '' end item Name = 'ID_EJECUCION' Value = '' end item Name = 'ID_PEDIDO' Value = '' end item Name = 'ID_PRESUPUESTO' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PEDIDOS_PROV' SQL = 'INSERT'#10' INTO OBRAS_EJECUCIONES_PEDIDOS_PROV'#10' (ID, ID_EJECUCI' + 'ON, ID_PEDIDO, ID_PRESUPUESTO)'#10' VALUES'#10' (:ID, :ID_EJECUCION,' + ' :ID_PEDIDO, :ID_PRESUPUESTO)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_OBRAS_EJECUCIONES_PEDIDOS_PROV' end item Params = < item Name = 'OLD_ID' DataType = datAutoInc Value = '0' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PEDIDOS_PROV' SQL = 'DELETE '#10' FROM'#10' OBRAS_EJECUCIONES_PEDIDOS_PROV'#10' WHERE'#10' (I' + 'D = :OLD_ID)' StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_OBRAS_EJECUCIONES_PEDIDOS_PROV' end item Params = < item Name = 'ID_EJECUCION' Value = '' end item Name = 'ID_PEDIDO' Value = '' end item Name = 'ID_PRESUPUESTO' Value = '' end item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_EJECUCIONES_PEDIDOS_PROV' SQL = 'UPDATE OBRAS_EJECUCIONES_PEDIDOS_PROV'#10' SET '#10' ID_EJECUCION = ' + ':ID_EJECUCION, '#10' ID_PEDIDO = :ID_PEDIDO, '#10' ID_PRESUPUESTO ' + '= :ID_PRESUPUESTO'#10' WHERE'#10' (ID = :OLD_ID)' StatementType = stSQL ColumnMappings = <> end> Name = 'Update_OBRAS_EJECUCIONES_PEDIDOS_PROV' end> RelationShips = < item Name = 'FK_ObrasEjecuciones_Obras' MasterDatasetName = 'Obras' MasterFields = 'ID' DetailDatasetName = 'ObrasEjecuciones' DetailFields = 'ID_OBRA' RelationshipType = rtForeignKey end item Name = 'FK_ObrasEjecucionesPresupuestos_ObrasEjecuciones' MasterDatasetName = 'ObrasEjecuciones' MasterFields = 'ID' DetailDatasetName = 'ObrasEjecucionesPresupuestos' DetailFields = 'ID_EJECUCION' RelationshipType = rtForeignKey end item Name = 'FK_ObrasEjecucionesPedidosProveedor_ObrasEjecuciones' MasterDatasetName = 'ObrasEjecuciones' MasterFields = 'ID' DetailDatasetName = 'ObrasEjecucionesPedidosProveedor' DetailFields = 'ID_EJECUCION' RelationshipType = rtForeignKey end> UpdateRules = < item Name = 'Insert Obras' DoUpdate = False DoDelete = False DatasetName = 'Obras' FailureBehavior = fbRaiseException end item Name = 'Insert ObrasEjecuciones' DoUpdate = False DoDelete = False DatasetName = 'ObrasEjecuciones' FailureBehavior = fbRaiseException end item Name = 'Insert ObrasEjecucionesPresupuestos' DoUpdate = False DoDelete = False DatasetName = 'ObrasEjecucionesPresupuestos' FailureBehavior = fbRaiseException end item Name = 'Insert ObrasEjecucionesPedidosProveedor' DoUpdate = False DoDelete = False DatasetName = 'ObrasEjecucionesPedidosProveedor' FailureBehavior = fbRaiseException end item Name = 'Update Obras' DoInsert = False DoDelete = False DatasetName = 'Obras' FailureBehavior = fbRaiseException end item Name = 'Update ObrasEjecuciones' DoInsert = False DoDelete = False DatasetName = 'ObrasEjecuciones' FailureBehavior = fbRaiseException end item Name = 'Update ObrasEjecucionesPresupuestos' DoInsert = False DoDelete = False DatasetName = 'ObrasEjecucionesPresupuestos' FailureBehavior = fbRaiseException end item Name = 'Update ObrasEjecucionesPedidosProveedor' DoInsert = False DoDelete = False DatasetName = 'ObrasEjecucionesPedidosProveedor' FailureBehavior = fbRaiseException end item Name = 'Delete ObrasEjecucionesPedidosProveedor' DoUpdate = False DoInsert = False DatasetName = 'ObrasEjecucionesPedidosProveedor' FailureBehavior = fbRaiseException end item Name = 'Delete ObrasEjecucionesPresupuestos' DoUpdate = False DoInsert = False DatasetName = 'ObrasEjecucionesPresupuestos' FailureBehavior = fbRaiseException end item Name = 'Delete ObrasEjecuciones' DoUpdate = False DoInsert = False DatasetName = 'ObrasEjecuciones' FailureBehavior = fbRaiseException end item Name = 'Delete Obras' DoUpdate = False DoInsert = False DatasetName = 'Obras' FailureBehavior = fbRaiseException end> Version = 0 Left = 48 Top = 24 end object Bin2DataStreamer: TDABin2DataStreamer Left = 48 Top = 80 end object bpObras: TDABusinessProcessor Schema = schObras InsertCommandName = 'Insert_Obras' DeleteCommandName = 'Delete_Obras' UpdateCommandName = 'Update_Obras' ReferencedDataset = 'Obras' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 256 Top = 24 end object bpObrasEjecuciones: TDABusinessProcessor Schema = schObras InsertCommandName = 'Insert_OBRAS_EJECUCIONES' DeleteCommandName = 'Delete_OBRAS_EJECUCIONES' UpdateCommandName = 'Update_OBRAS_EJECUCIONES' ReferencedDataset = 'ObrasEjecuciones' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 256 Top = 80 end object bpObrasEjecucionesPresupuestos: TDABusinessProcessor Schema = schObras InsertCommandName = 'Insert_OBRAS_EJECUCIONES_PRESUPUESTOS' DeleteCommandName = 'Delete_OBRAS_EJECUCIONES_PRESUPUESTOS' UpdateCommandName = 'Update_OBRAS_EJECUCIONES_PRESUPUESTOS' ReferencedDataset = 'ObrasEjecucionesPresupuestos' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 256 Top = 144 end object bpObrasEjecucionesPedidosProv: TDABusinessProcessor Schema = schObras InsertCommandName = 'Insert_OBRAS_EJECUCIONES_PEDIDOS_PROV' DeleteCommandName = 'Delete_OBRAS_EJECUCIONES_PEDIDOS_PROV' UpdateCommandName = 'Update_OBRAS_EJECUCIONES_PEDIDOS_PROV' ReferencedDataset = 'ObrasEjecucionesPedidosProveedor' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 88 Top = 144 end end