unit uPluginCobrosCliente;

interface

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

type
  IMCCobrosCliente = interface(IInterface)
  ['{3ACF4850-0B69-449F-A11D-FA5B4B522BDB}']
  end;

  TPluginCobrosCliente = class(TModuleController, IMCCobrosCliente)
    actCobrosCliente: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    procedure actCobrosClienteExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils,
  uCobrosClienteController, uBizCobrosCliente, uCobrosClienteViewRegister;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginCobrosCliente.actCobrosClienteExecute(Sender: TObject);
var
  ACobrosClienteController : ICobrosClienteController;
  ACobrosCliente : IBizCobroCliente;

begin
  ACobrosClienteController := TCobrosClienteController.Create;
  ACobrosCliente := (ACobrosClienteController.BuscarTodos as IBizCobroCliente);
  ACobrosClienteController.VerTodos(ACobrosCliente);
end;

constructor TPluginCobrosCliente.Create(AOwner: TComponent);
begin
  inherited;
  uCobrosClienteViewRegister.RegisterViews;
end;

destructor TPluginCobrosCliente.Destroy;
begin
  uCobrosClienteViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginCobrosCliente);

finalization
  UnRegisterModuleClass(TPluginCobrosCliente);

end.
