Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #17  
Antiguo 26-02-2019
Avatar de oscarac
[oscarac] oscarac is offline
Miembro Premium
 
Registrado: sep 2006
Ubicación: Lima - Perú
Posts: 2.015
Poder: 22
oscarac Va por buen camino
Código Delphi [-]
unit FrmMain_f;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Grids, Vcl.DBGrids, zkemkeeper_TLB, dateutils,
  Vcl.OleCtrls;

type
  TForm1 = class(TForm)
    edtIp: TEdit;
    edtPort: TEdit;
    btnDispositivoLoad: TButton;
    dbgrd1: TDBGrid;
    mmoLOG: TMemo;
    lbl1: TLabel;
    procedure btnDispositivoLoadClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
//    Procedure LeerHuella (sender: tobject; EnrollNumber, IsInValid, AttState,
//      VerifyMethod, Year, Month, Day, Hour, Minute, Second: integer);

    Procedure CapturaCodigo (sender: tobject; EnrollNumber : String; IsInvalid, AttState, VerifyMethod, year, Month, Day, hour, Minute, Second : Integer);
  private

    { Private declarations }
  public
      ZK1 : TCZKEM;
      Connected : Boolean;
      procedure OnConnect(Sender : TObject);
      procedure OnDisconnect(Sender : TObject);
      function CapturaRegistros : Boolean;
      procedure Log(aMsj : string);
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btnDispositivoLoadClick(Sender: TObject);
begin

  if not(ZK1.Connect_Net(EdtIP.Text, StrToInt(EdtPort.Text))) then
    begin
      lbl1.Caption := 'Error. No se pudo conectar';
      exit;
    end;
    if not ZK1.RegEvent(1, 65535) then  //65535
      lbl1.Caption := 'Error RegEvent';

    ZK1.PullMode := 1;

      Log('Conectado...');


end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ZK1 := TCZKEM.Create(nil);
  ZK1.OnConnected := OnConnect;
  ZK1.OnAttTransaction := CapturaCodigo;
//  aqui me sale error
[dcc32 Error] FrmMain_f.pas(68): E2010 Incompatible types: 'Integer' and 'string'
end;

procedure TForm1.OnConnect(Sender: TObject);
begin
  Connected := True;
end;

procedure TForm1.OnDisconnect(Sender: TObject);
begin
  Connected := False;
end;


Procedure TForm1.CapturaCodigo (sender: tobject; EnrollNumber : String; IsInvalid, AttState, VerifyMethod, year, Month, Day, hour, Minute, Second : Integer);
Var _Resultado : Integer;   //EnrollNumber, IsInvalid, AttState, VerifyMethod, year, Month, Day, hour, Minute, Second : Integer;
begin
      Log('Entro a Leer huella');
    _Resultado := ZK1.OnAttTransactionEx (sender, EnrollNumber, IsInvalid, AttState, VerifyMethod, year, Month, Day, hour, Minute, Second);
// aqui debo jalar el codigo que se almacena en la variable EnrollNumber
end;

procedure TForm1.Log(aMsj: string);
begin
  MmoLOG.Lines.Add(aMsj);
end;

end.
__________________
Dulce Regalo que Satanas manda para mi.....
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Interceptar DBEdit ecfisa OOP 3 01-07-2008 11:57:34
Interceptar post.... brandolin Varios 1 29-08-2007 15:23:47
Interceptar impresión Walcasar Impresión 0 19-10-2006 15:22:20
Interceptar DBNavigator dape Conexión con bases de datos 1 09-04-2005 18:36:16
interceptar error edfz Conexión con bases de datos 2 08-04-2004 01:12:28


La franja horaria es GMT +2. Ahora son las 10:39:36.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi