git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES2/trunk@6 40301925-124e-1c4e-b97d-170ad7a8785b
68 lines
1.5 KiB
ObjectPascal
68 lines
1.5 KiB
ObjectPascal
unit uEditorFechaDecisionPresupuesto;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls;
|
|
|
|
type
|
|
TfEditorFechaDecisionPresupuesto = class(TfDialogBase)
|
|
edtFechaDecision: TDateTimePicker;
|
|
Label1: TLabel;
|
|
procedure actAceptarExecute(Sender: TObject);
|
|
procedure actCancelarExecute(Sender: TObject);
|
|
private
|
|
function GetDate: TDate;
|
|
procedure SetDate(const Value: TDate);
|
|
public
|
|
property Fecha : TDate read GetDate write SetDate;
|
|
end;
|
|
|
|
function ElegirFechaDecisionPresupuesto(var AFecha : TDate): Boolean;
|
|
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
function ElegirFechaDecisionPresupuesto(var AFecha : TDate): Boolean;
|
|
var
|
|
AEditor : TfEditorFechaDecisionPresupuesto;
|
|
begin
|
|
AEditor := TfEditorFechaDecisionPresupuesto.Create(NIL);
|
|
try
|
|
AEditor.Fecha := AFecha;
|
|
Result := (AEditor.ShowModal = mrOk);
|
|
if Result then
|
|
AFecha := AEditor.Fecha;
|
|
finally
|
|
AEditor.Release;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TfEditorFechaDecisionPresupuesto.actAceptarExecute(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
ModalResult := mrOK;
|
|
end;
|
|
|
|
procedure TfEditorFechaDecisionPresupuesto.actCancelarExecute(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
ModalResult := mrCancel;
|
|
end;
|
|
|
|
function TfEditorFechaDecisionPresupuesto.GetDate: TDate;
|
|
begin
|
|
Result := edtFechaDecision.Date;
|
|
end;
|
|
|
|
procedure TfEditorFechaDecisionPresupuesto.SetDate(const Value: TDate);
|
|
begin
|
|
edtFechaDecision.Date := Value;
|
|
end;
|
|
|
|
end.
|