unit uPluginControllerCalendarios;

interface

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

type
  IMCCuentas = interface(IInterface)
  ['{269979BB-DCF8-41FD-8F46-57022242FE86}']
  end;

  TModuleCalendarios = class(TModuleController, IMCCuentas)
    actMediciones: TAction;
    menu: TMenuItem;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    Calendario1: TMenuItem;
    SmallImages: TPngImageList;
    procedure actMedicionesExecute(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, uGUIBase, SysUtils, uDataModuleCalendarios,
  uBizCitas,

  uEditorCalendarioMediciones, uEditorCalendarioBase,
  uEditorCalendarioConFiltro;

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

exports
  GetModule name GET_MODULE_FUNC;

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

procedure TModuleCalendarios.actMedicionesExecute(Sender: TObject);
var
  aObj: IEditorCalendarioMediciones;
  ACitas : IBizCitas;
  AVendedores : IBizVendedores;
begin
  ACitas := dmCalendarios.GetMediciones;
  AVendedores := dmCalendarios.GetVendedores;
  aObj := TfEditorCalendarioMediciones.Create(Application);
  try
    with aObj do
    begin
      Citas := ACitas;
      Vendedores := AVendedores;
      ShowEmbedded;
    end;
  finally
    ACitas := NIL;
    AVendedores := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleCalendarios);

finalization
  UnRegisterModuleClass(TModuleCalendarios);

end.
