diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj
index 46139f45..3545777f 100644
--- a/Source/ApplicationBase/ApplicationBase.dproj
+++ b/Source/ApplicationBase/ApplicationBase.dproj
@@ -46,27 +46,6 @@
Package
FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
CodeGear SOAP Components
@@ -81,27 +60,27 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -123,7 +102,7 @@
TFrame
-
+
TFrame
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 555ae68d..051a55aa 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -53,58 +53,58 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TForm
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 943c1950..57865e34 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,30 +58,30 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/uEditorBase.pas b/Source/GUIBase/uEditorBase.pas
index 4b86ffc5..d0c4706f 100644
--- a/Source/GUIBase/uEditorBase.pas
+++ b/Source/GUIBase/uEditorBase.pas
@@ -414,13 +414,14 @@ var
i: integer;
begin
inherited;
-
- if ReadOnly then
- for i:=0 to Self.ComponentCount-1 do
- begin
- If Self.Components[i] Is TfrViewBase then
- (Self.Components[i] as TfrViewBase).ReadOnly := ReadOnly
- end;
+ if (csLoading in Self.ComponentState) then
+ Exit;
+
+ for i:=0 to Self.ComponentCount-1 do
+ begin
+ if Self.Components[i] is TfrViewBase then
+ (Self.Components[i] as TfrViewBase).ReadOnly := Self.ReadOnly
+ end
end;
procedure TfEditorBase.Show;
diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm
index 9edf8834..8a9bfb76 100644
--- a/Source/GUIBase/uEditorDBItem.dfm
+++ b/Source/GUIBase/uEditorDBItem.dfm
@@ -3,23 +3,51 @@ inherited fEditorDBItem: TfEditorDBItem
Top = 321
Caption = 'fEditorDBItem'
ClientHeight = 461
- ClientWidth = 652
- ExplicitWidth = 660
+ ClientWidth = 901
+ ExplicitWidth = 909
ExplicitHeight = 495
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
- Width = 652
- ExplicitWidth = 652
+ Width = 901
+ ExplicitWidth = 901
inherited Image1: TImage
- Left = 625
+ Left = 874
ExplicitLeft = 627
ExplicitHeight = 19
end
+ object lblDesbloquear: TcxLabel
+ AlignWithMargins = True
+ Left = 776
+ Top = 0
+ Margins.Left = 8
+ Margins.Top = 0
+ Margins.Right = 8
+ Margins.Bottom = 0
+ Align = alRight
+ AutoSize = False
+ Caption = 'Desbloquear'
+ ParentFont = False
+ Properties.Alignment.Horz = taCenter
+ Properties.Alignment.Vert = taVCenter
+ Style.HotTrack = True
+ Style.LookAndFeel.NativeStyle = False
+ Style.TextColor = clWindow
+ StyleDisabled.LookAndFeel.NativeStyle = False
+ StyleFocused.BorderStyle = ebsNone
+ StyleFocused.LookAndFeel.NativeStyle = False
+ StyleHot.BorderStyle = ebsNone
+ StyleHot.LookAndFeel.NativeStyle = False
+ StyleHot.TextStyle = [fsUnderline]
+ Transparent = True
+ OnClick = lblDesbloquearClick
+ Height = 27
+ Width = 90
+ end
end
inherited TBXDock: TTBXDock
- Width = 652
- ExplicitWidth = 652
+ Width = 901
+ ExplicitWidth = 901
inherited tbxMain: TTBXToolbar
ExplicitWidth = 605
inherited TBXItem26: TTBXItem
@@ -30,7 +58,7 @@ inherited fEditorDBItem: TfEditorDBItem
end
end
inherited tbxMenu: TTBXToolbar
- ExplicitWidth = 652
+ ExplicitWidth = 901
inherited TBXSubmenuItem1: TTBXSubmenuItem
Visible = False
end
@@ -40,29 +68,25 @@ inherited fEditorDBItem: TfEditorDBItem
AlignWithMargins = True
Left = 3
Top = 79
- Width = 646
+ Width = 895
Height = 360
ActivePage = pagGeneral
Align = alClient
TabOrder = 2
object pagGeneral: TTabSheet
Caption = 'General'
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
end
end
inherited StatusBar: TJvStatusBar
Top = 442
- Width = 652
+ Width = 901
Panels = <
item
Width = 200
Control = imgStatus
end>
ExplicitTop = 442
- ExplicitWidth = 652
+ ExplicitWidth = 901
object imgStatus: TImage
Left = 3
Top = 3
diff --git a/Source/GUIBase/uEditorDBItem.pas b/Source/GUIBase/uEditorDBItem.pas
index 9ce1e0ad..b2fcc6a6 100644
--- a/Source/GUIBase/uEditorDBItem.pas
+++ b/Source/GUIBase/uEditorDBItem.pas
@@ -10,7 +10,8 @@ uses
StdCtrls, uDAScriptingProvider, uDACDSDataTable, AppEvnts, uCustomView,
uViewBase, JvAppStorage, JvAppRegistryStorage,
JvFormPlacement, pngimage, ExtCtrls, JvComponentBase, dxLayoutLookAndFeels,
- JvExComCtrls, JvStatusBar, uDAInterfaces;
+ JvExComCtrls, JvStatusBar, uDAInterfaces, cxControls, cxContainer, cxEdit,
+ cxLabel;
type
IEditorDBItem = interface(IEditorDBBase)
@@ -21,6 +22,8 @@ type
pgPaginas: TPageControl;
pagGeneral: TTabSheet;
imgStatus: TImage;
+ lblDesbloquear: TcxLabel;
+ procedure lblDesbloquearClick(Sender: TObject);
protected
procedure EliminarInterno; override;
procedure PrevisualizarInterno; override;
@@ -31,7 +34,7 @@ type
implementation
uses
- uEditorBase, uDialogUtils;
+ uEditorBase, uDialogUtils, uDataTableUtils;
{$R *.dfm}
@@ -40,6 +43,9 @@ begin
inherited;
if HayDatos then
begin
+ if lblDesbloquear.Enabled then
+ lblDesbloquear.Visible := ReadOnly;
+
if (Self.Modified) and (dsDataTable.DataTable.State <> dsInsert) then
begin
StatusBar.Panels[0].Text := ' Se han producido cambios';
@@ -63,7 +69,7 @@ begin
inherited;
if Modified then
begin
- if (ShowConfirmMessage('Se han producido cambios', 'Se han producido cambios y no se puede imprimir hasta que no se guarden.' + #10#13 +
+ if (ShowConfirmMessage('Se han producido cambios', 'Se han producido cambios y no se puede imprimir hasta que no se guarden.' + #13#10 +
'¿Desea guardarlos ahora?') = IDYES) then
actGuardar.Execute
else
@@ -71,6 +77,21 @@ begin
end;
end;
+procedure TfEditorDBItem.lblDesbloquearClick(Sender: TObject);
+begin
+ inherited;
+
+ if (ShowConfirmMessage('¿Desbloquear los datos para permitir cambios?', 'Actualmente, los datos de esta ficha no se pueden modificar.' + #13#10 +
+ 'Temporalmente puede desbloquear la ficha para realizar cambios puntuales. ¿Desea continuar?') = IDYES) then
+ begin
+ lblDesbloquear.Visible := False;
+ lblDesbloquear.Enabled := False;
+ SetDataTableReadOnly(dsDataTable.DataTable, False);
+ Self.ReadOnly := False;
+ ActualizarEstadoEditor;
+ end;
+end;
+
procedure TfEditorDBItem.PrevisualizarInterno;
begin
inherited;
diff --git a/Source/GUIBase/uViewBase.pas b/Source/GUIBase/uViewBase.pas
index a438e24f..f3ea698a 100644
--- a/Source/GUIBase/uViewBase.pas
+++ b/Source/GUIBase/uViewBase.pas
@@ -41,16 +41,18 @@ var
begin
inherited;
- if ReadOnly then
- for i:=0 to Self.ComponentCount-1 do
- begin
- If (Self.Components[i] Is TfrViewBase) then
- (Self.Components[i] as TfrViewBase).ReadOnly := ReadOnly;
+ if (csLoading in Self.ComponentState) then
+ Exit;
- If (Self.Components[i] Is TcxControl)
- and (not (Self.Components[i] Is TdxLayoutControl)) then
- (Self.Components[i] as TcxControl).Enabled := not ReadOnly;
- end;
+ for i:=0 to Self.ComponentCount-1 do
+ begin
+ if (Self.Components[i] is TfrViewBase) then
+ (Self.Components[i] as TfrViewBase).ReadOnly := Self.ReadOnly;
+
+ if (Self.Components[i] is TcxControl)
+ and (not (Self.Components[i] Is TdxLayoutControl)) then
+ (Self.Components[i] as TcxControl).Enabled := not Self.ReadOnly;
+ end;
end;
end.
diff --git a/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.dproj b/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.dproj
index 12079a02..e79d1aa3 100644
--- a/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.dproj
+++ b/Source/Modulos/Albaranes de cliente/Data/AlbaranesCliente_data.dproj
@@ -48,15 +48,15 @@
MainSource
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Albaranes de proveedor/Controller/AlbaranesProveedor_controller.dproj b/Source/Modulos/Albaranes de proveedor/Controller/AlbaranesProveedor_controller.dproj
index da25fc91..1389841a 100644
--- a/Source/Modulos/Albaranes de proveedor/Controller/AlbaranesProveedor_controller.dproj
+++ b/Source/Modulos/Albaranes de proveedor/Controller/AlbaranesProveedor_controller.dproj
@@ -48,14 +48,14 @@
MainSource
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Albaranes de proveedor/Data/AlbaranesProveedor_data.dproj b/Source/Modulos/Albaranes de proveedor/Data/AlbaranesProveedor_data.dproj
index 7cc19c99..5347b8f6 100644
--- a/Source/Modulos/Albaranes de proveedor/Data/AlbaranesProveedor_data.dproj
+++ b/Source/Modulos/Albaranes de proveedor/Data/AlbaranesProveedor_data.dproj
@@ -48,7 +48,7 @@
MainSource
-
+
diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm
index ef5d700f..a2d744c6 100644
--- a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm
+++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.dfm
@@ -58,11 +58,15 @@ inherited frViewDireccionEntregaAlbaranProv: TfrViewDireccionEntregaAlbaranProv
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 1
Width = 765
end
@@ -109,11 +113,15 @@ inherited frViewDireccionEntregaAlbaranProv: TfrViewDireccionEntregaAlbaranProv
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
TabOrder = 3
Width = 765
end
diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.pas b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.pas
index faca9506..0290effd 100644
--- a/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.pas
+++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDireccionEntregaAlbaranProv.pas
@@ -289,12 +289,13 @@ end;
procedure TfrViewDireccionEntregaAlbaranProv.SetReadOnly(Value: Boolean);
begin
inherited;
- if ReadOnly then
- begin
- rdxDestino1.Enabled := False;
- rdxDestino2.Enabled := False;
- RadioButton1.Enabled := False;
- end;
+
+ if (csLoading in Self.ComponentState) then
+ Exit;
+
+ rdxDestino1.Enabled := not ReadOnly;
+ rdxDestino2.Enabled := not ReadOnly;
+ RadioButton1.Enabled := not ReadOnly;
end;
procedure TfrViewDireccionEntregaAlbaranProv.txtDireccionDblClick(Sender: TObject);
diff --git a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionCliente.pas b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionCliente.pas
index cb97c1c6..b53cded6 100644
--- a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionCliente.pas
+++ b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionCliente.pas
@@ -234,11 +234,11 @@ procedure TfrViewDatosYSeleccionCliente.SetReadOnly(Value: Boolean);
begin
inherited;
- if ReadOnly then
- begin
- actAnadirContacto.Enabled := False;
- actElegirContacto.Enabled := False;
- end;
+ if (csLoading in Self.ComponentState) then
+ Exit;
+
+ actAnadirContacto.Enabled := not ReadOnly;
+ actElegirContacto.Enabled := not ReadOnly;
end;
end.
diff --git a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.pas b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.pas
index 948d0dbe..8065a49c 100644
--- a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.pas
+++ b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.pas
@@ -294,13 +294,13 @@ procedure TfrViewDatosYSeleccionClienteBase.SetReadOnly(Value: Boolean);
begin
inherited;
- if ReadOnly then
- begin
- actAnadirContacto.Enabled := False;
- actElegirContacto.Enabled := False;
- actElegirDireccion.Enabled := False;
- actElegirPersonaContacto.Enabled := False;
- end;
+ if (csLoading in Self.ComponentState) then
+ Exit;
+
+ actAnadirContacto.Enabled := not ReadOnly;
+ actElegirContacto.Enabled := not ReadOnly;
+ actElegirDireccion.Enabled := not ReadOnly;
+ actElegirPersonaContacto.Enabled := not ReadOnly;
end;
procedure TfrViewDatosYSeleccionClienteBase.VerFichaCliente;
diff --git a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionProveedor.pas b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionProveedor.pas
index 3bef18d5..f3fbc36c 100644
--- a/Source/Modulos/Contactos/Views/uViewDatosYSeleccionProveedor.pas
+++ b/Source/Modulos/Contactos/Views/uViewDatosYSeleccionProveedor.pas
@@ -220,11 +220,11 @@ procedure TfrViewDatosYSeleccionProveedor.SetReadOnly(Value: Boolean);
begin
inherited;
- if ReadOnly then
- begin
- actAnadirContacto.Enabled := False;
- actElegirContacto.Enabled := False;
- end;
+ if (csLoading in Self.ComponentState) then
+ Exit;
+
+ actAnadirContacto.Enabled := not ReadOnly;
+ actElegirContacto.Enabled := not ReadOnly;
end;
procedure TfrViewDatosYSeleccionProveedor.VerFichaProveedorInternal;
diff --git a/Source/Modulos/Facturas de proveedor/Controller/FacturasProveedor_controller.dproj b/Source/Modulos/Facturas de proveedor/Controller/FacturasProveedor_controller.dproj
index 1594b53c..3610d937 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/FacturasProveedor_controller.dproj
+++ b/Source/Modulos/Facturas de proveedor/Controller/FacturasProveedor_controller.dproj
@@ -48,14 +48,14 @@
MainSource
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Inventario/Controller/Inventario_controller.dproj b/Source/Modulos/Inventario/Controller/Inventario_controller.dproj
index 82eb23d7..11877eed 100644
--- a/Source/Modulos/Inventario/Controller/Inventario_controller.dproj
+++ b/Source/Modulos/Inventario/Controller/Inventario_controller.dproj
@@ -46,16 +46,16 @@
MainSource
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
TDataModule
diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
index 5ecbe651..d6299721 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
+++ b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
@@ -49,36 +49,42 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
T
@@ -144,12 +150,6 @@
TFrame
-
-
-
-
-
-