unit uPluginFormasPago;

interface

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

type
  IMCFormasPago = interface(IInterface)
    ['{255E8D6B-282A-48CC-9807-E49C7D31FD2D}']
  end;

  TPluginFormasPago = class(TModuleController, IMCFormasPago)
    actFormasPago: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    Ventas1: TMenuItem;
    FormasPago1: TMenuItem;
    procedure actFormasPagoExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils,
  uFormasPagoController, uBizFormasPago, uFormasPagoViewRegister;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginFormasPago.actFormasPagoExecute(Sender: TObject);
var
  AFormasPagoController : IFormasPagoController;
  AFormasPago : IBizFormaPago;
begin
  AFormasPagoController := TFormasPagoController.Create;
  AFormasPago := (AFormasPagoController.BuscarTodos as IBizFormaPago);
  AFormasPagoController.VerTodos(AFormasPago);
end;

constructor TPluginFormasPago.Create(AOwner: TComponent);
begin
  inherited;
  uFormasPagoViewRegister.RegisterViews;
end;

destructor TPluginFormasPago.Destroy;
begin
  uFormasPagoViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginFormasPago);

finalization
  UnRegisterModuleClass(TPluginFormasPago);

end.
