Documentos -> repaso a los estados de las acciones (eventos update)

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@571 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-09-04 17:49:18 +00:00
parent af7f1b0a5e
commit 0edded6d97
7 changed files with 156 additions and 175 deletions

View File

@ -28,6 +28,8 @@ inherited frViewDocumentos: TfrViewDocumentos
object TBXItem1: TTBXItem
Action = actEliminar
end
object TBXSeparatorItem1: TTBXSeparatorItem
end
object TBXItem4: TTBXItem
Action = actEliminarTodo
end
@ -47,25 +49,29 @@ inherited frViewDocumentos: TfrViewDocumentos
LargeImages = LargeImagesBrowser
SmallImages = SmallImagesBrowser
TabOrder = 1
OnDblClick = ListView1DblClick
end
object EditorActionList: TActionList
Left = 16
Top = 16
object actAnadir: TAction
Caption = 'A'#241'adir'
Caption = 'Abrir'
OnExecute = actAnadirExecute
end
object actModificar: TAction
Caption = 'Modificar'
OnExecute = actModificarExecute
OnUpdate = actModificarUpdate
end
object actEliminar: TAction
Caption = 'Eliminar'
OnExecute = actEliminarExecute
OnUpdate = actEliminarUpdate
end
object actEliminarTodo: TAction
Caption = 'Eliminar todo'
OnExecute = actEliminarTodoExecute
OnUpdate = actEliminarTodoUpdate
end
object actActualizarServidor: TAction
Caption = 'Actualizar Servidor'

View File

@ -27,6 +27,7 @@ type
ListView1: TListView;
LargeImagesBrowser: TPngImageList;
SmallImagesBrowser: TPngImageList;
TBXSeparatorItem1: TTBXSeparatorItem;
procedure actAnadirExecute(Sender: TObject);
procedure actModificarExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
@ -34,6 +35,10 @@ type
procedure actActualizarServidorExecute(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure actModificarUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
procedure actEliminarTodoUpdate(Sender: TObject);
procedure ListView1DblClick(Sender: TObject);
private
FDirectorio: Variant;
@ -166,6 +171,18 @@ begin
FHayModificaciones := True;
end;
procedure TfrViewDocumentos.actEliminarTodoUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
end;
procedure TfrViewDocumentos.actEliminarUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(ListView1.ItemFocused);
end;
procedure TfrViewDocumentos.actModificarExecute(Sender: TObject);
var
i: Integer;
@ -195,6 +212,12 @@ begin
end;
end;
procedure TfrViewDocumentos.actModificarUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(ListView1.ItemFocused);
end;
function TfrViewDocumentos.AsignarImagen(ANombreFichero: String): Integer;
begin
Result := -1;
@ -274,14 +297,21 @@ begin
begin
FDirectorio := DarDirectorioTemporal;
if not CreateDir(FDirectorio) then
raise Exception.Create('ERROR: No se ha podido crear el fichero temporal GetDirectorio');
raise Exception.Create('ERROR: No se ha podido crear el fichero temporal (GetDirectorio)');
end;
Result := FDirectorio;
end;
function TfrViewDocumentos.GetModified: Boolean;
begin
Result := FHayModificaciones;
Result := FHayModificaciones;
end;
procedure TfrViewDocumentos.ListView1DblClick(Sender: TObject);
begin
inherited;
if Assigned(ListView1.ItemFocused) then
actModificar.Execute;
end;
procedure TfrViewDocumentos.RefrescarVisualizador;

View File

@ -1,16 +0,0 @@
/* VER185
Generated by the CodeGear Delphi Pascal Compiler
because -GD or --drc was supplied to the compiler.
This file contains compiler-generated resources that
were bound to the executable.
If this file is empty, then no compiler-generated
resources were bound to the produced executable.
*/
STRINGTABLE
BEGIN
END
/* C:\Codigo Tecsitel\Source\Modulos\Gestion de documentos\Controller\GestorDocumentos_Controller.res */
/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf2A0.tmp */

View File

@ -1,17 +0,0 @@
/* VER185
Generated by the CodeGear Delphi Pascal Compiler
because -GD or --drc was supplied to the compiler.
This file contains compiler-generated resources that
were bound to the executable.
If this file is empty, then no compiler-generated
resources were bound to the produced executable.
*/
STRINGTABLE
BEGIN
END
/* C:\Codigo Tecsitel\Source\Modulos\Gestion de documentos\Data\uDataModuleGestorDocumentos.dfm */
/* C:\Codigo Tecsitel\Source\Modulos\Gestion de documentos\Data\GestorDocumentos_data.res */
/* C:\DOCUME~1\Usuario\CONFIG~1\Temp\dtf29E.tmp */

View File

@ -3,18 +3,18 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Top = 147
Caption = 'Nuevo presupuesto de cliente'
ClientHeight = 615
ClientWidth = 749
ClientWidth = 764
OnClose = CustomEditorClose
ExplicitWidth = 757
ExplicitWidth = 772
ExplicitHeight = 649
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 749
Width = 764
Caption = 'Nuevo presupuesto de cliente'
ExplicitWidth = 749
ExplicitWidth = 764
inherited Image1: TImage
Left = 722
Left = 737
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -126,8 +126,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
end
end
inherited TBXDock: TTBXDock
Width = 749
ExplicitWidth = 749
Width = 764
ExplicitWidth = 764
inherited tbxMain: TTBXToolbar
ExplicitWidth = 732
inherited TBXItem2: TTBXItem
@ -151,7 +151,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
end
end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 749
ExplicitWidth = 764
object TBXSubmenuItem2: TTBXSubmenuItem [4]
Caption = 'A&cciones'
object TBXItem34: TTBXItem
@ -164,29 +164,26 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
end
end
inherited pgPaginas: TPageControl
Width = 743
Width = 758
Height = 414
ActivePage = pagDocumentos
TabOrder = 1
OnChanging = pgPaginasChanging
ExplicitWidth = 743
ExplicitWidth = 758
ExplicitHeight = 414
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 735
ExplicitWidth = 750
ExplicitHeight = 386
end
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente
Left = 0
Top = 0
Width = 735
Width = 750
Height = 386
Align = alClient
BiDiMode = bdLeftToRight
@ -199,110 +196,108 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 735
ExplicitWidth = 750
ExplicitHeight = 386
inherited ToolBar1: TToolBar
Width = 735
Height = 46
ExplicitWidth = 735
ExplicitHeight = 46
Width = 750
Height = 73
ExplicitWidth = 750
ExplicitHeight = 73
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
Wrap = True
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 0
Wrap = False
ExplicitLeft = 0
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 65
Top = 22
ExplicitLeft = 65
ExplicitTop = 22
end
inherited FontSize: TEdit
Left = 210
Top = 22
Width = 200
ExplicitLeft = 210
ExplicitTop = 22
ExplicitWidth = 200
end
inherited UpDown1: TUpDown
Left = 410
Left = 361
Top = 22
ExplicitLeft = 410
ExplicitLeft = 361
ExplicitTop = 22
end
inherited ToolButton13: TToolButton
Left = 427
Left = 378
Top = 22
ExplicitLeft = 427
ExplicitLeft = 378
ExplicitTop = 22
end
inherited ToolButton6: TToolButton
Left = 435
Left = 386
Top = 22
ExplicitLeft = 435
ExplicitLeft = 386
ExplicitTop = 22
end
inherited ToolButton7: TToolButton
Left = 501
Left = 452
Top = 22
ExplicitLeft = 501
ExplicitLeft = 452
ExplicitTop = 22
end
inherited ToolButton8: TToolButton
Left = 568
Left = 519
Top = 22
ExplicitLeft = 568
ExplicitLeft = 519
ExplicitTop = 22
end
inherited ToolButton12: TToolButton
Left = 651
Left = 0
Top = 22
ExplicitLeft = 651
Wrap = True
ExplicitLeft = 0
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton9: TToolButton
Left = 659
Top = 22
ExplicitLeft = 659
ExplicitTop = 22
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton10: TToolButton
Left = 804
Top = 22
ExplicitLeft = 804
ExplicitTop = 22
Left = 145
Top = 49
ExplicitLeft = 145
ExplicitTop = 49
end
inherited ToolButton11: TToolButton
Left = 929
Top = 22
ExplicitLeft = 929
ExplicitTop = 22
Left = 270
Top = 49
ExplicitLeft = 270
ExplicitTop = 49
end
end
inherited cxGrid: TcxGrid
Top = 72
Width = 735
Height = 314
ExplicitTop = 72
ExplicitWidth = 735
ExplicitHeight = 314
Top = 99
Width = 750
Height = 287
ExplicitTop = 99
ExplicitWidth = 750
ExplicitHeight = 287
end
inherited TBXDock1: TTBXDock
Top = 46
Width = 735
ExplicitTop = 46
ExplicitWidth = 735
Top = 73
Width = 750
ExplicitTop = 73
ExplicitWidth = 750
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 702
end
@ -321,10 +316,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagPortada: TTabSheet
Caption = 'Portada'
ImageIndex = 3
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Panel1: TPanel
Left = 0
Top = 0
@ -418,7 +409,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inline frViewRichEditor1: TfrViewRichEditor
Left = 145
Top = 0
Width = 590
Width = 605
Height = 386
Align = alClient
Font.Charset = DEFAULT_CHARSET
@ -430,11 +421,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 1
ReadOnly = False
ExplicitLeft = 145
ExplicitWidth = 590
ExplicitWidth = 605
ExplicitHeight = 386
inherited TBXDock1: TTBXDock
Width = 590
ExplicitWidth = 590
Width = 605
ExplicitWidth = 605
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 518
inherited TBXColorItem1: TTBXColorItem
@ -446,20 +437,16 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
DataBinding.DataField = 'PORTADA'
DataBinding.DataSource = dsDataTable
Style.IsFontAssigned = True
ExplicitWidth = 590
ExplicitWidth = 605
ExplicitHeight = 360
Height = 360
Width = 590
Width = 605
end
end
end
object pagMemoria: TTabSheet
Caption = 'Memoria'
ImageIndex = 4
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Panel2: TPanel
Left = 0
Top = 0
@ -724,7 +711,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inline frViewRichEditor2: TfrViewRichEditor
Left = 145
Top = 0
Width = 590
Width = 605
Height = 386
Align = alClient
Font.Charset = DEFAULT_CHARSET
@ -736,11 +723,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 1
ReadOnly = False
ExplicitLeft = 145
ExplicitWidth = 590
ExplicitWidth = 605
ExplicitHeight = 386
inherited TBXDock1: TTBXDock
Width = 590
ExplicitWidth = 590
Width = 605
ExplicitWidth = 605
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 518
inherited TBXColorItem1: TTBXColorItem
@ -752,24 +739,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
DataBinding.DataField = 'MEMORIA'
DataBinding.DataSource = dsDataTable
Style.IsFontAssigned = True
ExplicitWidth = 590
ExplicitWidth = 605
ExplicitHeight = 360
Height = 360
Width = 590
Width = 605
end
end
end
object pagInicidencias: TTabSheet
Caption = 'Incidencias'
ImageIndex = 2
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0
Top = 0
Width = 735
Width = 750
Height = 386
Align = alClient
Font.Charset = DEFAULT_CHARSET
@ -780,25 +763,25 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 735
ExplicitWidth = 750
ExplicitHeight = 386
inherited pnlSup: TPanel
Width = 735
ExplicitWidth = 735
Width = 750
ExplicitWidth = 750
inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21
end
end
inherited GroupBox1: TGroupBox
Width = 735
Width = 750
Height = 358
ExplicitWidth = 735
ExplicitWidth = 750
ExplicitHeight = 358
inherited eIncidencias: TcxDBMemo
ExplicitWidth = 712
ExplicitWidth = 727
ExplicitHeight = 325
Height = 325
Width = 712
Width = 727
end
end
end
@ -809,7 +792,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inline frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente
Left = 0
Top = 0
Width = 735
Width = 750
Height = 386
Align = alClient
Font.Charset = DEFAULT_CHARSET
@ -820,35 +803,30 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 735
ExplicitHeight = 386
inherited TBXDock: TTBXDock
Width = 735
ExplicitWidth = 735
Width = 750
end
inherited ListView1: TListView
Width = 735
Width = 750
Height = 363
ExplicitWidth = 735
ExplicitHeight = 363
end
end
end
end
inherited StatusBar: TJvStatusBar
Top = 596
Width = 749
Width = 764
Panels = <
item
Width = 200
end>
ExplicitTop = 596
ExplicitWidth = 749
ExplicitWidth = 764
end
inline frViewTotales1: TfrViewTotales [4]
Left = 0
Top = 496
Width = 749
Width = 764
Height = 100
Align = alBottom
Font.Charset = DEFAULT_CHARSET
@ -860,13 +838,13 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 4
ReadOnly = False
ExplicitTop = 496
ExplicitWidth = 749
ExplicitWidth = 764
ExplicitHeight = 100
inherited dxLayoutControl1: TdxLayoutControl
Width = 749
Width = 764
Height = 171
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 749
ExplicitWidth = 764
ExplicitHeight = 171
inherited Bevel1: TBevel
Left = 93
@ -877,20 +855,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitWidth = 73
end
inherited Bevel3: TBevel
Left = 368
Left = 375
Top = 11
Width = 8
Height = 54
ExplicitLeft = 368
ExplicitLeft = 375
ExplicitTop = 11
ExplicitWidth = 8
ExplicitHeight = 54
end
inherited Bevel4: TBevel
Left = 485
Left = 492
Top = 92
Width = 21
ExplicitLeft = 485
ExplicitLeft = 492
ExplicitTop = 92
ExplicitWidth = 21
end
@ -908,27 +886,27 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 188
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 556
Left = 563
Top = 38
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 556
ExplicitLeft = 563
ExplicitTop = 38
ExplicitWidth = 182
Width = 182
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 486
Left = 493
Top = 112
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 486
ExplicitLeft = 493
ExplicitTop = 112
ExplicitWidth = 252
Width = 252
@ -945,31 +923,31 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 112
end
inherited edtIVA: TcxDBSpinEdit
Left = 485
Left = 492
Top = 38
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 485
ExplicitLeft = 492
ExplicitTop = 38
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 485
Left = 492
Top = 11
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 485
ExplicitLeft = 492
ExplicitTop = 11
ExplicitWidth = 253
Width = 253
end
inherited edtRE: TcxDBSpinEdit
Left = 485
Left = 492
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
@ -978,11 +956,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 485
ExplicitLeft = 492
ExplicitTop = 65
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 556
Left = 563
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
@ -991,7 +969,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 556
ExplicitLeft = 563
ExplicitTop = 65
ExplicitWidth = 182
Width = 182
@ -1038,9 +1016,9 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 121
end
inherited bTiposIVA: TButton
Left = 220
Left = 227
Top = 38
ExplicitLeft = 220
ExplicitLeft = 227
ExplicitTop = 38
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
@ -1054,7 +1032,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitLeft = 93
ExplicitTop = 65
ExplicitWidth = 259
ExplicitHeight = 0
Width = 259
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup

View File

@ -1,16 +1,15 @@
inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
Caption = 'Lista de presupuestos de cliente'
ClientWidth = 674
ExplicitWidth = 682
ExplicitHeight = 240
ClientWidth = 805
ExplicitWidth = 813
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 674
Width = 805
Caption = 'Lista de presupuestos de cliente'
ExplicitWidth = 674
inherited Image1: TImage
Left = 647
Left = 778
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -122,13 +121,13 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
end
end
inherited TBXDock: TTBXDock
Width = 674
Width = 805
ExplicitWidth = 674
inherited tbxMain: TTBXToolbar
ExplicitWidth = 674
ExplicitWidth = 775
end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 674
ExplicitWidth = 805
object TBXSubmenuItem2: TTBXSubmenuItem [4]
Caption = 'A&cciones'
object TBXItem39: TTBXItem
@ -148,9 +147,11 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
end
end
inherited TBXTMain2: TTBXToolbar
Left = 343
DockPos = 343
Visible = True
ExplicitWidth = 337
ExplicitLeft = 343
ExplicitWidth = 365
object TBXItem43: TTBXItem
Action = actAceptar
DisplayMode = nbdmImageAndText
@ -172,7 +173,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
end
end
inherited StatusBar: TJvStatusBar
Width = 674
Width = 805
ExplicitWidth = 674
end
inherited EditorActionList: TActionList

View File

@ -7,7 +7,7 @@ uses
Dialogs, uViewDocumentos, ActnList,
TB2Item, TBX, TB2Dock, TB2Toolbar, cxControls, cxContainer,
uBizPresupuestosCliente, uPresupuestosClienteController, ImgList,
PngImageList, ComCtrls;
PngImageList, ComCtrls, Menus;
type
IViewDocumentosPresupuestoCliente = interface