unit uViewDireccionEntregaAlbaranCliente;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, uViewBase, uBizAlbaranesCliente, cxGraphics, dxLayoutControl, cxMemo,
  cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxLookupEdit,
  cxDBLookupEdit, cxDBLookupComboBox, StdCtrls, cxControls, DB, uDADataTable,
  ActnList, uAlbaranesClienteController,
  Buttons, cxDBEdit, uDAInterfaces;

type
  IViewDireccionEntregaAlbaranCliente = interface(IViewBase)
  ['{C23A361A-98CA-450C-9F29-2DA7877601EE}']
    function GetAlbaranCliente: IBizAlbaranCliente;
    procedure SetAlbaranCliente(const Value: IBizAlbaranCliente);
    property AlbaranCliente: IBizAlbaranCliente read GetAlbaranCliente write SetAlbaranCliente;
  end;

  TfrViewDireccionEntregaAlbaranCliente = class(TfrViewBase, IViewDireccionEntregaAlbaranCliente)
    dxLayoutControl1: TdxLayoutControl;
    dxLayoutGroup1: TdxLayoutGroup;
    dsAlbaran: TDADataSource;
    dsAlmacenes: TDADataSource;
    dxLayoutControl1Item1: TdxLayoutItem;
    eCalle: TcxDBTextEdit;
    dxLayoutControl1Item2: TdxLayoutItem;
    ePoblacion: TcxDBTextEdit;
    dxLayoutControl1Item3: TdxLayoutItem;
    eProvincia: TcxDBTextEdit;
    dxLayoutControl1Item4: TdxLayoutItem;
    eCodigoPostal: TcxDBTextEdit;
    dxLayoutControl1Item5: TdxLayoutItem;
    eTlfTrabajo: TcxDBTextEdit;
    dxLayoutControl1Item6: TdxLayoutItem;
    ePersonaContacto: TcxDBTextEdit;
    dxLayoutControl1Group3: TdxLayoutGroup;
    dxLayoutControl1Group1: TdxLayoutGroup;
    dxLayoutControl1Group5: TdxLayoutGroup;
    dxLayoutControl1Group4: TdxLayoutGroup;
  protected
    FAlbaran : IBizAlbaranCliente;
    FController : IAlbaranesClienteController;
    function GetAlbaranCliente: IBizAlbaranCliente;
    procedure SetAlbaranCliente(const Value: IBizAlbaranCliente);
  public
    property AlbaranCliente: IBizAlbaranCliente read GetAlbaranCliente  write SetAlbaranCliente;
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  uEditorRegistryUtils;

constructor TfrViewDireccionEntregaAlbaranCliente.Create(AOwner: TComponent);
begin
  inherited;
  FAlbaran := NIL;
end;

destructor TfrViewDireccionEntregaAlbaranCliente.Destroy;
begin
  FAlbaran := NIL;
  inherited;
end;

function TfrViewDireccionEntregaAlbaranCliente.GetAlbaranCliente: IBizAlbaranCliente;
begin
  Result := FAlbaran;
end;

procedure TfrViewDireccionEntregaAlbaranCliente.SetAlbaranCliente(const Value: IBizAlbaranCliente);
begin
  FAlbaran := Value;
  if Assigned(FAlbaran) then
    dsAlbaran.DataTable := FAlbaran.DataTable
  else
    dsAlbaran.DataTable := NIL;
end;

end.
