예제 #1
0
        private void cb_Branch_SelectedIndexChanged(object sender, EventArgs e)
        {
            lst_Modules.Items.Clear();
            List <DomainModel.BusinessObject.GameCoding> gameCodingList = new List <GameCoding>();
            STEM stemDomain = new STEM();

            stemDomain.Id = cb_Track.SelectedValue.ToString()[0].ToString();
            AgeRange        ageRange = GetAgeRange(cb_ageGroup.SelectedItem.ToString());
            List <Branches> branches = gameCodingManager.LoadBranchesPerStem(stemDomain.Id);
            Branches        branch   = new Branches();

            foreach (Branches branchItem in branches)
            {
                if (branchItem.branchName == cb_Branch.SelectedItem.ToString())
                {
                    branch = branchItem;
                }
            }
            List <Student> students           = GetStudentsIngroup(tb_GroupMan.Text);
            List <int>     excludedModulesIds = GetTakenModulesIdAllStudent(students);

            gameCodingList = gameCodingManager.LoadGameModuleByAgeAndSTEMAndBranch(ageRange, stemDomain, branch);
            List <SelectValue> gameNamesList = GetGameName(gameCodingList, excludedModulesIds);

            foreach (SelectValue name in gameNamesList)
            {
                lst_Modules.Items.Add(name.Text);
            }
        }
예제 #2
0
        public void FillTechnology(List <int> excludedModulesIds)
        {
            List <DomainModel.BusinessObject.GameCoding> gameCodingList = new List <GameCoding>();
            STEM stemDomain = new STEM();

            stemDomain.Id = "T";
            if (cb_ageGroup.SelectedItem != null)
            {
                AgeRange ageRange = GetAgeRange(cb_ageGroup.SelectedItem.ToString());
                gameCodingList = gameCodingManager.LoadGameModuleByAgeAndSTEM(ageRange, stemDomain);
                List <SelectValue> gameNamesList = GetGameName(gameCodingList, excludedModulesIds);
                lst_Technology.DataSource    = gameNamesList;
                lst_Technology.DisplayMember = "Text";
            }
            lst_Technology.SelectedIndex = -1;
        }