unit uViewAlmacenes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
  cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel,
  cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxGrid, uBizAlmacenes, ActnList, Menus,
  cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
  JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
  dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
  dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
  cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
  TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, dxSkinsCore,
  dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans,
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
  dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
  dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
  dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
  dxSkinXmas2008Blue, dxSkinscxPCPainter;

type
  IViewAlmacenes = interface(IViewGrid)
    ['{E6798DF7-011C-40EC-B368-160C48697445}']
    function GetAlmacenes: IBizAlmacen;
    procedure SetAlmacenes(const Value: IBizAlmacen);
    property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
  end;

  TfrViewAlmacenes = class(TfrViewGrid, IViewAlmacenes)
    cxGridViewPERSONACONTACTO: TcxGridDBColumn;
    cxGridViewNOMBRE: TcxGridDBColumn;
    cxGridViewTELEFONO: TcxGridDBColumn;
    cxGridViewCALLE: TcxGridDBColumn;
    cxGridViewPROVINCIA: TcxGridDBColumn;
    cxGridViewPOBLACION: TcxGridDBColumn;
    cxGridViewCODIGO_POSTAL: TcxGridDBColumn;
    cxGridViewMOVIL: TcxGridDBColumn;
    cxGridViewFAX: TcxGridDBColumn;
  protected
    FAlmacenes: IBizAlmacen;
    function GetAlmacenes: IBizAlmacen; virtual;
    procedure SetAlmacenes(const Value: IBizAlmacen); virtual;
  public
    property Almacenes: IBizAlmacen read GetAlmacenes write SetAlmacenes;
  end;

implementation

uses uDataModuleAlmacenes;


{$R *.dfm}

{ TfrViewAlmacenes }

{
******************************* TfrViewAlmacenes *******************************
}
function TfrViewAlmacenes.GetAlmacenes: IBizAlmacen;
begin
  Result := FAlmacenes;
end;

procedure TfrViewAlmacenes.SetAlmacenes(const Value: IBizAlmacen);
begin
  FAlmacenes := Value;
  if Assigned(FAlmacenes) then
    dsDataSource.DataTable := FAlmacenes.DataTable;
end;


end.
