unit uPluginTiposVenta;

interface

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

type
  IMCTiposVenta = interface(IInterface)
  ['{FCFD32A3-68B9-4A15-B458-EB8B27324D22}']
  end;

  TPluginTiposVenta = class(TModuleController, IMCTiposVenta)
    actTiposVenta: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    TiposVenta: TMenuItem;
    TiposVenta1: TMenuItem;
    N1: TMenuItem;
    procedure actTiposVentaExecute(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, SysUtils,
  uTiposVentaController, uBizTiposVenta, uTiposVentaViewRegister;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TPluginTiposVenta.actTiposVentaExecute(Sender: TObject);
var
  ATiposVentaController : ITiposVentaController;
  ATiposVenta : IBizTipoVenta;
begin
  ATiposVentaController := TTiposVentaController.Create;
  ATiposVenta := (ATiposVentaController.BuscarTodos as IBizTipoVenta);
  ATiposVentaController.VerTodos(ATiposVenta);
end;

constructor TPluginTiposVenta.Create(AOwner: TComponent);
begin
  inherited;
  uTiposVentaViewRegister.RegisterViews;
end;

destructor TPluginTiposVenta.Destroy;
begin
  uTiposVentaViewRegister.UnregisterViews;
  inherited;
end;

initialization
  RegisterModuleClass(TPluginTiposVenta);

finalization
  UnRegisterModuleClass(TPluginTiposVenta);

end.
