2011-11-14 17:40:41 +00:00
|
|
|
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
|
2023-02-10 17:16:11 +00:00
|
|
|
Forms, Dialogs, SysUtils, uFactuGES_App,
|
2011-11-14 17:40:41 +00:00
|
|
|
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;
|
2023-02-10 17:16:11 +00:00
|
|
|
|
|
|
|
|
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then
|
|
|
|
|
begin
|
|
|
|
|
actEjercicios.Enabled := True;
|
|
|
|
|
actEjercicios.Visible := True;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
actEjercicios.Enabled := False;
|
|
|
|
|
actEjercicios.Visible := False;
|
|
|
|
|
end;
|
|
|
|
|
|
2011-11-14 17:40:41 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TPluginEjercicios.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
uEjerciciosViewRegister.UnregisterViews;
|
|
|
|
|
inherited;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
initialization
|
|
|
|
|
RegisterModuleClass(TPluginEjercicios);
|
|
|
|
|
|
|
|
|
|
finalization
|
|
|
|
|
UnRegisterModuleClass(TPluginEjercicios);
|
|
|
|
|
|
|
|
|
|
end.
|