unit uPluginControllerReferenciaGenerica;

interface

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

type
  IMCReferenciaGenerica = interface(IInterface)
  ['{11391827-E14C-449B-AA0A-56193B945226}']
  end;

  TModuleReferenciaGenerica = class(TModuleController, IMCReferenciaGenerica)
    menu: TMenuItem;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    actRefGenericas: TAction;
    Controldeventasenproceso1: TMenuItem;
    procedure actRefGenericasExecute(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, uGUIBase, SysUtils, uEditorListaReferenciaGenerica,
  uBizReferenciaGenerica, uDataModuleReferenciaGenerica;

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

exports
  GetModule name GET_MODULE_FUNC;

{
******************************* TModuleContactos *******************************
}

procedure TModuleReferenciaGenerica.actRefGenericasExecute(Sender: TObject);
var
  aControl: IBizReferenciaGenerica;
  aObj: IEditorListaReferenciaGenerica;
begin
  aControl := dmReferenciaGenerica.GetItems;
  aObj := TfEditorListaReferenciaGenerica.Create(Application);
  try
    with aObj do
    begin
      Items := aControl;
      ShowEmbedded;
    end;
  finally
    aControl := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleReferenciaGenerica);

finalization
  UnRegisterModuleClass(TModuleReferenciaGenerica);

end.
