Exemplo n.º 1
0
        public void UpdateEmployeeMatches(int Empl_Id_No, FingersBiometrics fbInfo)
        {
            OracleConnection conn = new OracleConnection(ConStr);
            List <Employee>  list = new List <Employee>();

            for (int FingerNo = 0; FingerNo < FingersBiometrics.MaxFingers; FingerNo++)
            {
                for (int x = 0; x < FingersBiometrics.MaxSamples; x++)
                {
                    if (fbInfo.Samples[FingerNo, x] != null)
                    {
                        GetEmployeeMatches(list, fbInfo.Samples[FingerNo, x], FingerNo);
                    }
                }

                foreach (Employee info in list)
                {
                    OracleCommand command = new OracleCommand("EmployeeMatches_update", conn);
                    command.CommandType = CommandType.StoredProcedure;
                    var _params = command.Parameters;
                    conn.Open();
                    SetParameterValue(_params, "p_empl_id_no", Empl_Id_No, OracleDbType.Int32);
                    SetParameterValue(_params, "p_match_id_no", info.Empl_Id_No, OracleDbType.Int32);
                    SetParameterValue(_params, Util.GetFingerDesc(FingerNo), "Y", OracleDbType.Varchar2);
                    command.ExecuteNonQuery();
                    conn.Close();
                }
            }
        }
Exemplo n.º 2
0
        private void UploadFingerTemplates()
        {
            try
            {
                FingersBiometrics f    = this.FingerBiometrics;
                EmployeeTSI       info = new EmployeeTSI();
                info.Empl_Id_No = 1;
                info.TSI        = f.TSI;
                info.IMG        = this.LoadImgFile(this.ImageLocation + @"\" + this.FileName);
                info.RTF        = f.ByteTemplate.RTF;
                info.RIF        = f.ByteTemplate.RIF;
                info.RMF        = f.ByteTemplate.RMF;
                info.RRF        = f.ByteTemplate.RRF;
                info.RSF        = f.ByteTemplate.RSF;
                info.LTF        = f.ByteTemplate.LTF;
                info.LIF        = f.ByteTemplate.LIF;
                info.LMF        = f.ByteTemplate.LMF;
                info.LRF        = f.ByteTemplate.LRF;
                info.LSF        = f.ByteTemplate.LSF;
                dcEmployeeTSI dc         = new dcEmployeeTSI();
                int           EmployeeId = dc.Insert(info);
                dc.UpdateEmployeeMatches(EmployeeId, f);

                ClearFingerBiometrics();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally {
                MessageBox.Show("Data has been saved.");
            }
        }
Exemplo n.º 3
0
        private int CountRegisteredFingers(FingersBiometrics fb)
        {
            int _result = 0;

            foreach (DPFP.Template item in fb.Templates)
            {
                if (item != null)
                {
                    _result += 1;
                }
            }
            return(_result);
        }
Exemplo n.º 4
0
 private void InitFingerPrintSettings()
 {
     this.FingerBiometrics              = new FingersBiometrics();
     this.FingerBiometrics.DataChanged += new OnChangeHandler(OnFingerBiometricsChange);
 }