Esempio n. 1
0
        /// <summary>
        /// 取得學生社團志願選填內容
        /// </summary>
        private List <StudentMergeClub> GetVolObj(GetVolunteer VoluntObj)
        {
            List <StudentMergeClub> list = new List <StudentMergeClub>();

            foreach (VolunteerRecord each in VoluntObj.VolList)
            {
                //是否包含此學生
                if (VoluntObj.StudentDic.ContainsKey(each.RefStudentID))
                {
                    StudentRecord    sr  = VoluntObj.StudentDic[each.RefStudentID];
                    StudentMergeClub obj = new StudentMergeClub(sr);

                    XmlElement Element = XmlHelper.LoadXml(each.Content);
                    foreach (XmlElement xml in Element.SelectNodes("Club"))
                    {
                        string clubID = xml.GetAttribute("Ref_Club_ID");
                        //是否包含此社團
                        if (VoluntObj.ClubDic.ContainsKey(clubID))
                        {
                            obj._CLUBList.Add(VoluntObj.ClubDic[clubID]);
                        }
                    }
                    list.Add(obj);
                }
            }
            return(list);
        }
Esempio n. 2
0
 void BGW_DoWork(object sender, DoWorkEventArgs e)
 {
     //取得學生本期的志願序內容
     VoluntObj = new GetVolunteer();
     //取得學生社團志願選填內容
     StudentVolList = GetVolObj(VoluntObj);
 }