unit uPluginInfMargenArticulo;

interface

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

type
  IMCInfMargenArticulo = interface(IInterface)
  ['{6AB7F54B-AEAD-4317-907C-B54758666AB8}']
  end;

  TPluginInfMargenArticulo = class(TModuleController, IMCInfMargenArticulo)
    actMargenArticulo: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    HistoricoMovimientos1: TMenuItem;
    N1: TMenuItem;
    procedure actMargenArticuloExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils,
  uInfMargenArticuloController, uBizInfMargenArticulo,
  uInfMargenArticuloViewRegister, uInfMargenArticuloInformeRegister;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginInfMargenArticulo.actMargenArticuloExecute(Sender: TObject);
var
  AInfMargenArticuloController : IInfMargenArticuloController;
  AInfMargenArticulo : IBizInfMargenArticulo;

begin
//showmessage('Hola');
//  AInfMargenArticuloController := TInfMargenArticuloController.Create;
//  AInfMargenArticulo := (AInfMargenArticuloController.BuscarTodos as IBizInfMargenArticulo);
//  AInfMargenArticuloController.Ver; //(AInfMargenArticulo);
end;

constructor TPluginInfMargenArticulo.Create(AOwner: TComponent);
begin
  inherited;
  uInfMargenArticuloInformeRegister.RegisterInformes;
  uInfMargenArticuloViewRegister.RegisterViews;
end;

destructor TPluginInfMargenArticulo.Destroy;
begin
  uInfMargenArticuloInformeRegister.UnRegisterInformes;
  uInfMargenArticuloViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginInfMargenArticulo);

finalization
  UnRegisterModuleClass(TPluginInfMargenArticulo);

end.
