Ejemplo n.º 1
0
        //private string ReadFile(string filePath)
        //{
        //byte[] buffer = new byte[384];

        //using (FileStream file = new FileStream(filePath, FileMode.Open))
        //{
        //    file.Read(buffer, 0, 384);
        //    file.Close();
        //}

        //return Protocolo.ConverteByteToString(buffer);
        //}

        private void EnviarBiometria(Rede rede, string PIS, string Nome, int Funcionario, string Arquivo)
        {
            //Rede rede = new Rede(objIDSysR30, IP, Porta, edLog);

            string strPIS            = PIS;
            string strUserName       = Nome;
            uint   uiKeyCode         = 0;
            string strBarCode        = "";
            byte   byFacilityCode    = 0;
            uint   uiProxCode        = 0;
            byte   byUserType        = 0;
            string strPassword       = "";
            ushort usSizeSample      = 404;
            byte   byQuantitySamples = 2;

            byte[] rgbyBiometrics = new byte[(usSizeSample * byQuantitySamples)];
            byte   byAccessType   = 0;

            using (FileStream file = new FileStream(Arquivo, FileMode.Open))
            {
                file.Read(rgbyBiometrics, 0, rgbyBiometrics.Length);
                file.Close();
            }

            rede.IdData_EnviarFuncionarioComBiometria(strPIS, strUserName, uiKeyCode, strBarCode, byFacilityCode, uiProxCode, byUserType, byAccessType, strPassword, usSizeSample, byQuantitySamples, rgbyBiometrics);
        }