unit uPluginComisiones;

interface

uses
  uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
  ImgList, Controls, PngImageList;

type
  IMCComisiones = interface(IInterface)
  ['{B6E222C6-F526-40D7-A80D-63117B0586E7}']
  end;

  TPluginComisiones = class(TModuleController, IMCComisiones)
    actComisiones: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    Ventas1: TMenuItem;
    Comisiones1: TMenuItem;
    N1: TMenuItem;
    procedure actComisionesExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils,
  uComisionesController, uBizComisiones, uComisionesViewRegister;

function GetModule : TModuleController;
begin
  Result := TPluginComisiones.Create(NIL);
end;

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginComisiones.actComisionesExecute(Sender: TObject);
var
  AComisionesController : IComisionesController;
  AComisiones : IBizComisiones;
begin
  AComisionesController := TComisionesController.Create;
  AComisiones := (AComisionesController.BuscarTodos as IBizComisiones);
  AComisionesController.VerTodos(AComisiones);
end;

constructor TPluginComisiones.Create(AOwner: TComponent);
begin
  inherited;
  uComisionesViewRegister.RegisterViews;
end;

destructor TPluginComisiones.Destroy;
begin
  uComisionesViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginComisiones);

finalization
  UnRegisterModuleClass(TPluginComisiones);

end.
