Se arregla el editor base para que los componentes devexpress hagan post siempre antes de guardarinterno, esto provocaba fallos laterales
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@938 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
a843c20577
commit
bcfed0d231
@ -168,11 +168,33 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Menus, uDMBase, cxControls, uDialogUtils,
|
Menus, uDMBase, cxControls, uDialogUtils,
|
||||||
uStringsUtils;
|
uStringsUtils, cxEdit;
|
||||||
|
|
||||||
|
|
||||||
|
{Método que coge el componente editor que tenga el foco y le fuerza a hacer post para que la tabla se entere
|
||||||
|
}
|
||||||
|
procedure PostActivecxEditorChanges;
|
||||||
|
var
|
||||||
|
AControl: TWinControl;
|
||||||
|
ActiveEditor: TcxCustomEdit;
|
||||||
|
begin
|
||||||
|
ActiveEditor:= nil;
|
||||||
|
|
||||||
|
AControl := Screen.ActiveControl;
|
||||||
|
if Supports(AControl, IcxInnerEditHelper) then
|
||||||
|
ActiveEditor:= TcxCustomEdit(AControl.Owner)
|
||||||
|
else
|
||||||
|
if AControl is TcxCustomEdit then
|
||||||
|
ActiveEditor:= TcxCustomEdit(AControl);
|
||||||
|
if Assigned(ActiveEditor) then
|
||||||
|
ActiveEditor.PostEditValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
********************************* TfEditorBase *********************************
|
********************************* TfEditorBase *********************************
|
||||||
}
|
}
|
||||||
|
|
||||||
procedure TfEditorBase.actCancelarCambiosExecute(Sender: TObject);
|
procedure TfEditorBase.actCancelarCambiosExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
CancelarCambiosInterno;
|
CancelarCambiosInterno;
|
||||||
@ -372,7 +394,7 @@ end;
|
|||||||
|
|
||||||
procedure TfEditorBase.GuardarInterno;
|
procedure TfEditorBase.GuardarInterno;
|
||||||
begin
|
begin
|
||||||
//
|
PostActivecxEditorChanges;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorBase.ImprimirInterno;
|
procedure TfEditorBase.ImprimirInterno;
|
||||||
|
|||||||
@ -7,7 +7,6 @@ inherited fEditorContacto: TfEditorContacto
|
|||||||
ClientWidth = 632
|
ClientWidth = 632
|
||||||
Scaled = False
|
Scaled = False
|
||||||
ExplicitWidth = 640
|
ExplicitWidth = 640
|
||||||
ExplicitHeight = 240
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
@ -21,6 +20,8 @@ inherited fEditorContacto: TfEditorContacto
|
|||||||
inherited lblDesbloquear: TcxLabel
|
inherited lblDesbloquear: TcxLabel
|
||||||
Left = 534
|
Left = 534
|
||||||
ExplicitLeft = 534
|
ExplicitLeft = 534
|
||||||
|
AnchorX = 579
|
||||||
|
AnchorY = 14
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
@ -109,18 +110,6 @@ inherited fEditorContacto: TfEditorContacto
|
|||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 618
|
Width = 618
|
||||||
ExplicitWidth = 618
|
ExplicitWidth = 618
|
||||||
inherited ToolButton1: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton4: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton2: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton7: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -138,7 +138,9 @@ uses
|
|||||||
uRecibosProveedorController, uBizRecibosProveedor, uNumUtils,
|
uRecibosProveedorController, uBizRecibosProveedor, uNumUtils,
|
||||||
uFacturasProveedorReportController, DateUtils, Forms, Dialogs,
|
uFacturasProveedorReportController, DateUtils, Forms, Dialogs,
|
||||||
uFormasPagoController, uBizFormasPago, uStringsUtils,
|
uFormasPagoController, uBizFormasPago, uStringsUtils,
|
||||||
uIEditorElegirDomiciliacion;
|
uIEditorElegirDomiciliacion,
|
||||||
|
|
||||||
|
cxEdit;
|
||||||
|
|
||||||
procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoProveedor;
|
procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoProveedor;
|
||||||
ADestino : IBizDetallesFacturaProveedor);
|
ADestino : IBizDetallesFacturaProveedor);
|
||||||
@ -470,7 +472,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
if not Assigned(AFactura) then
|
if not Assigned(AFactura) then
|
||||||
raise Exception.Create ('Factura no asignada');
|
raise Exception.Create ('Factura no asignada');
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
ClientWidth = 819
|
ClientWidth = 819
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
OnClose = CustomEditorClose
|
OnClose = CustomEditorClose
|
||||||
ExplicitTop = -112
|
|
||||||
ExplicitWidth = 827
|
ExplicitWidth = 827
|
||||||
ExplicitHeight = 667
|
ExplicitHeight = 667
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
@ -41,6 +40,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
inherited lblDesbloquear: TcxLabel
|
inherited lblDesbloquear: TcxLabel
|
||||||
Left = 721
|
Left = 721
|
||||||
ExplicitLeft = 721
|
ExplicitLeft = 721
|
||||||
|
AnchorX = 766
|
||||||
|
AnchorY = 14
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
@ -76,14 +77,15 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 813
|
Width = 813
|
||||||
Height = 362
|
Height = 362
|
||||||
|
ActivePage = pagContenido
|
||||||
OnChanging = pgPaginasChanging
|
OnChanging = pgPaginasChanging
|
||||||
ExplicitWidth = 813
|
ExplicitWidth = 813
|
||||||
ExplicitHeight = 369
|
ExplicitHeight = 362
|
||||||
inherited pagGeneral: TTabSheet
|
inherited pagGeneral: TTabSheet
|
||||||
ExplicitLeft = 4
|
ExplicitLeft = 4
|
||||||
ExplicitTop = 24
|
ExplicitTop = 24
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 341
|
ExplicitHeight = 334
|
||||||
inline frViewFacturaProveedor1: TfrViewFacturaProveedor
|
inline frViewFacturaProveedor1: TfrViewFacturaProveedor
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -99,12 +101,12 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 341
|
ExplicitHeight = 334
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 805
|
Width = 805
|
||||||
Height = 334
|
Height = 334
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 341
|
ExplicitHeight = 334
|
||||||
inherited eReferencia: TcxDBTextEdit
|
inherited eReferencia: TcxDBTextEdit
|
||||||
Properties.ReadOnly = True
|
Properties.ReadOnly = True
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
@ -242,7 +244,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
object pagContenido: TTabSheet
|
object pagContenido: TTabSheet
|
||||||
Caption = 'Contenido'
|
Caption = 'Contenido'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
ExplicitHeight = 341
|
|
||||||
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
|
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -260,7 +261,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 341
|
ExplicitHeight = 334
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 805
|
Width = 805
|
||||||
Height = 51
|
Height = 51
|
||||||
@ -290,10 +291,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
inherited FontSize: TEdit
|
inherited FontSize: TEdit
|
||||||
Left = 544
|
Left = 544
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 184
|
Width = 200
|
||||||
ExplicitLeft = 544
|
ExplicitLeft = 544
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
ExplicitWidth = 184
|
ExplicitWidth = 200
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton [7]
|
inherited ToolButton13: TToolButton [7]
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -359,7 +360,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
Height = 257
|
Height = 257
|
||||||
ExplicitTop = 77
|
ExplicitTop = 77
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 264
|
ExplicitHeight = 257
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 51
|
Top = 51
|
||||||
@ -388,7 +389,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
Caption = 'Pedidos'
|
Caption = 'Pedidos'
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
TabVisible = False
|
TabVisible = False
|
||||||
ExplicitHeight = 341
|
|
||||||
inline frViewPedidosFacturaProveedor1: TfrViewPedidosFacturaProveedor
|
inline frViewPedidosFacturaProveedor1: TfrViewPedidosFacturaProveedor
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -404,12 +404,12 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 341
|
ExplicitHeight = 334
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 805
|
Width = 805
|
||||||
Height = 309
|
Height = 309
|
||||||
ExplicitWidth = 805
|
ExplicitWidth = 805
|
||||||
ExplicitHeight = 316
|
ExplicitHeight = 309
|
||||||
end
|
end
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 805
|
Width = 805
|
||||||
@ -425,7 +425,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
item
|
item
|
||||||
Width = 200
|
Width = 200
|
||||||
end>
|
end>
|
||||||
ExplicitTop = 627
|
ExplicitTop = 614
|
||||||
ExplicitWidth = 819
|
ExplicitWidth = 819
|
||||||
end
|
end
|
||||||
inline frViewTotales1: TfrViewTotales [4]
|
inline frViewTotales1: TfrViewTotales [4]
|
||||||
@ -449,7 +449,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
|||||||
Width = 819
|
Width = 819
|
||||||
Height = 170
|
Height = 170
|
||||||
ExplicitWidth = 819
|
ExplicitWidth = 819
|
||||||
ExplicitHeight = 163
|
ExplicitHeight = 170
|
||||||
inherited Bevel3: TBevel
|
inherited Bevel3: TBevel
|
||||||
Left = 460
|
Left = 460
|
||||||
Top = 30
|
Top = 30
|
||||||
|
|||||||
@ -250,6 +250,7 @@ begin
|
|||||||
frViewDetallesFacturaProveedor1.BeginUpdate; // Para que no se mueva el foco
|
frViewDetallesFacturaProveedor1.BeginUpdate; // Para que no se mueva el foco
|
||||||
try
|
try
|
||||||
bEsNuevo := FFactura.EsNuevo;
|
bEsNuevo := FFactura.EsNuevo;
|
||||||
|
|
||||||
FController.Guardar(FFactura);
|
FController.Guardar(FFactura);
|
||||||
finally
|
finally
|
||||||
frViewDetallesFacturaProveedor1.EndUpdate;
|
frViewDetallesFacturaProveedor1.EndUpdate;
|
||||||
|
|||||||
Binary file not shown.
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.7.3.0\0"
|
VALUE "FileVersion", "1.7.3.0\0"
|
||||||
VALUE "ProductVersion", "1.7.3.0\0"
|
VALUE "ProductVersion", "1.7.3.0\0"
|
||||||
VALUE "CompileDate", "martes, 31 de marzo de 2009 18:58\0"
|
VALUE "CompileDate", "miércoles, 15 de abril de 2009 17:16\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user