コード例 #1
0
        /**
         * <summary>
         * Creates a new income calculator based on the poverty line
         * configuration in the database
         * </summary>
         *
         * <param name="db">Database connection</param>
         */
        public IncomeCalculator(GoldenTicketDbContext db)
        {
            this.db = db;

            for (var i = 2; i <= 10; i++)
            {
                povertyLineByNumPeople.Add(i, db.PovertyConfigs.Find(i).MinimumIncome);
            }

            var globalConfig = db.GlobalConfigs.First();

            above10Multipler = globalConfig.IncomeMultiplier;
        }
コード例 #2
0
 public CrossSchoolReconciler(GoldenTicketDbContext db)
 {
     this.db = db;
     lottery = new SchoolLottery(db);
 }
コード例 #3
0
 /**
  * <summary>Creates a new lottery algorithm object</summary>
  * <param name="db">Database connection</param>
  */
 public SchoolLottery(GoldenTicketDbContext db)
 {
     this.db = db;
     this.incomeCalculator = new IncomeCalculator(db);
 }
コード例 #4
0
 /**
  * <summary>Create a new SharedViewHelper</summary>
  */
 public SharedViewHelper(GoldenTicketDbContext database)
 {
     this.database = database;
 }