60 lines
1.5 KiB
ObjectPascal
60 lines
1.5 KiB
ObjectPascal
|
|
unit uDialogOpcionesImpresionAlbaranesCliente;
|
||
|
|
|
||
|
|
interface
|
||
|
|
|
||
|
|
uses
|
||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||
|
|
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls;
|
||
|
|
|
||
|
|
type
|
||
|
|
TfDialogOpcionesImpresionAlbaranesCliente = class(TfDialogBase)
|
||
|
|
cbVerPrecios: TCheckBox;
|
||
|
|
cbVerRef: TCheckBox;
|
||
|
|
procedure actAceptarExecute(Sender: TObject);
|
||
|
|
procedure actCancelarExecute(Sender: TObject);
|
||
|
|
private
|
||
|
|
{ Private declarations }
|
||
|
|
public
|
||
|
|
{ Public declarations }
|
||
|
|
end;
|
||
|
|
|
||
|
|
function ElegirOpcionesImpresionAlbaranCliente(var AVerPrecios : Boolean; var AVerRef : Boolean): Boolean;
|
||
|
|
|
||
|
|
implementation
|
||
|
|
|
||
|
|
{$R *.dfm}
|
||
|
|
|
||
|
|
function ElegirOpcionesImpresionAlbaranCliente(var AVerPrecios : Boolean; var AVerRef : Boolean): Boolean;
|
||
|
|
var
|
||
|
|
AEditor : TfDialogOpcionesImpresionAlbaranesCliente;
|
||
|
|
begin
|
||
|
|
AEditor := TfDialogOpcionesImpresionAlbaranesCliente.Create(NIL);
|
||
|
|
try
|
||
|
|
AEditor.cbVerPrecios.Checked := AVerPrecios;
|
||
|
|
AEditor.cbVerRef.Checked := AVerRef;
|
||
|
|
|
||
|
|
Result := (AEditor.ShowModal = mrOk);
|
||
|
|
if Result then
|
||
|
|
begin
|
||
|
|
AVerPrecios := AEditor.cbVerPrecios.Checked;
|
||
|
|
AVerRef := AEditor.cbVerRef.Checked;
|
||
|
|
end;
|
||
|
|
finally
|
||
|
|
AEditor.Release;
|
||
|
|
end;
|
||
|
|
end;
|
||
|
|
|
||
|
|
procedure TfDialogOpcionesImpresionAlbaranesCliente.actAceptarExecute(Sender: TObject);
|
||
|
|
begin
|
||
|
|
inherited;
|
||
|
|
ModalResult := mrOk
|
||
|
|
end;
|
||
|
|
|
||
|
|
procedure TfDialogOpcionesImpresionAlbaranesCliente.actCancelarExecute(Sender: TObject);
|
||
|
|
begin
|
||
|
|
inherited;
|
||
|
|
ModalResult := mrCancel;
|
||
|
|
end;
|
||
|
|
|
||
|
|
end.
|