diff --git a/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.dfm b/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.dfm
new file mode 100644
index 0000000..e2a0e00
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.dfm
@@ -0,0 +1,86 @@
+object srvTiposDocumento: TsrvTiposDocumento
+ OldCreateOrder = True
+ OnCreate = DARemoteServiceCreate
+ ServiceSchema = schTiposDocumento
+ ServiceDataStreamer = Bin2DataStreamer
+ ExportedDataTables = <>
+ BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
+ Height = 300
+ Width = 334
+ object Diagrams: TDADiagrams
+ Left = 150
+ Top = 88
+ DiagramData = ''#13#10''#13#10
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <
+ item
+ Name = 'TiposDocumento_ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_TIPOS_DOCUMENTO_ID'
+ Required = True
+ DisplayLabel = 'ID'
+ end
+ item
+ Name = 'TiposDocumento_DESCRIPCION'
+ DataType = datString
+ Size = 255
+ end>
+ Left = 150
+ Top = 24
+ end
+ object schTiposDocumento: TDASchema
+ ConnectionManager = dmServer.ConnectionManager
+ DataDictionary = DataDictionary
+ Diagrams = Diagrams
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'TIPOS_DOCUMENTO'
+ StatementType = stAutoSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'DESCRIPCION'
+ TableField = 'DESCRIPCION'
+ end>
+ end>
+ Name = 'TiposDocumento'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_TIPOS_DOCUMENTO_ID'
+ ServerAutoRefresh = True
+ DictionaryEntry = 'TiposDocumento_ID'
+ InPrimaryKey = True
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 255
+ DictionaryEntry = 'TiposDocumento_DESCRIPCION'
+ end>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 48
+ Top = 24
+ end
+ object Bin2DataStreamer: TDABin2DataStreamer
+ Left = 48
+ Top = 88
+ end
+end
diff --git a/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.pas b/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.pas
new file mode 100644
index 0000000..b18559f
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Servidor/srvTiposDocumento_Impl.pas
@@ -0,0 +1,63 @@
+unit srvTiposDocumento_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:} uDABusinessProcessor, uDABin2DataStreamer, uDADataStreamer,
+ uDAScriptingProvider, uDAClasses,
+ FactuGES_Intf, uDAInterfaces;
+
+type
+ { TsrvUnidadesMedida }
+ TsrvTiposDocumento = class(TDataAbstractService, IsrvTiposDocumento)
+ Diagrams: TDADiagrams;
+ Bin2DataStreamer: TDABin2DataStreamer;
+ schTiposDocumento: TDASchema;
+ DataDictionary: TDADataDictionary;
+ procedure DARemoteServiceCreate(Sender: TObject);
+ procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
+ var aConnectionName: string);
+ private
+ protected
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils;
+
+procedure Create_srvTiposDocumento(out anInstance : IUnknown);
+begin
+ anInstance := TsrvTiposDocumento.Create(NIL);
+end;
+
+{ srvUnidadesMedida }
+procedure TsrvTiposDocumento.DARemoteServiceCreate(Sender: TObject);
+begin
+ //SessionManager := dmServer.SessionManager;
+end;
+
+procedure TsrvTiposDocumento.DataAbstractServiceBeforeAcquireConnection(
+ aSender: TObject; var aConnectionName: string);
+begin
+ ConnectionName := dmServer.ConnectionName;
+end;
+
+initialization
+ TROClassFactory.Create('srvTiposDocumento', Create_srvTiposDocumento, TsrvTiposDocumento_Invoker);
+
+finalization
+
+end.
diff --git a/Source/Modulos/TiposDocumento/TiposDocumento_Group.groupproj b/Source/Modulos/TiposDocumento/TiposDocumento_Group.groupproj
new file mode 100644
index 0000000..b3f54c7
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/TiposDocumento_Group.groupproj
@@ -0,0 +1,124 @@
+
+
+ {033276d8-059f-49be-9cc2-3276e536a74d}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dpk b/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dpk
new file mode 100644
index 0000000..e756220
Binary files /dev/null and b/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dpk differ
diff --git a/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dproj b/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dproj
new file mode 100644
index 0000000..eb03139
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Views/TiposDocumento_view.dproj
@@ -0,0 +1,545 @@
+
+
+ {e3d36a6f-7004-4c89-9f3d-f2d77e386d1b}
+ TiposDocumento_view.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\..\..\Output\Debug\Cliente\TiposDocumento_view.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ .\
+ .\
+ .\
+ ..\..\..\..\Output\Release\Cliente
+ ..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ RELEASE
+
+
+ 7.0
+ .\
+ .\
+ .\
+ ..\..\..\..\Output\Debug\Cliente
+ ..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+ ..\..\..\Lib;..\..\Lib
+
+
+ Delphi.Personality
+ Package
+
+FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0TiposDocumento_view.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+ TfEditorUnidadesMedida
+
+
+
+
+
diff --git a/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.dfm b/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.dfm
new file mode 100644
index 0000000..e60a722
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.dfm
@@ -0,0 +1,144 @@
+object fEditorTiposDocumento: TfEditorTiposDocumento
+ Left = 453
+ Top = 234
+ ActiveControl = ListaTiposDocumento
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsSingle
+ Caption = 'Administraci'#243'n de tipos de documento'
+ ClientHeight = 494
+ ClientWidth = 404
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = CustomEditorClose
+ OnShow = FormShow
+ InstanceID = 0
+ ReadOnly = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object bAceptar: TButton
+ Left = 235
+ Top = 462
+ Width = 75
+ Height = 23
+ Action = actAceptar
+ Default = True
+ TabOrder = 1
+ end
+ object bCancelar: TButton
+ Left = 321
+ Top = 462
+ Width = 75
+ Height = 23
+ Action = actCancelar
+ Cancel = True
+ TabOrder = 2
+ end
+ object PageControl1: TPageControl
+ Left = 8
+ Top = 8
+ Width = 390
+ Height = 442
+ ActivePage = TabSheet1
+ TabOrder = 0
+ object TabSheet1: TTabSheet
+ Caption = 'Tipos de documento'
+ object Label1: TLabel
+ Left = 10
+ Top = 12
+ Width = 133
+ Height = 13
+ Caption = 'Lista de tipos de documento'
+ end
+ object Label2: TLabel
+ Left = 10
+ Top = 326
+ Width = 174
+ Height = 13
+ Caption = 'A'#241'adir un nuevo tipos de documento'
+ end
+ object Bevel1: TBevel
+ Left = 187
+ Top = 330
+ Width = 189
+ Height = 5
+ Shape = bsBottomLine
+ end
+ object eCategoria: TLabel
+ Left = 18
+ Top = 353
+ Width = 40
+ Height = 13
+ Caption = 'Nombre:'
+ end
+ object ListaTiposDocumento: TDBLookupListBox
+ Left = 8
+ Top = 31
+ Width = 262
+ Height = 277
+ KeyField = 'RecID'
+ ListField = 'DESCRIPCION'
+ ListSource = DADataSource
+ TabOrder = 0
+ end
+ object bEliminar: TButton
+ Left = 281
+ Top = 31
+ Width = 95
+ Height = 23
+ Action = actEliminar
+ TabOrder = 1
+ end
+ object editTipoDocumento: TEdit
+ Left = 64
+ Top = 349
+ Width = 312
+ Height = 21
+ TabOrder = 2
+ end
+ object bAnadir: TButton
+ Left = 281
+ Top = 382
+ Width = 95
+ Height = 23
+ Action = actAnadir
+ TabOrder = 3
+ end
+ end
+ end
+ object ActionList1: TActionList
+ Left = 144
+ Top = 16
+ object actAnadir: TAction
+ Caption = '&A'#241'adir'
+ OnExecute = actAnadirExecute
+ OnUpdate = actAnadirUpdate
+ end
+ object actEliminar: TAction
+ Caption = '&Eliminar'
+ OnExecute = actEliminarExecute
+ OnUpdate = actEliminarUpdate
+ end
+ object actAceptar: TAction
+ Caption = 'A&ceptar'
+ OnExecute = actAceptarExecute
+ end
+ object actCancelar: TAction
+ Caption = '&Cancelar'
+ OnExecute = actCancelarExecute
+ end
+ object actCerrar: TAction
+ Caption = 'actCerrar'
+ OnExecute = actCerrarExecute
+ end
+ end
+ object DADataSource: TDADataSource
+ Left = 168
+ Top = 16
+ end
+end
diff --git a/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.pas b/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.pas
new file mode 100644
index 0000000..0b0138f
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Views/uEditorTiposDocumento.pas
@@ -0,0 +1,181 @@
+{
+===============================================================================
+ Copyright (©) 2006. Rodax Software.
+===============================================================================
+ Los contenidos de este fichero son propiedad de Rodax Software titular del
+ copyright. Este fichero sólo podrá ser copiado, distribuido y utilizado,
+ en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
+ acuerdo con los términos y condiciones establecidas en el acuerdo/contrato
+ bajo el que se suministra.
+ -----------------------------------------------------------------------------
+ Web: www.rodax-software.com
+===============================================================================
+ Fecha primera versión: 22-05-2006
+ Versión actual: 1.0.0
+ Fecha versión actual: 22-05-2006
+===============================================================================
+ Modificaciones:
+
+ Fecha Comentarios
+ ---------------------------------------------------------------------------
+===============================================================================
+}
+
+unit uEditorTiposDocumento;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, DB, StdCtrls, DBCtrls, uDADataTable, ActnList,
+ uIEditorTiposDocumento, uCustomEditor, uGUIBase, ExtCtrls,
+ ComCtrls, uBizTiposDocumento, uTiposDocumentoController, uDAInterfaces;
+
+type
+ TfEditorTiposDocumento = class(TCustomEditor, IEditorTiposDocumento)
+ ActionList1: TActionList;
+ DADataSource: TDADataSource;
+ ListaTiposDocumento: TDBLookupListBox;
+ actAnadir: TAction;
+ actEliminar: TAction;
+ bEliminar: TButton;
+ actAceptar: TAction;
+ actCancelar: TAction;
+ bAceptar: TButton;
+ bCancelar: TButton;
+ actCerrar: TAction;
+ PageControl1: TPageControl;
+ TabSheet1: TTabSheet;
+ Label1: TLabel;
+ Label2: TLabel;
+ Bevel1: TBevel;
+ eCategoria: TLabel;
+ editTipoDocumento: TEdit;
+ bAnadir: TButton;
+ procedure FormShow(Sender: TObject);
+ procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
+
+ procedure actAnadirExecute(Sender: TObject);
+ procedure actEliminarExecute(Sender: TObject);
+ procedure actAceptarExecute(Sender: TObject);
+ procedure actCancelarExecute(Sender: TObject);
+ procedure actCerrarExecute(Sender: TObject);
+ procedure actAnadirUpdate(Sender: TObject);
+ procedure actEliminarUpdate(Sender: TObject);
+ protected
+ FTiposDocumento: IBizTipoDocumento;
+ FController: ITiposDocumentoController;
+ function GetTiposDocumento: IBizTipoDocumento;
+ procedure SetTiposDocumento(const Value: IBizTipoDocumento);
+ function GetController : ITiposDocumentoController;
+ procedure SetController (const Value : ITiposDocumentoController);
+ public
+ property TiposDocumento: IBizTipoDocumento read GetTiposDocumento write SetTiposDocumento;
+ property Controller : ITiposDocumentoController read GetController write SetController;
+ end;
+
+
+implementation
+{$R *.dfm}
+
+{ TfEditorTiposDocumento }
+
+uses
+ uDialogUtils;
+
+function TfEditorTiposDocumento.GetController: ITiposDocumentoController;
+begin
+ Result := FController;
+end;
+
+function TfEditorTiposDocumento.GetTiposDocumento: IBizTipoDocumento;
+begin
+ Result := FTiposDocumento;
+end;
+
+procedure TfEditorTiposDocumento.SetController(const Value: ITiposDocumentoController);
+begin
+ FController := Value;
+end;
+
+procedure TfEditorTiposDocumento.SetTiposDocumento(const Value: IBizTipoDocumento);
+begin
+ FTiposDocumento := Value;
+ DADataSource.DataTable := (FTiposDocumento as IBizTipoDocumento).DataTable;
+ DADataSource.DataTable.Open;
+end;
+
+procedure TfEditorTiposDocumento.actAnadirExecute(Sender: TObject);
+begin
+ if not FController.Localizar(TiposDocumento, editTipoDocumento.Text) then
+ begin
+ TiposDocumento.Append;
+ TiposDocumento.DESCRIPCION := editTipoDocumento.Text;
+ TiposDocumento.Post;
+ editTipoDocumento.Clear;
+ ListaTiposDocumento.SetFocus;
+ end
+ else
+ ShowErrorMessage('Ya existe el tipo ' + editTipoDocumento.Text,
+ 'Ya existe tipo ''' + editTipoDocumento.Text + ''' en la lista.');
+end;
+
+procedure TfEditorTiposDocumento.actEliminarExecute(Sender: TObject);
+begin
+ TiposDocumento.Delete;
+ ListaTiposDocumento.SetFocus;
+end;
+
+procedure TfEditorTiposDocumento.actEliminarUpdate(Sender: TObject);
+begin
+ (Sender as TAction).Enabled := (FTiposDocumento.DataTable.RecordCount > 0) and
+ (Length(ListaTiposDocumento.SelectedItem) > 0);
+
+end;
+
+procedure TfEditorTiposDocumento.CustomEditorClose(Sender: TObject; var Action: TCloseAction);
+begin
+ FTiposDocumento := Nil;
+ FController := Nil;
+end;
+
+procedure TfEditorTiposDocumento.actAceptarExecute(Sender: TObject);
+begin
+ try
+ TiposDocumento.DataTable.ApplyUpdates;
+ except
+ on E : Exception do begin
+ TiposDocumento.DataTable.CancelUpdates;
+ ShowErrorMessage('Error al guardar cambios', 'Se ha producido un error grave', E);
+ exit;
+ end;
+ end;
+ actCerrar.Execute;
+end;
+
+procedure TfEditorTiposDocumento.actCancelarExecute(Sender: TObject);
+begin
+ TiposDocumento.DataTable.CancelUpdates;
+ actCerrar.Execute;
+end;
+
+procedure TfEditorTiposDocumento.actCerrarExecute(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfEditorTiposDocumento.actAnadirUpdate(Sender: TObject);
+begin
+ (Sender as TAction).Enabled := (Length(editTipoDocumento.Text) > 0)
+end;
+
+procedure TfEditorTiposDocumento.FormShow(Sender: TObject);
+begin
+ if not FTiposDocumento.DataTable.Active then
+ FTiposDocumento.DataTable.Active := true;
+
+ FTiposDocumento.DataTable.Sort(['DESCRIPCION'], [sdAscending]);
+ EditTipoDocumento.SetFocus;
+end;
+
+end.
diff --git a/Source/Modulos/TiposDocumento/Views/uTiposDocumentoViewRegister.pas b/Source/Modulos/TiposDocumento/Views/uTiposDocumentoViewRegister.pas
new file mode 100644
index 0000000..5885731
--- /dev/null
+++ b/Source/Modulos/TiposDocumento/Views/uTiposDocumentoViewRegister.pas
@@ -0,0 +1,23 @@
+unit uTiposDocumentoViewRegister;
+
+interface
+
+procedure RegisterViews;
+procedure UnregisterViews;
+
+implementation
+
+uses
+ uEditorRegistryUtils, uEditorTiposDocumento;
+
+procedure RegisterViews;
+begin
+ EditorRegistry.RegisterClass(TfEditorTiposDocumento, 'EditorTiposDocumento');
+end;
+
+procedure UnregisterViews;
+begin
+ EditorRegistry.UnRegisterClass(TfEditorTiposDocumento);
+end;
+
+end.