Пример #1
0
        /// <summary>
        /// 與系統內部進行比對 確認動作 (主要用於確認 新增/未調整科目 項目)
        /// </summary>
        /// <param name="xmlElement"></param>
        internal void SetActionByCompareToData(OldGraduationPlanInfo oldGPlanInfo)
        {
            bool ContainNewCourseMOECode = oldGPlanInfo.IsContainSubjectCode(this.新課程代碼);

            if (ContainNewCourseMOECode)  //此科目已經存 如果此科目已經存在
            {
                this.Action = EnumAction.未調整;
            }
        }
        /// <summary>
        /// 依據系統ID 取得課程規劃表
        /// </summary>
        /// <param name="systemID"></param>
        /// <returns></returns>
        public OldGraduationPlanInfo GetOldGPlanBySysID(string systemID)
        {
            OldGraduationPlanInfo result = null;

            if (this.DicOldGraduationPlanInfos.ContainsKey(systemID))
            {
                return(DicOldGraduationPlanInfos[systemID]);
            }
            return(result);
        }
 /// <summary>
 /// 將舊課程計畫資料加入Dic
 /// </summary>
 /// <param name="oldGraduationPlanInfo"></param>
 public void AddOldGraduationPlan(OldGraduationPlanInfo oldGraduationPlanInfo)
 {
     if (!this.DicOldGraduationPlanInfos.ContainsKey(oldGraduationPlanInfo.SysID))  // 如果不包含systemCode
     {
         oldGraduationPlanInfo.NewCourseInfos = this.ListCourseInfos.ConvertAll(courseInfo => courseInfo.Clone());
         oldGraduationPlanInfo.ManagerUpdateCourseInfo();
         this.DicOldGraduationPlanInfos.Add(oldGraduationPlanInfo.SysID, oldGraduationPlanInfo); //
     }
     else // 如果已經有相同Id 代表一張課程規劃表下 有兩組以上課程規劃表識別欄位 有異常
     {
     }
 }