Beispiel #1
0
        public CYCA_ClientBiometricViewModel GetBiometricViewModel(int PersonId)
        {
            CYCA_ClientBiometricViewModel returnModel = new CYCA_ClientBiometricViewModel();

            using (SDIIS_DatabaseEntities _context = new SDIIS_DatabaseEntities())
            {
                var ad = (from a in _context.CYCA_Admissions_AdmissionDetails
                          where a.Client_Id.Equals(PersonId)
                          select a).ToList();

                var afis   = _context.int_DSD_Afis.Where(af => af.Person_Id.Equals(PersonId)).SingleOrDefault();
                var person = _context.Persons.Where(p => p.Person_Id.Equals(PersonId)).Single();
                if (afis != null)
                {
                    returnModel.HasBiometric   = true;
                    returnModel.IsPivaVerified = person.Is_Piva_Validated;
                    returnModel.IsVerified     = afis.Is_Verified;
                }
                else
                {
                    returnModel.HasBiometric   = false;
                    returnModel.IsPivaVerified = false;
                    returnModel.IsVerified     = false;
                }
            }
            return(returnModel);
        }
        public CYCA_ClientBiometricViewModel GetBiometricViewModel(int PersonId)
        {
            CYCA_ClientBiometricViewModel returnModel = new CYCA_ClientBiometricViewModel();

            using (SDIIS_DatabaseEntities _context = new SDIIS_DatabaseEntities())
            {
                var afis   = _context.int_DSD_Afis.Where(af => af.Person_Id.Equals(PersonId)).SingleOrDefault();
                var person = _context.Persons.Where(p => p.Person_Id.Equals(PersonId)).Single();
                if (afis != null)
                {
                    returnModel.HasBiometric     = true;
                    returnModel.IsPivaVerified   = person.Is_Piva_Validated;
                    returnModel.IsVerified       = afis.Is_Verified;
                    returnModel.UniqueIdentifier = afis.Uid.ToString();
                }
                else
                {
                    returnModel.HasBiometric     = false;
                    returnModel.IsPivaVerified   = false;
                    returnModel.IsVerified       = false;
                    returnModel.UniqueIdentifier = "00000000-0000-0000-0000-000000000000";
                }
            }
            return(returnModel);
        }