2011-02-03 18:44:02 +00:00
|
|
|
unit uViewIntervaloComparativo;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, cxGraphics, cxEdit, cxDropDownEdit, cxCalendar, StdCtrls,
|
|
|
|
|
cxControls, cxContainer, cxTextEdit, cxMaskEdit, TBXDkPanels,
|
|
|
|
|
cxEditRepositoryItems, dxLayoutControl, dxLayoutLookAndFeels, uViewBase,
|
2011-02-23 11:54:21 +00:00
|
|
|
Mask, JvExMask, JvToolEdit, TB2Dock, uViewParametrosInforme, cxSpinEdit;
|
2011-02-03 18:44:02 +00:00
|
|
|
|
|
|
|
|
type
|
|
|
|
|
IViewPeriodoFechas = interface(IViewParametrosInforme)
|
|
|
|
|
['{793084E2-873E-4C57-8BD6-9087816CCF3A}']
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
TfrViewIntervaloComparativo = class(TfrViewParametrosInforme, IViewPeriodoFechas)
|
2011-02-03 18:44:02 +00:00
|
|
|
TBXLabel2: TTBXLabel;
|
|
|
|
|
TBXAlignmentPanel2: TTBXAlignmentPanel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
TBXAlignmentPanel3: TTBXAlignmentPanel;
|
|
|
|
|
lis: TLabel;
|
|
|
|
|
cbIntervalo: TcxComboBox;
|
|
|
|
|
cbAno1: TcxComboBox;
|
|
|
|
|
TBXAlignmentPanel1: TTBXAlignmentPanel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
cbAno2: TcxComboBox;
|
2011-02-23 11:54:21 +00:00
|
|
|
TBXAlignmentPanel4: TTBXAlignmentPanel;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
stopN: TcxSpinEdit;
|
2011-02-03 18:44:02 +00:00
|
|
|
|
|
|
|
|
private
|
|
|
|
|
function GetIntervalo: Variant;
|
|
|
|
|
function GetAno1: Variant;
|
|
|
|
|
function GetAno2: Variant;
|
|
|
|
|
procedure SetIntervalo(const Value: Variant);
|
|
|
|
|
procedure SetAno1(const Value: Variant);
|
|
|
|
|
procedure SetAno2(const Value: Variant);
|
|
|
|
|
|
|
|
|
|
public
|
|
|
|
|
property Intevalo : Variant read GetIntervalo write SetIntervalo;
|
|
|
|
|
property Ano1 : Variant read GetAno1 write SetAno1;
|
|
|
|
|
property Ano2 : Variant read GetAno2 write SetAno2;
|
|
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses DateUtils;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
function TfrViewIntervaloComparativo.GetIntervalo: Variant;
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
Result := cbIntervalo.EditValue;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
function TfrViewIntervaloComparativo.GetAno1: Variant;
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
Result := cbAno1.EditValue;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
function TfrViewIntervaloComparativo.GetAno2: Variant;
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
Result := cbAno2.EditValue;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
procedure TfrViewIntervaloComparativo.SetIntervalo(const Value: Variant);
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
cbIntervalo.EditValue := Value;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
procedure TfrViewIntervaloComparativo.SetAno1(const Value: Variant);
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
cbAno1.EditValue := Value;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
procedure TfrViewIntervaloComparativo.SetAno2(const Value: Variant);
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
cbAno2.EditValue := Value;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-02-09 18:50:25 +00:00
|
|
|
constructor TfrViewIntervaloComparativo.Create(AOwner: TComponent);
|
2011-02-03 18:44:02 +00:00
|
|
|
begin
|
|
|
|
|
inherited;
|
|
|
|
|
// cbPeriodo.ItemIndex := 0;
|
|
|
|
|
// cbPeriodo2.ItemIndex := 0;
|
|
|
|
|
// EsteMes(TFecha);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|
|