unit uViewCobrosMontaje;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewCobrosCliente, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxDataStorage, cxEdit, DB, cxDBData, cxTextEdit, cxCalendar,
  cxCurrencyEdit, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap,
  dxPrnDev, dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList,
  PngImageList, cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon,
  dxPScxGridLnk, uDADataTable, cxGridLevel, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
  cxGrid, TB2Item, TBX, TB2Dock, TB2Toolbar, ActnList,
  uCobrosMontajeController, Menus;

type
  IViewCobrosMontaje = interface(IViewCobrosCliente)
  ['{7A52D1BC-EBEA-4EF4-85E9-8ED356D6954D}']
    function GetController : ICobrosMontajeController;
    procedure SetController (const Value : ICobrosMontajeController);
    property Controller : ICobrosMontajeController read GetController write SetController;
  end;

  TfrViewCobrosMontaje = class(TfrViewCobrosCliente, IViewCobrosMontaje)
    EditorActionList: TActionList;
    actAnadir: TAction;
    actModificar: TAction;
    actEliminar: TAction;
    TBXToolbar1: TTBXToolbar;
    TBXItem1: TTBXItem;
    TBXItem2: TTBXItem;
    TBXItem3: TTBXItem;
    PngImageList1: TPngImageList;
    GridPopupMenu: TPopupMenu;
    Modificar1: TMenuItem;
    Duplicar1: TMenuItem;
    N1: TMenuItem;
    Eliminar1: TMenuItem;
    procedure cxGridViewDblClick(Sender: TObject);
  protected
    FController : ICobrosMontajeController;
    function GetController : ICobrosMontajeController;
    procedure SetController (const Value : ICobrosMontajeController);
  public
    property Controller : ICobrosMontajeController read GetController write SetController;
  end;

var
  frViewCobrosMontaje: TfrViewCobrosMontaje;

implementation

{$R *.dfm}

{ TfrViewCobrosMontaje }

procedure TfrViewCobrosMontaje.cxGridViewDblClick(Sender: TObject);
begin
  actModificar.Execute;
end;

function TfrViewCobrosMontaje.GetController: ICobrosMontajeController;
begin
  Result := FController;
end;

procedure TfrViewCobrosMontaje.SetController(const Value: ICobrosMontajeController);
begin
  FController := Value;
end;

end.
