示例#1
0
        public async Task <bool> GetAllNBTScoresAsync(IntakeYear period)
        {
            log4net.Config.XmlConfigurator.Configure();
            // BasicConfigurator.Configure();
            bool isloaded = false;

            AllScores = new ObservableCollection <CompositBDO>();
            using (var context = new NBT_ProductionEntities())
            {
                var scores = await context.Composits.Where(x => x.DOT > period.yearStart && x.DOT < period.yearEnd).Select(m => m).ToListAsync();

                if (scores != null)
                {
                    isloaded = true;
                    foreach (var score in scores)
                    {
                        var NBTScore = new CompositBDO();
                        CompositDALToCompositBDO(NBTScore, score);
                        AllScores.Add(NBTScore);
                    }
                }
            }
            log.Info("Composite is loaded");
            return(isloaded);
        }
示例#2
0
 static void IntakeYearDalToIntakeYearBDO(IntakeYear intakeDAL, IntakeYearsBDO intakeBDO)
 {
     intakeBDO.Year         = intakeDAL.Year;
     intakeBDO.yearID       = intakeDAL.yearID;
     intakeBDO.yearStart    = intakeDAL.yearStart;
     intakeBDO.yearEnd      = intakeDAL.yearEnd;
     intakeBDO.DateModified = intakeDAL.DateModified;
 }
示例#3
0
        public IntakeYear GetIntakeRecord(int year)
        {
            var myYear = new IntakeYear();

            using (var context = new NBT_ProductionEntities())
            {
                myYear = context.IntakeYears.Where(x => x.Year == year).Select(m => m).FirstOrDefault();
            }
            return(myYear);
        }
示例#4
0
 public Task <bool> GetAllNBTScoresAsync(IntakeYear period)
 {
     throw new NotImplementedException();
 }