This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Noviseda_FactuGES2/Source/Modulos/Fabricantes/Plugin/uPluginFabricantes.pas
2009-12-16 17:16:54 +00:00

74 lines
1.7 KiB
ObjectPascal

unit uPluginFabricantes;
interface
uses
uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
ImgList, Controls, PngImageList;
type
IMCFabricantes = interface(IInterface)
['{F7C8960F-5ECE-492B-8D6C-D068DAA66E6C}']
end;
TPluginFabricantes = class(TModuleController, IMCFabricantes)
actFabricantes: TAction;
ExtraImages: TPngImageList;
LargeImages: TPngImageList;
MainMenu: TMainMenu;
ModuleActionList: TActionList;
SmallImages: TPngImageList;
Ventas1: TMenuItem;
Fabricantes1: TMenuItem;
procedure actFabricantesExecute(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses
Forms, Dialogs, SysUtils,
uFabricantesController, uBizFabricantes, uFabricantesViewRegister;
function GetModule : TModuleController;
begin
Result := TPluginFabricantes.Create(NIL);
end;
exports
GetModule name GET_MODULE_FUNC;
procedure TPluginFabricantes.actFabricantesExecute(Sender: TObject);
var
AFabricantesController : IFabricantesController;
AFabricantes : IBizFabricante;
begin
AFabricantesController := TFabricantesController.Create;
AFabricantes := (AFabricantesController.BuscarTodos as IBizFabricante);
AFabricantesController.VerTodos(AFabricantes);
end;
constructor TPluginFabricantes.Create(AOwner: TComponent);
begin
inherited;
uFabricantesViewRegister.RegisterViews;
end;
destructor TPluginFabricantes.Destroy;
begin
uFabricantesViewRegister.UnregisterViews;
inherited;
end;
initialization
RegisterModuleClass(TPluginFabricantes);
finalization
UnRegisterModuleClass(TPluginFabricantes);
end.