unit uPluginComisiones;

interface

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

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

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils, cxControls,
  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 : IBizComision;

begin
  AComisionesController := TComisionesController.Create;
  AComisiones := (AComisionesController.BuscarTodos as IBizComision);
  AComisionesController.VerTodos(AComisiones);
end;

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

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


initialization
  RegisterModuleClass(TPluginComisiones);

finalization
  UnRegisterModuleClass(TPluginComisiones);

end.
