unit uViewPedidosMontaje;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewPedidosProveedor, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxDataStorage, cxEdit, DB, cxDBData, cxImageComboBox, 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,
  uPedidosMontajeController, Menus;

type
  IViewPedidosMontaje = interface(IViewPedidosProveedor)
  ['{9586D518-BEBC-4E2E-947C-16AF64D74A8E}']
    function GetController : IPedidosMontajeController;
    procedure SetController (const Value : IPedidosMontajeController);
    property Controller : IPedidosMontajeController read GetController write SetController;
  end;

  TfrViewPedidosMontaje = class(TfrViewPedidosProveedor, IViewPedidosMontaje)
    TBXToolbar1: TTBXToolbar;
    TBXItem1: TTBXItem;
    TBXItem2: TTBXItem;
    TBXItem3: TTBXItem;
    EditorActionList: TActionList;
    actAnadir: TAction;
    actModificar: TAction;
    actEliminar: TAction;
    cxGridViewIMPORTE_TOTAL: TcxGridDBColumn;
    GridPopupMenu: TPopupMenu;
    Modificar1: TMenuItem;
    Duplicar1: TMenuItem;
    Eliminar1: TMenuItem;
    N1: TMenuItem;
    procedure cxGridViewDblClick(Sender: TObject);
  protected
    FController : IPedidosMontajeController;
    function GetController : IPedidosMontajeController;
    procedure SetController (const Value : IPedidosMontajeController);
  public
    property Controller : IPedidosMontajeController read GetController write SetController;
  end;

implementation
{$R *.dfm}

{ TfrViewPedidosMontaje }

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

function TfrViewPedidosMontaje.GetController: IPedidosMontajeController;
begin
  Result := FController;
end;

procedure TfrViewPedidosMontaje.SetController(const Value: IPedidosMontajeController);
begin
  FController := Value;
end;

end.
