unit uPluginInformes;

interface

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

type
  IMCInforme = interface(IInterface)
  ['{1F262A3A-DA06-44AC-B37E-602CE5EC17F3}']
  end;

  TPluginInformes = class(TModuleController, IMCInforme)
    actInformes: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    Informes: TMenuItem;
    Informes1: TMenuItem;
    N1: TMenuItem;
    procedure actInformesExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils, uBizInformes, uInformesViewRegister,
  uInformesController;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginInformes.actInformesExecute(Sender: TObject);
var
  AInformeController : IInformesController;
  AInforme : IBizInforme;
begin
  AInformeController := TInformesController.Create;
  AInforme := (AInformeController.BuscarTodos as IBizInforme);
  AInformeController.VerTodos(AInforme);
end;

constructor TPluginInformes.Create(AOwner: TComponent);
begin
  inherited;
  uInformesViewRegister.RegisterViews;
end;

destructor TPluginInformes.Destroy;
begin
  uInformesViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginInformes);

finalization
  UnRegisterModuleClass(TPluginInformes);

end.
