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:
roberto 2009-04-15 15:29:54 +00:00
parent a843c20577
commit bcfed0d231
7 changed files with 47 additions and 33 deletions

View File

@ -168,11 +168,33 @@ implementation
uses
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 *********************************
}
procedure TfEditorBase.actCancelarCambiosExecute(Sender: TObject);
begin
CancelarCambiosInterno;
@ -372,7 +394,7 @@ end;
procedure TfEditorBase.GuardarInterno;
begin
//
PostActivecxEditorChanges;
end;
procedure TfEditorBase.ImprimirInterno;

View File

@ -7,7 +7,6 @@ inherited fEditorContacto: TfEditorContacto
ClientWidth = 632
Scaled = False
ExplicitWidth = 640
ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -21,6 +20,8 @@ inherited fEditorContacto: TfEditorContacto
inherited lblDesbloquear: TcxLabel
Left = 534
ExplicitLeft = 534
AnchorX = 579
AnchorY = 14
end
end
inherited TBXDock: TTBXDock
@ -109,18 +110,6 @@ inherited fEditorContacto: TfEditorContacto
inherited ToolBar1: TToolBar
Width = 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

View File

@ -138,7 +138,9 @@ uses
uRecibosProveedorController, uBizRecibosProveedor, uNumUtils,
uFacturasProveedorReportController, DateUtils, Forms, Dialogs,
uFormasPagoController, uBizFormasPago, uStringsUtils,
uIEditorElegirDomiciliacion;
uIEditorElegirDomiciliacion,
cxEdit;
procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoProveedor;
ADestino : IBizDetallesFacturaProveedor);
@ -470,7 +472,7 @@ var
begin
Result := False;
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignada');

View File

@ -6,7 +6,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ClientWidth = 819
Position = poScreenCenter
OnClose = CustomEditorClose
ExplicitTop = -112
ExplicitWidth = 827
ExplicitHeight = 667
PixelsPerInch = 96
@ -41,6 +40,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited lblDesbloquear: TcxLabel
Left = 721
ExplicitLeft = 721
AnchorX = 766
AnchorY = 14
end
end
inherited TBXDock: TTBXDock
@ -76,14 +77,15 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited pgPaginas: TPageControl
Width = 813
Height = 362
ActivePage = pagContenido
OnChanging = pgPaginasChanging
ExplicitWidth = 813
ExplicitHeight = 369
ExplicitHeight = 362
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 805
ExplicitHeight = 341
ExplicitHeight = 334
inline frViewFacturaProveedor1: TfrViewFacturaProveedor
Left = 0
Top = 0
@ -99,12 +101,12 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 805
ExplicitHeight = 341
ExplicitHeight = 334
inherited dxLayoutControl1: TdxLayoutControl
Width = 805
Height = 334
ExplicitWidth = 805
ExplicitHeight = 341
ExplicitHeight = 334
inherited eReferencia: TcxDBTextEdit
Properties.ReadOnly = True
Style.LookAndFeel.SkinName = ''
@ -242,7 +244,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitHeight = 341
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
Left = 0
Top = 0
@ -260,7 +261,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 805
ExplicitHeight = 341
ExplicitHeight = 334
inherited ToolBar1: TToolBar
Width = 805
Height = 51
@ -290,10 +291,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited FontSize: TEdit
Left = 544
Top = 0
Width = 184
Width = 200
ExplicitLeft = 544
ExplicitTop = 0
ExplicitWidth = 184
ExplicitWidth = 200
end
inherited ToolButton13: TToolButton [7]
Left = 0
@ -359,7 +360,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Height = 257
ExplicitTop = 77
ExplicitWidth = 805
ExplicitHeight = 264
ExplicitHeight = 257
end
inherited TBXDock1: TTBXDock
Top = 51
@ -388,7 +389,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Caption = 'Pedidos'
ImageIndex = 2
TabVisible = False
ExplicitHeight = 341
inline frViewPedidosFacturaProveedor1: TfrViewPedidosFacturaProveedor
Left = 0
Top = 0
@ -404,12 +404,12 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 805
ExplicitHeight = 341
ExplicitHeight = 334
inherited cxGrid: TcxGrid
Width = 805
Height = 309
ExplicitWidth = 805
ExplicitHeight = 316
ExplicitHeight = 309
end
inherited ToolBar1: TToolBar
Width = 805
@ -425,7 +425,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
item
Width = 200
end>
ExplicitTop = 627
ExplicitTop = 614
ExplicitWidth = 819
end
inline frViewTotales1: TfrViewTotales [4]
@ -449,7 +449,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 819
Height = 170
ExplicitWidth = 819
ExplicitHeight = 163
ExplicitHeight = 170
inherited Bevel3: TBevel
Left = 460
Top = 30

View File

@ -250,6 +250,7 @@ begin
frViewDetallesFacturaProveedor1.BeginUpdate; // Para que no se mueva el foco
try
bEsNuevo := FFactura.EsNuevo;
FController.Guardar(FFactura);
finally
frViewDetallesFacturaProveedor1.EndUpdate;

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "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
BLOCK "VarFileInfo"