unit uViewObras;

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, uBizObras, 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, cxTextEdit,
  dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee,
  dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
  dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black,
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
  dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters,
  dxSkinValentine, dxSkinXmas2008Blue, dxSkinscxPCPainter;

type
  IViewObras = interface(IViewGrid)
    ['{C04FA358-5EAC-444D-8E48-490302D9DE15}']
    function GetObras: IBizObra;
    procedure SetObras(const Value: IBizObra);
    property Obras: IBizObra read GetObras write SetObras;
  end;

  TfrViewObras = class(TfrViewGrid, IViewObras)
    cxGridViewPERSONACONTACTO: TcxGridDBColumn;
    cxGridViewNOMBRE: TcxGridDBColumn;
    cxGridViewTELEFONO: TcxGridDBColumn;
    cxGridViewID: TcxGridDBColumn;
    cxGridViewCALLE: TcxGridDBColumn;
    cxGridViewPROVINCIA: TcxGridDBColumn;
    cxGridViewPOBLACION: TcxGridDBColumn;
    cxGridViewCODIGO_POSTAL: TcxGridDBColumn;
    cxGridViewMOVIL: TcxGridDBColumn;
    cxGridViewFAX: TcxGridDBColumn;
    cxGridViewNOMBRE_CLIENTE: TcxGridDBColumn;
    cxGridViewNOMBRE_SUBCONTRATA: TcxGridDBColumn;
  protected
    FObras: IBizObra;
    function GetObras: IBizObra; virtual;
    procedure SetObras(const Value: IBizObra); virtual;
  public
    property Obras: IBizObra read GetObras write SetObras;
  end;

implementation

uses uDataModuleObras;


{$R *.dfm}

{ TfrViewObras }

{
******************************* TfrViewObras *******************************
}
function TfrViewObras.GetObras: IBizObra;
begin
  Result := FObras;
end;

procedure TfrViewObras.SetObras(const Value: IBizObra);
begin
  FObras := Value;
  if Assigned(FObras) then
    dsDataSource.DataTable := FObras.DataTable;
end;


end.
