コード例 #1
0
        void VerificationControl_OnComplete(object control, FeatureSet featureSet, ref DPFP.Gui.EventHandlerStatus eventHandlerStatus)
        {
            // Verify Here
            var ver             = new DPFP.Verification.Verification();
            var res             = new DPFP.Verification.Verification.Result();
            var fingerTemplates = new BeneficiaryRepository().GetFingerTemplates();

            // Compare feature set with all stored templates.


            foreach (var template in fingerTemplates)
            {
                // Get template from storage.
                if (template != null)
                {
                    // Compare feature set with particular template.
                    ver.Verify(featureSet, template, ref res);
                    //_data.IsFeatureSetMatched = res.Verified;
                    //_data.FalseAcceptRate = res.FARAchieved;
                    if (res.Verified)
                    {
                        break; // success
                    }
                }
            }

            if (!res.Verified)
            {
                eventHandlerStatus = DPFP.Gui.EventHandlerStatus.Failure;
            }

            //_data.Update();
        }
コード例 #2
0
        public IEnumerable <P.PaymentSummary> GetSummary()
        {
            var beneficiaries = BeneficiaryRepository.GetAll();
            var summaries     = new List <P.PaymentSummary>();

            foreach (var beneficiary in beneficiaries)
            {
                summaries.Add(new P.PaymentSummary(beneficiary.Name, _paymentRepository.GetByBeneficiary(beneficiary.Name), "PHP"));
            }
            return(summaries);
        }
コード例 #3
0
 public UnitOfWork(RaisinsDB raisinsDb)
 {
     _raisinsDb    = raisinsDb;
     Beneficiaries = new BeneficiaryRepository(_raisinsDb);
     Accounts      = new AccountRepository(_raisinsDb);
     Activities    = new ActivityRepository(_raisinsDb);
     Currencies    = new CurrencyRepository(_raisinsDb);
     Payments      = new PaymentRepository(_raisinsDb);
     MailQueues    = new MailQueuesRepository(_raisinsDb);
     Executives    = new ExecutiveRepository(_raisinsDb);
     Roles         = new RoleRepository(_raisinsDb);
 }
コード例 #4
0
 public D.Beneficiary GetBeneficiary(string name)
 {
     return(BeneficiaryRepository.GetBeneficiary(name));
 }
コード例 #5
0
 public DashboardController(BWDbContext context)
 {
     db = context;
     beneficiaryRepositor = new BeneficiaryRepository(db);
 }
コード例 #6
0
 public DM.Beneficiaries GetAll()
 {
     return(BeneficiaryRepository.GetAll());
 }
コード例 #7
0
 public DM.Beneficiary Get(int beneficiaryID)
 {
     return(BeneficiaryRepository.Get(beneficiaryID));
 }
コード例 #8
0
 public void Edit(DM.Beneficiary beneficiary)
 {
     BeneficiaryRepository.Edit(beneficiary);
 }
コード例 #9
0
        public void Add(DM.Beneficiary beneficiary)
        {
            BeneficiaryRepository.Add(beneficiary);

            AccountRepository.AddBeneficiary(AccountRepository.Get("Super"), Convert(beneficiary));
        }
コード例 #10
0
 public BeneficiaryService()
 {
     _beneficiaryRepository = new BeneficiaryRepository();
 }
コード例 #11
0
        private void Intialiazer()
        {
            try
            {
                var beneficiaryBiometrics = new BeneficiaryRepository().GetBeneficiarys();
                if (!beneficiaryBiometrics.Any())
                {
                }


                //var beneficiary = new BeneficiaryRepository().GetBeneficiary(1);
                //if (beneficiary == null || beneficiary.BeneficiaryId < 1)
                //{

                //}


                var pathString = ConfigurationManager.AppSettings["BioResource"];
                var appDir     = InternetCon.GetBasePath();
                var root       = Path.GetPathRoot(pathString);
                var imagePath  = Path.GetFullPath(appDir + pathString);


                #region Verification
                #endregion



                var bioMetricInfo = new BeneficiaryRepository().GetBeneficiaryBiometric(1);

                var companyInfo = new CorporateInfoService().GetCompanyInfos();
                if (companyInfo.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }

                var userList = new UserService().GetUsers();
                if (userList.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }


                var station = new StationInfoService().GetStationInfos();
                if (station.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }

                //var dir = InternetCon.GetBasePath() + ConfigurationManager.AppSettings["BiometricResource"];


                var userProfiles = new UserProfileRepository().GetUserProfiles();
                if (userProfiles.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }

                var localAreas = new LocalAreaRepository().GetLocalAreas();
                if (localAreas.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }



                _apiHelper = new WebAPIHelper(_api);
                List <RegisteredUserReportObj> users = null;
                string reply = null;


                #region POST Request - Add User Details

                var roleList = new List <NameAndValueObject>
                {
                    new NameAndValueObject {
                        Id = 1, Name = "My Admin"
                    }
                };

                var resp = new UserRegResponse();

                var selRoles = new[] { "1" }.ToList();
                var roleIds = new[] { 1 };

                var helper = new UserRegistrationObj
                {
                    ConfirmPassword    = "******",
                    Email              = "*****@*****.**",
                    Othernames         = "Adesoji",
                    Surname            = "Ilesanmi",
                    MobileNumber       = "08036975694",
                    MyRoleIds          = roleIds,
                    MyRoles            = selRoles.ToArray(),
                    Username           = "******",
                    Password           = "******",
                    SelectedRoles      = string.Join(";", selRoles),
                    Sex                = 1,
                    RegisteredByUserId = 1,
                };

                if (_apiHelper.AddStationUser(helper, ref reply, ref resp))
                {
                    if (resp == null || resp.UserId < 1)
                    {
                        return;
                    }
                }

                #endregion


                //var userList = Controller.DownLoadStationUsers();



                if (_apiHelper.GetStationUsers(ref reply, ref users))
                {
                    if (users == null || !users.Any())
                    {
                        return;
                    }
                    var total = users.Count();
                }

                //var context = new BioEnumeratorEntities();
                //InternetCon.ProcessLookUpFromFiles(context);

                string msg;

                var delState = new StateRepository().DeleteState(37);
                if (delState.IsSuccessful)
                {
                    MessageBox.Show(@"State Deleted Successfully", @"Record Deletion");
                }

                //var intit = eDataAdminLite.API.MigrationAssistance.Migrate(out msg);
                //if (intit)
                //{
                //    MessageBox.Show(@"Database Initializer", @"Configuration");
                //}

                //var st = new StateRepository().GetState(37);
                //if (st != null && st.StateId > 0)
                //{
                //    st.Name = "Epay Plus Limited";
                //}

                //var updateState = new StateRepository().UpdateState(st);
                //if (updateState.IsSuccessful)
                //{
                //    MessageBox.Show(@"Database Initializer", @"State Update successfully");
                //}


                //var state = new State
                //{
                //    Name = "Epay Plus",
                //};
                //var retVal = new StateRepository().AddState(state);
                //if (retVal.IsSuccessful)
                //{
                //    MessageBox.Show(@"Database Initializer", @"Configuration");
                //}

                var states = new StateRepository().GetStates();
                if (states.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }

                var roles = new RoleRepository().GetRoles();
                if (roles.Any())
                {
                    MessageBox.Show(@"Database Initializer", @"Configuration");
                }



                //var retVal = eDataAdminLite.API.UserManager.AddRole(role);
                //if (retVal.IsSuccessful)
                //{
                //    MessageBox.Show(@"Database Initializer", @"Configuration");
                //}

                //var roles = eDataAdminLite.API.UserManager.GetRoles();
                //if (!roles.Any())
                //{
                //    MessageBox.Show(@"Database Initializer", @"Configuration");
                //}
            }
            catch (Exception)
            {
                throw;
            }
        }