diff --git a/Source/Cliente/FactuGES.dpr b/Source/Cliente/FactuGES.dpr
index 906bce24..c094c23d 100644
--- a/Source/Cliente/FactuGES.dpr
+++ b/Source/Cliente/FactuGES.dpr
@@ -2,6 +2,7 @@ program FactuGES;
uses
// ExceptionLog,
+ ExceptionLog,
Forms,
Windows,
SysUtils,
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 6824fc77..05236c4b 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -55,6 +55,10 @@
VCLApplication
FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1420FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.4.2.0FactuGESFactuGES1.4.2.0
+
+
+
+
ExpressPrinting System by Developer Express Inc.
PluginSDK for Delphi 10 (Runtime)
Microsoft Office 2000 Sample Automation Server Wrapper Components
diff --git a/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas b/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
index d72a9f98..4c1eb1a8 100644
--- a/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
+++ b/Source/Modulos/Almacenes/Controller/uAlmacenesController.pas
@@ -25,6 +25,7 @@ type
function Duplicar(AAlmacen: IBizAlmacen): IBizAlmacen;
procedure Preview(AAlmacen : IBizAlmacen);
procedure Print(AAlmacen : IBizAlmacen);
+ function DarListaAlmacenes : TStringList;
end;
TAlmacenesController = class(TControllerBase, IAlmacenesController)
@@ -66,6 +67,7 @@ type
function Duplicar(AAlmacen: IBizAlmacen): IBizAlmacen;
procedure Preview(AAlmacen : IBizAlmacen);
procedure Print(AAlmacen : IBizAlmacen);
+ function DarListaAlmacenes : TStringList;
end;
implementation
@@ -132,6 +134,16 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
+function TAlmacenesController.DarListaAlmacenes: TStringList;
+begin
+ ShowHourglassCursor;
+ try
+ Result := FDataModule.DarListaAlmacenes;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
procedure TAlmacenesController.DescartarCambios(AAlmacen: IBizAlmacen);
begin
if not Assigned(AAlmacen) then
diff --git a/Source/Modulos/Almacenes/Data/uDataModuleAlmacenes.pas b/Source/Modulos/Almacenes/Data/uDataModuleAlmacenes.pas
index 4a699761..99930219 100644
--- a/Source/Modulos/Almacenes/Data/uDataModuleAlmacenes.pas
+++ b/Source/Modulos/Almacenes/Data/uDataModuleAlmacenes.pas
@@ -27,6 +27,7 @@ type
function GetItems : IBizAlmacen;
function GetItem(const ID : Integer) : IBizAlmacen;
function NewItem : IBizAlmacen;
+ function DarListaAlmacenes : TStringList;
end;
implementation
@@ -50,6 +51,15 @@ begin
RORemoteService.Message := dmConexion.Message;
end;
+function TDataModuleAlmacenes.DarListaAlmacenes: TStringList;
+var
+ ABinary : Binary;
+begin
+ ABinary := (RORemoteService as IsrvAlmacenes).DarListaAlmacenes;
+ Result := TStringList.Create;
+ Result.LoadFromStream(ABinary);
+end;
+
function TDataModuleAlmacenes.NewItem: IBizAlmacen;
begin
Result := GetItem(ID_NULO)
diff --git a/Source/Modulos/Almacenes/Model/Almacenes_model.dproj b/Source/Modulos/Almacenes/Model/Almacenes_model.dproj
index ad0ffd54..ec4319a9 100644
--- a/Source/Modulos/Almacenes/Model/Almacenes_model.dproj
+++ b/Source/Modulos/Almacenes/Model/Almacenes_model.dproj
@@ -60,9 +60,8 @@
MainSource
-
-
-
+
+
diff --git a/Source/Modulos/Almacenes/Model/Almacenes_model.res b/Source/Modulos/Almacenes/Model/Almacenes_model.res
index 8b251f31..1641339f 100644
Binary files a/Source/Modulos/Almacenes/Model/Almacenes_model.res and b/Source/Modulos/Almacenes/Model/Almacenes_model.res differ
diff --git a/Source/Modulos/Almacenes/Model/Data/uIDataModuleAlmacenes.pas b/Source/Modulos/Almacenes/Model/Data/uIDataModuleAlmacenes.pas
index 92b9a137..a64dddee 100644
--- a/Source/Modulos/Almacenes/Model/Data/uIDataModuleAlmacenes.pas
+++ b/Source/Modulos/Almacenes/Model/Data/uIDataModuleAlmacenes.pas
@@ -3,7 +3,7 @@ unit uIDataModuleAlmacenes;
interface
uses
- uBizAlmacenes;
+ Classes, uBizAlmacenes;
type
IDataModuleAlmacenes = interface
@@ -11,6 +11,7 @@ type
function GetItems: IBizAlmacen;
function GetItem(const ID : Integer) : IBizAlmacen;
function NewItem : IBizAlmacen;
+ function DarListaAlmacenes : TStringList;
end;
implementation
diff --git a/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.dfm b/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.dfm
index 52cdefaf..804b5343 100644
--- a/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.dfm
+++ b/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.dfm
@@ -112,6 +112,40 @@ object srvAlmacenes: TsrvAlmacenes
DataDictionary = DataDictionary
Diagrams = Diagrams
Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'ALMACENES'
+ Name = 'IBX'
+ SQL =
+ 'Select ID, NOMBRE'#10'from ALMACENES'#10'where TIPO_ALMACEN = '#39'ALMACEN'#39#10 +
+ #10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'NOMBRE'
+ TableField = 'NOMBRE'
+ end>
+ end>
+ Name = 'ListaAlmacenes'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ end
+ item
+ Name = 'NOMBRE'
+ DataType = datString
+ Size = 255
+ end>
+ end
item
Params = <>
Statements = <
diff --git a/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.pas b/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.pas
index e63b0b37..47419719 100644
--- a/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.pas
+++ b/Source/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.pas
@@ -31,13 +31,15 @@ type
procedure DARemoteServiceCreate(Sender: TObject);
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
var aConnectionName: string);
+ protected
+ function DarListaAlmacenes: Binary;
end;
implementation
{$R *.dfm}
uses
- {Generated:} FactuGES_Invk, uDataModuleServer,
+ {Generated:} FactuGES_Invk, uDataModuleServer, uROClasses,
uDatabaseUtils, schAlmacenesClient_Intf, uRestriccionesUsuarioUtils;
procedure Create_srvAlmacenes(out anInstance : IUnknown);
@@ -64,6 +66,42 @@ begin
SessionManager := dmServer.SessionManager;
end;
+function TsrvAlmacenes.DarListaAlmacenes: Binary;
+var
+ ASchema : TDASchema;
+ AConn : IDAConnection;
+ dsData: IDADataset;
+ ALista : TStringList;
+begin
+ Result := Binary.Create;
+
+ ASchema := schAlmacenes;
+ AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
+
+ try
+ dsData := ASchema.NewDataset(AConn, 'ListaAlmacenes');
+ except
+ RaiseError('No existe la tabla ALMACENES');
+ end;
+
+ ALista := TStringList.Create;
+ try
+ dsData.Active := True;
+ ALista.Sorted := True;
+ while not dsData.EOF do
+ begin
+ ALista.Add(Format('%s=%d', [dsData.Fields[1].AsString, dsData.Fields[0].AsInteger]));
+ dsData.Next;
+ end;
+
+ ALista.SaveToStream(Result);
+ finally
+ FreeANDNIL(ALista);
+ dsData := NIL;
+ AConn := NIL;
+ end;
+end;
+
procedure TsrvAlmacenes.DataAbstractServiceBeforeAcquireConnection(
aSender: TObject; var aConnectionName: string);
begin
diff --git a/Source/Modulos/Inventario/Inventario_Group.groupproj b/Source/Modulos/Inventario/Inventario_Group.groupproj
index 50683a02..73a1b288 100644
--- a/Source/Modulos/Inventario/Inventario_Group.groupproj
+++ b/Source/Modulos/Inventario/Inventario_Group.groupproj
@@ -11,10 +11,15 @@
+
+
+
+
+
@@ -201,14 +206,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.dfm b/Source/Modulos/Inventario/Views/uEditorInventario.dfm
index 36368f51..3ffd9f5e 100644
--- a/Source/Modulos/Inventario/Views/uEditorInventario.dfm
+++ b/Source/Modulos/Inventario/Views/uEditorInventario.dfm
@@ -151,10 +151,11 @@ inherited fEditorInventario: TfEditorInventario
ExplicitHeight = 419
inherited cxGrid: TcxGrid
Width = 669
- Height = 291
+ Height = 250
TabOrder = 2
+ ExplicitTop = 143
ExplicitWidth = 669
- ExplicitHeight = 291
+ ExplicitHeight = 250
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
@@ -270,6 +271,12 @@ inherited fEditorInventario: TfEditorInventario
end
end
end
+ inherited Panel1: TPanel
+ Width = 669
+ ExplicitLeft = 0
+ ExplicitTop = 102
+ ExplicitWidth = 669
+ end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
Active = False
diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.pas b/Source/Modulos/Inventario/Views/uEditorInventario.pas
index c79efd64..0fc49e83 100644
--- a/Source/Modulos/Inventario/Views/uEditorInventario.pas
+++ b/Source/Modulos/Inventario/Views/uEditorInventario.pas
@@ -345,12 +345,12 @@ begin
if (FTipoInventario = CTE_INV_ALMACEN) then
begin
if Assigned(ViewGrid) then
- (ViewGrid as IViewInventario).Almacenes := FController.AlmacenesController.BuscarTodos;
+ (ViewGrid as IViewInventario).Almacenes := FController.AlmacenesController.DarListaAlmacenes;
end
else if (FTipoInventario = CTE_INV_OBRA) then
begin
if Assigned(ViewGrid) then
- (ViewGrid as IViewInventario).Obras := FController.ObrasController.BuscarTodos;
+ (ViewGrid as IViewInventario).Obras := FController.ObrasController.DarListaObras;
end;
end;
diff --git a/Source/Modulos/Inventario/Views/uViewInventario.dfm b/Source/Modulos/Inventario/Views/uViewInventario.dfm
index 7b935b25..408da42f 100644
--- a/Source/Modulos/Inventario/Views/uViewInventario.dfm
+++ b/Source/Modulos/Inventario/Views/uViewInventario.dfm
@@ -1,9 +1,14 @@
inherited frViewInventario: TfrViewInventario
+ Width = 674
+ Height = 607
+ ExplicitWidth = 674
+ ExplicitHeight = 607
inherited cxGrid: TcxGrid
+ Top = 143
+ Width = 674
+ Height = 438
RootLevelOptions.DetailTabsPosition = dtpTop
- OnActiveTabChanged = cxGridActiveTabChanged
inherited cxGridView: TcxGridDBTableView
- DataController.KeyFieldNames = 'RECID'
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
@@ -163,8 +168,10 @@ inherited frViewInventario: TfrViewInventario
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
+ Width = 674
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
+ Width = 674
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
@@ -194,6 +201,41 @@ inherited frViewInventario: TfrViewInventario
Width = 215
end
end
+ inherited TBXAlignmentPanel1: TTBXAlignmentPanel
+ Width = 674
+ inherited tbxBotones: TTBXToolbar
+ Width = 664
+ end
+ end
+ end
+ end
+ inherited pnlAgrupaciones: TTBXDockablePanel
+ Top = 581
+ inherited TBXAlignmentPanel1: TTBXAlignmentPanel
+ Width = 674
+ inherited TBXToolbar1: TTBXToolbar
+ Width = 664
+ end
+ end
+ end
+ object Panel1: TPanel [3]
+ Left = 0
+ Top = 102
+ Width = 674
+ Height = 41
+ Align = alTop
+ TabOrder = 3
+ ExplicitLeft = 160
+ ExplicitTop = 96
+ ExplicitWidth = 185
+ object cxListaAlmacenesObras: TcxComboBox
+ Left = 10
+ Top = 14
+ Properties.DropDownListStyle = lsEditFixedList
+ Properties.ImmediatePost = True
+ Properties.OnEditValueChanged = cxListaObrasPropertiesEditValueChanged
+ TabOrder = 0
+ Width = 587
end
end
inherited dxComponentPrinter: TdxComponentPrinter
diff --git a/Source/Modulos/Inventario/Views/uViewInventario.pas b/Source/Modulos/Inventario/Views/uViewInventario.pas
index 3e2a123a..33a6acd5 100644
--- a/Source/Modulos/Inventario/Views/uViewInventario.pas
+++ b/Source/Modulos/Inventario/Views/uViewInventario.pas
@@ -13,9 +13,10 @@ uses
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk, cxImage,
cxImageComboBox, ImgList, PngImageList, cxTextEdit, Grids, DBGrids, cxDBLookupComboBox,
cxButtonEdit, cxGridCustomPopupMenu, cxGridPopupMenu, uViewGrid,
- uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX,
+ uBizInventario, cxSpinEdit, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uDAInterfaces,
- uBizObras;
+ cxContainer, cxMaskEdit, cxDropDownEdit;
+// uBizAlmacenes, uBizObras;
type
IViewInventario = interface(IViewGrid)
@@ -23,12 +24,12 @@ type
function GetInventario: IBizInventario;
procedure SetInventario(const Value: IBizInventario);
property Inventario: IBizInventario read GetInventario write SetInventario;
- function GetAlmacenes: IBizAlmacen;
- procedure SetAlmacenes(const Value: IBizAlmacen);
- property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
- function GetObras: IBizObra;
- procedure SetObras(const Value: IBizObra);
- property Obras: IBizObra read GetObras write SetObras;
+ function GetAlmacenes: TStringList;
+ procedure SetAlmacenes(const Value: TStringList);
+ property Almacenes: TStringList read GetAlmacenes write SetAlmacenes;
+ function GetObras: TStringList;
+ procedure SetObras(const Value: TStringList);
+ property Obras: TStringList read GetObras write SetObras;
end;
TfrViewInventario = class(TfrViewGrid, IViewInventario)
@@ -49,24 +50,25 @@ type
cxGridViewID: TcxGridDBColumn;
cxGridViewID_ARTICULO: TcxGridDBColumn;
cxStyleArticuloConStock: TcxStyle;
-
- procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
+ Panel1: TPanel;
+ cxListaAlmacenesObras: TcxComboBox;
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out
AStyle: TcxStyle);
+ procedure cxListaObrasPropertiesEditValueChanged(Sender: TObject);
private
//Filtros relativos a la vista
procedure AnadirFiltroAlmacenesObras;
protected
- FAlmacenes: IBizAlmacen;
- FObras: IBizObra;
+ FAlmacenes: TStringList;
+ FObras: TStringList;
FInventario: IBizInventario;
- function GetAlmacenes: IBizAlmacen;
- procedure SetAlmacenes(const Value: IBizAlmacen);
- function GetObras: IBizObra;
- procedure SetObras(const Value: IBizObra);
+ function GetAlmacenes: TStringList;
+ procedure SetAlmacenes(const Value: TStringList);
+ function GetObras: TStringList;
+ procedure SetObras(const Value: TStringList);
function GetInventario: IBizInventario;
procedure SetInventario(const Value: IBizInventario);
public
@@ -87,8 +89,16 @@ var
begin
FFiltro := AddFilterGrid(fboAnd);
- CodigoAlmacen := IntToStr(cxGrid.Levels.Items[cxGrid.ActiveLevel.Index].Tag);
- if CodigoAlmacen <> '-1' then
+ //INV_ALMACENES
+ if Assigned(FAlmacenes) then
+ CodigoAlmacen := FAlmacenes.Values[cxListaAlmacenesObras.EditValue]
+ //INV_OBRAS
+ else if Assigned(FObras) then
+ CodigoAlmacen := FObras.Values[cxListaAlmacenesObras.EditValue]
+ else
+ Raise Exception.Create('No se ha asignado ninguna lista de ALMACENES');
+
+ if CodigoAlmacen <> '' then
begin
FFiltro.AddItem(cxGridViewID_ALMACEN, foEqual, CodigoAlmacen, CodigoAlmacen);
cxGridViewALMACEN.Visible := False;
@@ -110,12 +120,6 @@ begin
cxGrid.ActiveLevel.GridView := cxGridView;
end;
-procedure TfrViewInventario.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
-begin
- inherited;
- RefrescarFiltro;
-end;
-
procedure TfrViewInventario.cxGridViewStylesGetContentStyle(Sender:
TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem:
TcxCustomGridTableItem; out AStyle: TcxStyle);
@@ -135,6 +139,13 @@ begin
end;
end;
+procedure TfrViewInventario.cxListaObrasPropertiesEditValueChanged(
+ Sender: TObject);
+begin
+ inherited;
+ RefrescarFiltro;
+end;
+
destructor TfrViewInventario.Destroy;
begin
FAlmacenes := Nil;
@@ -143,7 +154,7 @@ begin
inherited;
end;
-function TfrViewInventario.GetAlmacenes: IBizAlmacen;
+function TfrViewInventario.GetAlmacenes: TStringList;
begin
Result := FAlmacenes;
end;
@@ -153,14 +164,15 @@ begin
Result := FInventario;
end;
-function TfrViewInventario.GetObras: IBizObra;
+function TfrViewInventario.GetObras: TStringList;
begin
Result := FObras;
end;
-procedure TfrViewInventario.SetAlmacenes(const Value: IBizAlmacen);
+procedure TfrViewInventario.SetAlmacenes(const Value: TStringList);
var
Nivel: TcxGridLevel;
+ i: integer;
begin
FAlmacenes := Value;
@@ -168,18 +180,18 @@ begin
begin
cxGrid.BeginUpdate;
try
- cxGridLevel.Caption := 'Todos los almacenes';
- if not FAlmacenes.DataTable.Active then
- FAlmacenes.DataTable.Active := True;
-
- FAlmacenes.First;
- while not FAlmacenes.EOF do
+ with cxListaAlmacenesObras.Properties.Items do
begin
- Nivel := cxGrid.Levels.Add;
- Nivel.Caption := FAlmacenes.NOMBRE;
- Nivel.Tag := FAlmacenes.ID;
- FAlmacenes.Next;
+ BeginUpdate;
+ try
+ Clear;
+ for i := 0 to FAlmacenes.Count - 1 do
+ Add(FAlmacenes.Names[i]);
+ finally
+ EndUpdate;
+ end;
end;
+
finally
cxGrid.EndUpdate;
end;
@@ -195,9 +207,10 @@ begin
dsDataSource.DataTable := Nil;
end;
-procedure TfrViewInventario.SetObras(const Value: IBizObra);
+procedure TfrViewInventario.SetObras(const Value: TStringList);
var
Nivel: TcxGridLevel;
+ i: integer;
begin
FObras := Value;
@@ -205,18 +218,18 @@ begin
begin
cxGrid.BeginUpdate;
try
- cxGridLevel.Caption := 'Todos las obras';
- if not FObras.DataTable.Active then
- FObras.DataTable.Active := True;
-
- FObras.First;
- while not FObras.EOF do
+ with cxListaAlmacenesObras.Properties.Items do
begin
- Nivel := cxGrid.Levels.Add;
- Nivel.Caption := FObras.NOMBRE;
- Nivel.Tag := FObras.ID;
- FObras.Next;
+ BeginUpdate;
+ try
+ Clear;
+ for i := 0 to FObras.Count - 1 do
+ Add(FObras.Names[i]);
+ finally
+ EndUpdate;
+ end;
end;
+
finally
cxGrid.EndUpdate;
end;
diff --git a/Source/Modulos/Obras/Controller/uObrasController.pas b/Source/Modulos/Obras/Controller/uObrasController.pas
index 7afdd761..f0503299 100644
--- a/Source/Modulos/Obras/Controller/uObrasController.pas
+++ b/Source/Modulos/Obras/Controller/uObrasController.pas
@@ -34,6 +34,7 @@ type
// procedure NuevaEjecucion(AObra: IBizObra; const AFecha : TDateTime);
procedure CerrarEjecucionActiva(AObra: IBizObra; const AFecha : TDateTime);
function LocalizarEjecucionActiva(AEjecuciones: IBizEjecucionesObra): boolean;
+ function DarListaObras : TStringList;
end;
TObrasController = class(TControllerBase, IObrasController)
@@ -81,7 +82,8 @@ type
procedure QuitarDireccion(AObra: IBizObra);
procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; AObra: IBizObra); overload;
procedure CopiarDireccion (const ACliente: IBizCliente; AObra: IBizObra); overload;
- function LocalizarEjecucionActiva(AEjecuciones: IBizEjecucionesObra): boolean;
+ function LocalizarEjecucionActiva(AEjecuciones: IBizEjecucionesObra): boolean;
+ function DarListaObras : TStringList;
end;
implementation
@@ -257,6 +259,16 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
+function TObrasController.DarListaObras: TStringList;
+begin
+ ShowHourglassCursor;
+ try
+ Result := FDataModule.DarListaObras;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
procedure TObrasController.DescartarCambios(AObra : IBizObra);
begin
if not Assigned(AObra) then
diff --git a/Source/Modulos/Obras/Data/uDataModuleObras.pas b/Source/Modulos/Obras/Data/uDataModuleObras.pas
index c32f91d2..b89e37b4 100644
--- a/Source/Modulos/Obras/Data/uDataModuleObras.pas
+++ b/Source/Modulos/Obras/Data/uDataModuleObras.pas
@@ -35,6 +35,7 @@ type
function GetItems : IBizObra;
function GetItem(const ID : Integer) : IBizObra;
function NewItem : IBizObra;
+ function DarListaObras : TStringList;
end;
implementation
@@ -112,6 +113,15 @@ begin
end;
end;
+function TDataModuleObras.DarListaObras: TStringList;
+var
+ ABinary : Binary;
+begin
+ ABinary := (RORemoteService as IsrvObras).DarListaObras;
+ Result := TStringList.Create;
+ Result.LoadFromStream(ABinary);
+end;
+
function TDataModuleObras.GetEjecucionPresupuestos(
const IDEjecucion: Integer): IBizEjecucionPresupuestos;
var
diff --git a/Source/Modulos/Obras/Model/Data/uIDataModuleObras.pas b/Source/Modulos/Obras/Model/Data/uIDataModuleObras.pas
index 9fce49b5..90cd23aa 100644
--- a/Source/Modulos/Obras/Model/Data/uIDataModuleObras.pas
+++ b/Source/Modulos/Obras/Model/Data/uIDataModuleObras.pas
@@ -3,7 +3,7 @@ unit uIDataModuleObras;
interface
uses
- uBizObras;
+ Classes, uBizObras;
type
IDataModuleObras = interface
@@ -12,6 +12,7 @@ type
function GetItems: IBizObra;
function GetItem(const ID : Integer) : IBizObra;
function NewItem : IBizObra;
+ function DarListaObras : TStringList;
end;
implementation
diff --git a/Source/Modulos/Obras/Servidor/srvObras_Impl.dfm b/Source/Modulos/Obras/Servidor/srvObras_Impl.dfm
index 233a294c..6d2a8460 100644
--- a/Source/Modulos/Obras/Servidor/srvObras_Impl.dfm
+++ b/Source/Modulos/Obras/Servidor/srvObras_Impl.dfm
@@ -41,9 +41,9 @@ object srvObras: TsrvObras
''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10 +
+ 'ObrasEjecuciones" Left="180,50" Top="0,00" />'#13#10' '#13#10' ' +
+ ''#13#10' '#13#10 +
''#13#10
end
object DataDictionary: TDADataDictionary
@@ -394,6 +394,39 @@ object srvObras: TsrvObras
DataDictionary = DataDictionary
Diagrams = Diagrams
Datasets = <
+ item
+ Params = <>
+ 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#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 = <
diff --git a/Source/Modulos/Obras/Servidor/srvObras_Impl.pas b/Source/Modulos/Obras/Servidor/srvObras_Impl.pas
index bf07f351..2ec52239 100644
--- a/Source/Modulos/Obras/Servidor/srvObras_Impl.pas
+++ b/Source/Modulos/Obras/Servidor/srvObras_Impl.pas
@@ -98,13 +98,15 @@ type
const aMaxRecords: Integer);
private
procedure Log(Astr: string);
+ protected
+ function DarListaObras: Binary;
end;
implementation
{$R *.dfm}
uses
- {Generated:} FactuGES_Invk, uDataModuleServer,
+ {Generated:} FactuGES_Invk, uDataModuleServer, uROClasses,
uDatabaseUtils, schObrasClient_Intf, uRestriccionesUsuarioUtils,
uBizObrasServer, Variants;
@@ -403,6 +405,42 @@ begin
dmServer.EscribirLog(Astr)
end;
+function TsrvObras.DarListaObras: Binary;
+var
+ ASchema : TDASchema;
+ AConn : IDAConnection;
+ dsData: IDADataset;
+ ALista : TStringList;
+begin
+ Result := Binary.Create;
+
+ ASchema := schObras;
+ AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
+
+ try
+ dsData := ASchema.NewDataset(AConn, 'ListaObras');
+ except
+ RaiseError('No existe la tabla ALMACENES');
+ end;
+
+ ALista := TStringList.Create;
+ try
+ dsData.Active := True;
+ ALista.Sorted := True;
+ while not dsData.EOF do
+ begin
+ ALista.Add(Format('%s=%d', [dsData.Fields[1].AsString, dsData.Fields[0].AsInteger]));
+ dsData.Next;
+ end;
+
+ ALista.SaveToStream(Result);
+ finally
+ FreeANDNIL(ALista);
+ dsData := NIL;
+ AConn := NIL;
+ end;
+end;
+
procedure TsrvObras.DataAbstractServiceAcquireConnectionFailure(
aSender: TObject; const aConnectionName: string; aError: Exception);
begin
diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL
index 9d909932..be2bb36c 100644
--- a/Source/Servicios/FactuGES.RODL
+++ b/Source/Servicios/FactuGES.RODL
@@ -156,6 +156,12 @@
+
+
+
+
+
+
@@ -443,6 +449,12 @@
+
+
+
+
+
+
diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas
index 6e2b4e5f..c8a9432d 100644
--- a/Source/Servicios/FactuGES_Intf.pas
+++ b/Source/Servicios/FactuGES_Intf.pas
@@ -388,6 +388,7 @@ type
{ IsrvAlmacenes }
IsrvAlmacenes = interface(IDataAbstractService)
['{F984D2A1-9922-4790-9B2D-A78ACFDAE82B}']
+ function DarListaAlmacenes: Binary;
end;
{ CosrvAlmacenes }
@@ -400,6 +401,7 @@ type
protected
function __GetInterfaceName:string; override;
+ function DarListaAlmacenes: Binary;
end;
{ IsrvArticulos }
@@ -682,6 +684,7 @@ type
{ IsrvObras }
IsrvObras = interface(IDataAbstractService)
['{39277224-A0BD-4249-9ACA-39D238798B25}']
+ function DarListaObras: Binary;
end;
{ CosrvObras }
@@ -694,6 +697,7 @@ type
protected
function __GetInterfaceName:string; override;
+ function DarListaObras: Binary;
end;
{ IsrvProvinciasPoblaciones }
@@ -1477,11 +1481,29 @@ begin
result := TsrvAlmacenes_Proxy.Create(aMessage, aTransportChannel);
end;
+{ TsrvAlmacenes_Proxy }
+
function TsrvAlmacenes_Proxy.__GetInterfaceName:string;
begin
result := 'srvAlmacenes';
end;
+function TsrvAlmacenes_Proxy.DarListaAlmacenes: Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarListaAlmacenes');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvArticulos }
class function CosrvArticulos.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvArticulos;
@@ -1985,11 +2007,29 @@ begin
result := TsrvObras_Proxy.Create(aMessage, aTransportChannel);
end;
+{ TsrvObras_Proxy }
+
function TsrvObras_Proxy.__GetInterfaceName:string;
begin
result := 'srvObras';
end;
+function TsrvObras_Proxy.DarListaObras: Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarListaObras');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvProvinciasPoblaciones }
class function CosrvProvinciasPoblaciones.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvProvinciasPoblaciones;
diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas
index baabf617..a5455678 100644
--- a/Source/Servicios/FactuGES_Invk.pas
+++ b/Source/Servicios/FactuGES_Invk.pas
@@ -92,6 +92,7 @@ type
private
protected
published
+ procedure Invoke_DarListaAlmacenes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvArticulos_Invoker = class(TDataAbstractService_Invoker)
@@ -200,6 +201,7 @@ type
private
protected
published
+ procedure Invoke_DarListaObras(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvProvinciasPoblaciones_Invoker = class(TROInvoker)
@@ -430,6 +432,33 @@ begin
end;
end;
+{ TsrvAlmacenes_Invoker }
+
+procedure TsrvAlmacenes_Invoker.Invoke_DarListaAlmacenes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function DarListaAlmacenes: Binary; }
+var
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as IsrvAlmacenes).DarListaAlmacenes;
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvAlmacenes', 'DarListaAlmacenesResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
{ TsrvArticulos_Invoker }
procedure TsrvArticulos_Invoker.Invoke_DarListaProveedoresConArticulos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
@@ -970,6 +999,33 @@ begin
end;
end;
+{ TsrvObras_Invoker }
+
+procedure TsrvObras_Invoker.Invoke_DarListaObras(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function DarListaObras: Binary; }
+var
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as IsrvObras).DarListaObras;
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvObras', 'DarListaObrasResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
{ TsrvProvinciasPoblaciones_Invoker }
procedure TsrvProvinciasPoblaciones_Invoker.Invoke_DarListaProvincias(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res
index 1ee30b17..d5f59af7 100644
Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ
diff --git a/Source/Servidor/uDataModuleServer.dfm b/Source/Servidor/uDataModuleServer.dfm
index 4add0c65..573524be 100644
--- a/Source/Servidor/uDataModuleServer.dfm
+++ b/Source/Servidor/uDataModuleServer.dfm
@@ -39,8 +39,8 @@ object dmServer: TdmServer
Name = 'IBX'
ConnectionString =
'IBX?Server=localhost;Database=C:\Codigo Tecsitel\Output\Debug\Da' +
- 'tabase\FACTUGES.FDB;UserID=sysdba;Password=masterkey;Dialect=3;C' +
- 'harset=ISO8859_1;'
+ 'tabase\FACTUGES2.FDB;UserID=sysdba;Password=masterkey;Dialect=3;' +
+ 'Charset=ISO8859_1;'
ConnectionType = 'Interbase'
Default = True
end>