git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@474 0c75b7a4-871f-7646-8a2f-f78d34cc349f
89 lines
2.2 KiB
ObjectPascal
89 lines
2.2 KiB
ObjectPascal
unit uPluginInventario;
|
|
|
|
interface
|
|
|
|
uses
|
|
uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
|
|
ImgList, Controls, PngImageList;
|
|
|
|
type
|
|
IMCInventario = interface(IInterface)
|
|
['{704855B9-1196-44FF-884E-3EF052533CD4}']
|
|
end;
|
|
|
|
TPluginInventario = class(TModuleController, IMCInventario)
|
|
actInventarioAlmacenes: TAction;
|
|
ExtraImages: TPngImageList;
|
|
LargeImages: TPngImageList;
|
|
MainMenu: TMainMenu;
|
|
ModuleActionList: TActionList;
|
|
SmallImages: TPngImageList;
|
|
Logstica1: TMenuItem;
|
|
Inventario1: TMenuItem;
|
|
actInventarioObras: TAction;
|
|
Inventarioobras1: TMenuItem;
|
|
procedure actInventarioAlmacenesExecute(Sender: TObject);
|
|
procedure actInventarioObrasExecute(Sender: TObject);
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
destructor Destroy; override;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
uses
|
|
Forms, Dialogs, SysUtils,
|
|
uInventarioController, uBizInventario, uInventarioViewRegister;
|
|
|
|
function GetModule : TModuleController;
|
|
begin
|
|
Result := TPluginInventario.Create(NIL);
|
|
end;
|
|
|
|
exports
|
|
GetModule name GET_MODULE_FUNC;
|
|
|
|
procedure TPluginInventario.actInventarioAlmacenesExecute(Sender: TObject);
|
|
var
|
|
AInventarioController : IInventarioController;
|
|
AInventario : IBizInventario;
|
|
|
|
begin
|
|
AInventarioController := TInventarioController.Create;
|
|
AInventario := (AInventarioController.BuscarTodosAlmacenes as IBizInventario);
|
|
AInventarioController.VerTodos(AInventario, CTE_INV_ALMACEN);
|
|
end;
|
|
|
|
procedure TPluginInventario.actInventarioObrasExecute(Sender: TObject);
|
|
var
|
|
AInventarioController : IInventarioController;
|
|
AInventario : IBizInventario;
|
|
|
|
begin
|
|
AInventarioController := TInventarioController.Create;
|
|
AInventario := (AInventarioController.BuscarTodosObras as IBizInventario);
|
|
AInventarioController.VerTodos(AInventario, CTE_INV_OBRA);
|
|
end;
|
|
|
|
constructor TPluginInventario.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
uInventarioViewRegister.RegisterViews;
|
|
end;
|
|
|
|
destructor TPluginInventario.Destroy;
|
|
begin
|
|
uInventarioViewRegister.UnregisterViews;
|
|
inherited;
|
|
end;
|
|
|
|
initialization
|
|
RegisterModuleClass(TPluginInventario);
|
|
|
|
finalization
|
|
UnRegisterModuleClass(TPluginInventario);
|
|
|
|
end.
|