git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
106 lines
2.9 KiB
ObjectPascal
106 lines
2.9 KiB
ObjectPascal
unit uViewMontajeRelacionado;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, cxControls, cxContainer, cxEdit,
|
|
cxTextEdit, cxDBEdit, ComCtrls, ToolWin, ImgList, PngImageList, ActnList,
|
|
DB, uDADataTable, uBizMontajes;
|
|
|
|
type
|
|
IViewMontajeRelacionado = interface(IViewBase)
|
|
['{202B0654-733C-403B-8795-4E8CF61A428E}']
|
|
|
|
function GetMontaje: IBizMontaje;
|
|
procedure SetMontaje(const Value: IBizMontaje);
|
|
property Montaje: IBizMontaje read GetMontaje write SetMontaje;
|
|
|
|
function GetOnMontajeChanged : TNotifyEvent;
|
|
procedure SetOnMontajeChanged (const Value : TNotifyEvent);
|
|
property OnMontajeChanged : TNotifyEvent read GetOnMontajeChanged
|
|
write SetOnMontajeChanged;
|
|
end;
|
|
|
|
TfrViewMontajeRelacionado = class(TfrViewBase, IViewMontajeRelacionado)
|
|
Label5: TLabel;
|
|
Bevel1: TBevel;
|
|
ActionList1: TActionList;
|
|
actElegirMontaje: TAction;
|
|
actVerMontaje: TAction;
|
|
PngImageList: TPngImageList;
|
|
ToolBar1: TToolBar;
|
|
ToolButton1: TToolButton;
|
|
ToolButton3: TToolButton;
|
|
ToolButton2: TToolButton;
|
|
lblNombre: TLabel;
|
|
DADataSource: TDADataSource;
|
|
edtlReferencia: TcxDBTextEdit;
|
|
procedure actVerMontajeExecute(Sender: TObject);
|
|
procedure actVerMontajeUpdate(Sender: TObject);
|
|
private
|
|
FMontaje : IBizMontaje;
|
|
FOnMontajeChanged : TNotifyEvent;
|
|
protected
|
|
function GetMontaje: IBizMontaje;
|
|
procedure SetMontaje(const Value: IBizMontaje);
|
|
function GetOnMontajeChanged : TNotifyEvent;
|
|
procedure SetOnMontajeChanged (const Value : TNotifyEvent);
|
|
public
|
|
property Montaje: IBizMontaje read GetMontaje write SetMontaje;
|
|
property OnMontajeChanged : TNotifyEvent read GetOnMontajeChanged
|
|
write SetOnMontajeChanged;
|
|
end;
|
|
|
|
var
|
|
frViewMontajeRelacionado: TfrViewMontajeRelacionado;
|
|
|
|
implementation
|
|
|
|
uses
|
|
uDataModuleMontajes, schMontajesClient_Intf;
|
|
|
|
{$R *.dfm}
|
|
|
|
{ TfrViewMontajeAlbaran }
|
|
|
|
procedure TfrViewMontajeRelacionado.actVerMontajeExecute(
|
|
Sender: TObject);
|
|
begin
|
|
FMontaje.Show;
|
|
end;
|
|
|
|
procedure TfrViewMontajeRelacionado.actVerMontajeUpdate(
|
|
Sender: TObject);
|
|
begin
|
|
inherited;
|
|
(Sender as TAction).Enabled := (Length(edtlReferencia.Text) > 0);
|
|
end;
|
|
|
|
function TfrViewMontajeRelacionado.GetMontaje: IBizMontaje;
|
|
begin
|
|
Result := FMontaje;
|
|
end;
|
|
|
|
procedure TfrViewMontajeRelacionado.SetMontaje(const Value: IBizMontaje);
|
|
begin
|
|
FMontaje := Value;
|
|
DADataSource.DataTable := FMontaje.DataTable;
|
|
|
|
if Assigned(FOnMontajeChanged) then
|
|
FOnMontajeChanged(Self);
|
|
end;
|
|
|
|
function TfrViewMontajeRelacionado.GetOnMontajeChanged: TNotifyEvent;
|
|
begin
|
|
Result := FOnMontajeChanged;
|
|
end;
|
|
|
|
procedure TfrViewMontajeRelacionado.SetOnMontajeChanged(
|
|
const Value: TNotifyEvent);
|
|
begin
|
|
FOnMontajeChanged := Value;
|
|
end;
|
|
|
|
end.
|