Exemplo n.º 1
0
 public RatingScope(StudentCollection students, ScopeType type, string name)
 {
     _targets    = new RatingTargetCollection();
     _students   = students;
     _scope_type = type;
     _name       = name;
 }
Exemplo n.º 2
0
 public StudentScoreRank(RankProgressForm rankForm, DoWorkEventArgs workArgs)
 {
     //排名相關參數,由主畫面選項決定。
     _parameters = rankForm.RatingParams;
     //BackgroundWorker 事件物件。
     _work_args = workArgs;
     //工作進度權重管理物件。
     _weights = new JobWeightTable();
     //畫面進度回報物件。
     _progress = new MainProgress(rankForm.ProgressUI, rankForm.MessageLabel);
     //要排名的學生集合。
     _students = new StudentCollection();
     //填入資料的 Adapter 集合。
     _adapters = new AdapterCollection();
     //是否不儲存,只試排看結果。
     _save_required = !rankForm.IsViewMode;
 }
Exemplo n.º 3
0
        public static List <List <string> > SplitGetPackage(StudentCollection students, int packageSize)
        {
            List <List <string> > packages = new List <List <string> >();
            List <string>         package  = null;
            int offset = 0;

            foreach (Student each in students.Values)
            {
                if ((offset % packageSize) == 0)
                {
                    package = new List <string>();
                    packages.Add(package);
                }

                package.Add(each.Identity);
                offset++;
            }

            return(packages);
        }
Exemplo n.º 4
0
        public static RatingScopeCollection CreateScopes(StudentCollection students, ScopeType scopeType)
        {
            Dictionary <string, StudentCollection> stuCollList = new Dictionary <string, StudentCollection>();

            foreach (Student eachStudent in students.Values)
            {
                string key = GetKey(eachStudent, scopeType);
                if (stuCollList.ContainsKey(key))
                {
                    stuCollList[key].AddStudent(eachStudent);
                }
                else
                {
                    StudentCollection stus = new StudentCollection();
                    stuCollList.Add(key, stus);
                    stus.AddStudent(eachStudent);
                }
            }

            RatingScopeCollection scopes = ConvertToScopes(stuCollList, scopeType);

            return(scopes);
        }
Exemplo n.º 5
0
 public YearSubjectScoreAdapter(StudentCollection students, RatingParameters parameters)
     : base(students, parameters)
 {
 }
Exemplo n.º 6
0
 public YearMoralAdapter(StudentCollection students, RatingParameters parameters)
     : base(students, parameters)
 {
 }
Exemplo n.º 7
0
 public SemsScoreAdapter(StudentCollection students, RatingParameters parameters)
     : base(students, parameters)
 {
 }
Exemplo n.º 8
0
 public StudentAdapter(StudentCollection emptyContainer, RatingParameters parameters)
     : base(emptyContainer, parameters)
 {
 }
Exemplo n.º 9
0
 public DataAdapter(StudentCollection students, RatingParameters parameters)
 {
     _students   = students;
     _parameters = parameters;
 }