From 6b80bf92384d47065d03bdbaafe4f22486d241e5 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 24 Nov 2009 10:21:28 +0000 Subject: [PATCH] =?UTF-8?q?Se=20adapta=20la=20base=20para=20que=20la=20pre?= =?UTF-8?q?gunta=20de=20si=20desea=20guardar=20los=20cambios=20(al=20previ?= =?UTF-8?q?sualizar=20o=20imprimir)=20se=20haga=20en=20el=20action=20y=20n?= =?UTF-8?q?o=20en=20el=20precedimiento=20interno=20(PrevisualizarInterno,?= =?UTF-8?q?=20ImprimirInterno)=20para=20que=20as=C3=AD=20no=20se=20llame?= =?UTF-8?q?=20a=20imprimir=20o=20previsualizar=20interno=20si=20no=20se=20?= =?UTF-8?q?guarda.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@976 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/GUIBase/GUIBase.dproj | 48 +++++++++--------- Source/GUIBase/uEditorBase.pas | 38 ++++++++++++-- Source/GUIBase/uEditorDBItem.dfm | 4 -- Source/GUIBase/uEditorDBItem.pas | 28 ---------- .../uViewDatosYSeleccionClienteAlbaran.pas | 14 ++--- Source/Servidor/FactuGES_Server.RES | Bin 23208 -> 23208 bytes Source/Servidor/FactuGES_Server.rc | 2 +- 7 files changed, 66 insertions(+), 68 deletions(-) diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index c3550861..991b81a5 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -59,30 +59,30 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/GUIBase/uEditorBase.pas b/Source/GUIBase/uEditorBase.pas index 69f5a5a6..1da68fc2 100644 --- a/Source/GUIBase/uEditorBase.pas +++ b/Source/GUIBase/uEditorBase.pas @@ -263,8 +263,23 @@ procedure TfEditorBase.actImprimirExecute(Sender: TObject); begin if actImprimir.Enabled then begin - ImprimirInterno; - ActualizarEstadoEditor; + if Modified then + begin + if (ShowConfirmMessage('Se han producido cambios', 'Se han producido cambios y no se puede previsualizar hasta que no se guarden.' + #10#13 + + '¿Desea guardarlos ahora?') = IDYES) then + begin + GuardarInterno; + ImprimirInterno; + ActualizarEstadoEditor; + end + else + ShowInfoMessage('Recuerde guardar los cambios si quiere previsualizar o imprimir.'); + end + else + begin + ImprimirInterno; + ActualizarEstadoEditor; + end end; end; @@ -295,8 +310,23 @@ procedure TfEditorBase.actPrevisualizarExecute(Sender: TObject); begin if actPrevisualizar.Enabled then begin - PrevisualizarInterno; - ActualizarEstadoEditor; + if Modified then + begin + if (ShowConfirmMessage('Se han producido cambios', 'Se han producido cambios y no se puede previsualizar hasta que no se guarden.' + #10#13 + + '¿Desea guardarlos ahora?') = IDYES) then + begin + GuardarInterno; + PrevisualizarInterno; + ActualizarEstadoEditor; + end + else + ShowInfoMessage('Recuerde guardar los cambios si quiere previsualizar o imprimir.'); + end + else + begin + PrevisualizarInterno; + ActualizarEstadoEditor; + end; end; end; diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm index 5608817c..53548e08 100644 --- a/Source/GUIBase/uEditorDBItem.dfm +++ b/Source/GUIBase/uEditorDBItem.dfm @@ -77,10 +77,6 @@ inherited fEditorDBItem: TfEditorDBItem TabOrder = 2 object pagGeneral: TTabSheet Caption = 'General' - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 end end inherited StatusBar: TJvStatusBar diff --git a/Source/GUIBase/uEditorDBItem.pas b/Source/GUIBase/uEditorDBItem.pas index b2fcc6a6..1c659633 100644 --- a/Source/GUIBase/uEditorDBItem.pas +++ b/Source/GUIBase/uEditorDBItem.pas @@ -26,8 +26,6 @@ type procedure lblDesbloquearClick(Sender: TObject); protected procedure EliminarInterno; override; - procedure PrevisualizarInterno; override; - procedure ImprimirInterno; override; procedure ActualizarEstadoEditor; override; end; @@ -64,19 +62,6 @@ begin actCerrar.Execute; end; -procedure TfEditorDBItem.ImprimirInterno; -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.' + #13#10 + - '¿Desea guardarlos ahora?') = IDYES) then - actGuardar.Execute - else - ShowInfoMessage('Recuerde guardar los cambios si quiere previsualizar o imprimir.'); - end; -end; - procedure TfEditorDBItem.lblDesbloquearClick(Sender: TObject); begin inherited; @@ -92,19 +77,6 @@ begin end; end; -procedure TfEditorDBItem.PrevisualizarInterno; -begin - inherited; - if Modified then - begin - if (ShowConfirmMessage('Se han producido cambios', 'Se han producido cambios y no se puede previsualizar hasta que no se guarden.' + #10#13 + - '¿Desea guardarlos ahora?') = IDYES) then - actGuardar.Execute - else - ShowInfoMessage('Recuerde guardar los cambios si quiere previsualizar o imprimir.'); - end; -end; - initialization RegisterClass(TfEditorDBItem); diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas index cfbcd938..27f37726 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas @@ -322,13 +322,13 @@ begin if FCliente.ID > 0 then edtPersonaContacto.Enabled := True; - if FCliente.Direcciones.RecordCount > 0 then - ElegirDireccionCliente - else begin - FAlbaran.Edit; - FAlbaran.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; - RefrescarDireccion; - end; +// if FCliente.Direcciones.RecordCount > 0 then +// ElegirDireccionCliente +// else begin +// FAlbaran.Edit; +// FAlbaran.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; +// RefrescarDireccion; +// end; end else begin dsCliente.DataTable := NIL; diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index ad8e8b78cec53ff85f6b11a763456bb783654d21..231fbf6f0a5c2dbcfb2363a6f54cb093aed6853b 100644 GIT binary patch delta 45 zcmZ3nm2t&Z#tjlt!nq8I3`Gnj45