This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Facturas de cliente/Cliente/uEditarPreguntarIVA.pas
2007-06-21 16:02:50 +00:00

62 lines
1.3 KiB
ObjectPascal

unit uEditarPreguntarIVA;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit,
cxMaskEdit, ExtCtrls, cxSpinEdit;
type
TfEditorPreguntarIVA = class(TForm)
pnlSeleccion: TPanel;
bSeleccionar: TButton;
bCancelar: TButton;
Label1: TLabel;
Label2: TLabel;
edtIVA: TcxSpinEdit;
private
function GetIVA: Double;
procedure SetIVA(const Value: Double);
{ Private declarations }
public
property IVA : Double read GetIVA write SetIVA;
end;
var
fEditorPreguntarIVA: TfEditorPreguntarIVA;
function PreguntarIVA(var IVA : Double) : Boolean;
implementation
{$R *.dfm}
function PreguntarIVA(var IVA : Double) : Boolean;
begin
fEditorPreguntarIVA := TfEditorPreguntarIVA.Create(Application);
try
fEditorPreguntarIVA.IVA := IVA;
Result := (fEditorPreguntarIVA.ShowModal = mrOk);
finally
IVA := fEditorPreguntarIVA.IVA;
FreeAndNIL(fEditorPreguntarIVA);
end;
end;
{ TForm2 }
function TfEditorPreguntarIVA.GetIVA: Double;
begin
Result := edtIVA.Value;
end;
procedure TfEditorPreguntarIVA.SetIVA(const Value: Double);
begin
edtIVA.Value := Value;
end;
end.