AlonsoYSal_FactuGES2/Source/ApplicationBase/Ejercicios/Plugin/uPluginEjercicios.pas
2019-11-18 10:36:42 +00:00

75 lines
1.7 KiB
ObjectPascal

unit uPluginEjercicios;
interface
uses
uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
ImgList, Controls, PngImageList;
type
IMCEjercicios = interface(IInterface)
['{255E8D6B-282A-48CC-9807-E49C7D31FD2D}']
end;
TPluginEjercicios = class(TModuleController, IMCEjercicios)
actEjercicios: TAction;
ExtraImages: TPngImageList;
LargeImages: TPngImageList;
MainMenu: TMainMenu;
ModuleActionList: TActionList;
SmallImages: TPngImageList;
Ventas1: TMenuItem;
Ejercicios1: TMenuItem;
N1: TMenuItem;
procedure actEjerciciosExecute(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses
Forms, Dialogs, SysUtils,
uEjerciciosController, uBizEjercicios, uEjerciciosViewRegister;
function GetModule : TModuleController;
begin
Result := TPluginEjercicios.Create(NIL);
end;
exports
GetModule name GET_MODULE_FUNC;
procedure TPluginEjercicios.actEjerciciosExecute(Sender: TObject);
var
AEjerciciosController : IEjerciciosController;
AEjercicios : IBizEjercicio;
begin
AEjerciciosController := TEjerciciosController.Create;
AEjercicios := (AEjerciciosController.BuscarTodos as IBizEjercicio);
AEjerciciosController.VerTodos(AEjercicios);
end;
constructor TPluginEjercicios.Create(AOwner: TComponent);
begin
inherited;
uEjerciciosViewRegister.RegisterViews;
end;
destructor TPluginEjercicios.Destroy;
begin
uEjerciciosViewRegister.UnregisterViews;
inherited;
end;
initialization
RegisterModuleClass(TPluginEjercicios);
finalization
UnRegisterModuleClass(TPluginEjercicios);
end.