git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
62 lines
1.3 KiB
ObjectPascal
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.
|