Preguntar antes de generar el contrato en presupuestos de cliente

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@476 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
roberto 2009-11-24 18:31:29 +00:00
parent ba7f4ccf90
commit 8bfaf9a5a6
2 changed files with 21 additions and 16 deletions

View File

@ -2,7 +2,6 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
Caption = 'Lista de presupuestos de cliente' Caption = 'Lista de presupuestos de cliente'
ClientWidth = 805 ClientWidth = 805
ExplicitWidth = 813 ExplicitWidth = 813
ExplicitHeight = 240
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader

View File

@ -204,24 +204,29 @@ begin
begin begin
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Presupuestos as ISeleccionable).SelectedRecords); SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Presupuestos as ISeleccionable).SelectedRecords);
APresupuestos := (Controller as IPresupuestosClienteController).ExtraerSeleccionados(Presupuestos) as IBizPresupuestoCliente; APresupuestos := (Controller as IPresupuestosClienteController).ExtraerSeleccionados(Presupuestos) as IBizPresupuestoCliente;
with APresupuestos.DataTable do
begin
First;
while not EOF do
begin
GenerarContratoCli(APresupuestos.ID, False);
Next;
end;
end;
actRefrescar.Execute;
ShowInfoMessage('Se han generado los contratos');
end end
else begin else
APresupuestos := Self.Presupuestos; APresupuestos := Self.Presupuestos;
GenerarContratoCli(APresupuestos.ID);
if (Application.MessageBox('¿Está seguro que desea generar el/los contrato/s de los presupuesto/s seleccionado/s?', 'Atención', MB_YESNO) = IDYES) then
begin
if not AllItems then
GenerarContratoCli(APresupuestos.ID)
else
with APresupuestos.DataTable do
begin
First;
while not EOF do
begin
GenerarContratoCli(APresupuestos.ID, False);
Next;
end;
end;
actRefrescar.Execute; actRefrescar.Execute;
end; if AllItems then
ShowInfoMessage('Se han generado los contratos');
end
end; end;
procedure TfEditorPresupuestosCliente.actGenerarContratoUpdate(Sender: TObject); procedure TfEditorPresupuestosCliente.actGenerarContratoUpdate(Sender: TObject);
@ -319,6 +324,7 @@ begin
actGenerarContrato.Execute; actGenerarContrato.Execute;
end; end;
end; end;
end; end;
end; end;