unit uViewAlmacen;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewBase, ExtCtrls, StdCtrls, Buttons, DB, uDADataTable,
  DBCtrls, Grids, DBGrids, uBizAlmacenes, Mask, ComCtrls, uCustomView,
  JvComponent, JvFormAutoSize, cxControls, cxContainer, cxEdit, cxTextEdit,
  cxDBEdit, dxLayoutControl, uDAInterfaces;

type
  IViewAlmacen = interface(IViewBase)
  ['{F44F8AEF-CB9C-44D5-93DA-53D6AB6A2D29}']
    function GetAlmacen: IBizAlmacen;
    procedure SetAlmacen(const Value: IBizAlmacen);
    property Almacen: IBizAlmacen read GetAlmacen write SetAlmacen;
  end;
  
  TfrViewAlmacen = class(TfrViewBase, IViewAlmacen)
    DADataSource: TDADataSource;
    ePersonaContacto: TcxDBTextEdit;
    eTlfTelefono: TcxDBTextEdit;
    eTlfMovil: TcxDBTextEdit;
    eFax: TcxDBTextEdit;
    dxLayoutControlAlmacenGroup_Root: TdxLayoutGroup;
    dxLayoutControlAlmacen: TdxLayoutControl;
    dxLayoutControlAlmacenGroup1: TdxLayoutGroup;
    dxLayoutControlAlmacenItem3: TdxLayoutItem;
    eNombre: TcxDBTextEdit;
    dxLayoutControlAlmacenItem4: TdxLayoutItem;
    dxLayoutControlAlmacenGroup2: TdxLayoutGroup;
    dxLayoutControlAlmacenItem1: TdxLayoutItem;
    dxLayoutControlAlmacenItem5: TdxLayoutItem;
    dxLayoutControlAlmacenItem6: TdxLayoutItem;
    dxLayoutControlAlmacenGroup3: TdxLayoutGroup;
    dxLayoutControlAlmacenGroup4: TdxLayoutGroup;
    dxLayoutControlAlmacenItem10: TdxLayoutItem;
    eCalle: TcxDBTextEdit;
    dxLayoutControlAlmacenItem2: TdxLayoutItem;
    ePoblacion: TcxDBTextEdit;
    dxLayoutControlAlmacenItem7: TdxLayoutItem;
    dxLayoutControlAlmacenGroup5: TdxLayoutGroup;
    eCodigoPostal: TcxDBTextEdit;
    dxLayoutControlAlmacenItem9: TdxLayoutItem;
    dxLayoutControlAlmacenGroup6: TdxLayoutGroup;
    eProvincia: TcxDBTextEdit;
  protected
    FAlmacen: IBizAlmacen;
    function GetAlmacen: IBizAlmacen;
    procedure SetAlmacen(const Value: IBizAlmacen);
  public
    property Almacen: IBizAlmacen read GetAlmacen write SetAlmacen;
  end;
  
implementation

uses uDataModuleAlmacenes;

{$R *.dfm}

{ TfrViewAlmacenes }

{
******************************* TfrViewAlmacenes ********************************
}

function TfrViewAlmacen.GetAlmacen: IBizAlmacen;
begin
  Result := FAlmacen;
end;

procedure TfrViewAlmacen.SetAlmacen(const Value: IBizAlmacen);
begin
  FAlmacen := Value;
  if Assigned(FAlmacen) then
    DADataSource.DataTable := FAlmacen.DataTable
  else
    DADataSource.DataTable := NIL;
end;

end.

