Ejemplo n.º 1
0
        /// <summary>
        /// 轉換優先關懷資料至AB表輔導資料
        /// </summary>
        /// <param name="StudentIDList"></param>
        /// <returns></returns>
        public static Dictionary<string, List<DAO.AB_RptCounselData>> ParseCareRecordToABRptData(List<string> StudentIDList)
        {
            Dictionary<string, List<DAO.AB_RptCounselData>> retVal = new Dictionary<string, List<DAO.AB_RptCounselData>>();
            if (StudentIDList.Count > 0)
            {
                DAO.UDTTransfer _UDTTransfer = new DAO.UDTTransfer();
                List<DAO.UDT_CounselCareRecordDef> _CounselCareRecordList = _UDTTransfer.GetCareRecordsByStudentIDList(StudentIDList);
                                
                foreach (string studId in StudentIDList)
                {
                    int sid = int.Parse(studId);
                    List<DAO.AB_RptCounselData> studData = new List<DAO.AB_RptCounselData>();
                    foreach (DAO.UDT_CounselCareRecordDef ccrd in (from data in _CounselCareRecordList where data.StudentID== sid orderby data.FileDate select data))
                    {
                        DAO.AB_RptCounselData data = new DAO.AB_RptCounselData();
                        if (ccrd.FileDate.HasValue)
                            data.DataDict.Add("立案日期", ccrd.FileDate.Value.ToShortDateString());
                        
                        data.StudentID = studId;
                        
                        data.DataDict.Add("個案類別", ccrd.CaseCategory);
                        data.DataDict.Add("記錄者帳號",ccrd.AuthorID);

                        data.OtherDataList = AB_Counset_AddString("代號", ccrd.CodeName, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("個案類別備註", ccrd.CaseCategoryRemark, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("個案來源", ccrd.CaseOrigin, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("個案來源備註", ccrd.CaseOriginRemark, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("優勢能力及財力", ccrd.Superiority, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("弱勢能力及財力", ccrd.Weakness, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("輔導人員輔導目標", ccrd.CounselGoal, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("校外協輔機構", ccrd.OtherInstitute, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("輔導人員輔導方式", ccrd.CounselType, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("協同輔導人員協助導師事項", ccrd.AssistedMatter, data.OtherDataList);

                        studData.Add(data);
                    }

                    retVal.Add(studId, studData);
                }
            }
            return retVal;        
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 轉換晤談資料至AB表輔導資料
        /// </summary>
        /// <param name="StudentIDList"></param>
        /// <returns></returns>
        public static Dictionary<string, List<DAO.AB_RptCounselData>> ParseInterViewDataToABRptData(List<string> StudentIDList)
        {
            Dictionary<string, List<DAO.AB_RptCounselData>> retVal = new Dictionary<string, List<DAO.AB_RptCounselData>>();
            if (StudentIDList.Count > 0)
            {
                DAO.UDTTransfer _UDTTransfer = new DAO.UDTTransfer();
                // 依學生ID取得晤談紀錄
                List<DAO.UDT_CounselStudentInterviewRecordDef> _CounselCareRecordList = _UDTTransfer.GetCounselStudentInterviewRecordByStudentIDList(StudentIDList);
                 // 取得教師ID與名稱對照
                Dictionary<int, string> TeacherNameDict = Utility.GetTeacherIDNameDict();

                Dictionary<string, string> item_AttendessDict = new Dictionary<string, string>();
                Dictionary<string, string> item_CounselTypeDict = new Dictionary<string, string>();
                Dictionary<string, string> item_CounselTypeKindDict = new Dictionary<string, string>();

                foreach (string studId in StudentIDList)
                {
                    int sid = int.Parse(studId);
                    List<DAO.AB_RptCounselData> studData = new List<DAO.AB_RptCounselData>();
                    foreach (DAO.UDT_CounselStudentInterviewRecordDef csir in (from data in _CounselCareRecordList where data.StudentID==sid orderby data.InterviewDate select data))
                    {
                        DAO.AB_RptCounselData data = new DAO.AB_RptCounselData();
                        // 取得 XML 解析後
                        item_AttendessDict = GetConvertCounselXMLVal_Attendees(csir.Attendees);
                        item_CounselTypeDict = GetConvertCounselXMLVal_CounselType(csir.CounselType);
                        item_CounselTypeKindDict = GetConvertCounselXMLVal_CounselTypeKind(csir.CounselTypeKind);

                        if(csir.InterviewDate.HasValue)
                            data.DataDict.Add("晤談日期",csir.InterviewDate.Value.ToShortDateString());

                        data.DataDict.Add("晤談對象", csir.IntervieweeType);
                        data.DataDict.Add("晤談事由", csir.Cause);
                        data.DataDict.Add("記錄者帳號", csir.AuthorID);

                        data.OtherDataList = AB_Counset_AddString("晤談編號", csir.InterviewNo, data.OtherDataList);
                        
                        if(TeacherNameDict.ContainsKey(csir.TeacherID))
                            data.OtherDataList = AB_Counset_AddString("晤談老師", TeacherNameDict[csir.TeacherID], data.OtherDataList);
                        
                        data.OtherDataList = AB_Counset_AddString("晤談方式", csir.InterviewType, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("晤談時間", csir.InterviewTime, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("晤談地點", csir.Place, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("內容要點", csir.ContentDigest, data.OtherDataList);

                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_AttendessDict));

                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_CounselTypeDict));

                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_CounselTypeKindDict));

                        studData.Add(data);
                    }
                    retVal.Add(studId, studData);
                }
            }
            return retVal;        
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 轉換個案會議資料至AB表輔導資料
        /// </summary>
        /// <param name="StudentIDList"></param>
        /// <returns></returns>
        public static Dictionary<string,List<DAO.AB_RptCounselData>> ParseCaseMeetingRecordToABRptData(List<string> StudentIDList)
        { 
            Dictionary<string,List<DAO.AB_RptCounselData>> retVal = new Dictionary<string,List<DAO.AB_RptCounselData>> ();
            if (StudentIDList.Count > 0)
            {
                DAO.UDTTransfer _UDTTransfer = new DAO.UDTTransfer();
                List<DAO.UDT_CounselCaseMeetingRecordDef> CounselCaseMeetingRecordList = _UDTTransfer.GetCaseMeetingRecordListByStudentIDList(StudentIDList);
                // 取得教師ID與名稱對照
                Dictionary<int, string> TeacherNameDict = Utility.GetTeacherIDNameDict();
                // 參與人員
                Dictionary<string, string> item_AttendessDict = new Dictionary<string, string>();
                // 輔導方式
                Dictionary<string, string> item_CounselTypeDict = new Dictionary<string, string>();
                // 輔導歸類
                Dictionary<string, string> item_CounselTypeKindDict = new Dictionary<string, string>();

                // 解析並排序
                foreach (string studId in StudentIDList)
                {
                    int sid=int.Parse(studId);
                    List<DAO.AB_RptCounselData> studData = new List<DAO.AB_RptCounselData> ();
                    foreach (DAO.UDT_CounselCaseMeetingRecordDef ccmrd in (from data in CounselCaseMeetingRecordList where data.StudentID == sid orderby data.MeetingDate select data ))
                    {
                        DAO.AB_RptCounselData data = new DAO.AB_RptCounselData ();
                        // 取得 XML 解析後
                        item_AttendessDict = GetConvertCounselXMLVal_Attendees(ccmrd.Attendees);
                        item_CounselTypeDict = GetConvertCounselXMLVal_CounselType(ccmrd.CounselType);
                        item_CounselTypeKindDict = GetConvertCounselXMLVal_CounselTypeKind(ccmrd.CounselTypeKind);

                        data.StudentID = studId;
                        
                        if(ccmrd.MeetingDate.HasValue)
                            data.DataDict.Add("會議日期", ccmrd.MeetingDate.Value.ToShortDateString());

                        data.DataDict.Add("會議事由", ccmrd.MeetingCause);
                        data.DataDict.Add("記錄者帳號", ccmrd.AuthorID);                      

                        // 記錄其它
                        data.OtherDataList = AB_Counset_AddString("個案編號", ccmrd.CaseNo, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("內容要點", ccmrd.ContentDigest, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("會議時間", ccmrd.MeetigTime, data.OtherDataList);
                        data.OtherDataList = AB_Counset_AddString("晤談地點", ccmrd.Place, data.OtherDataList);
                        if (TeacherNameDict.ContainsKey(ccmrd.CounselTeacherID))
                            data.OtherDataList=AB_Counset_AddString("晤談老師", TeacherNameDict[ccmrd.CounselTeacherID],data.OtherDataList);
                        
                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_AttendessDict));

                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_CounselTypeDict));

                        data.OtherDataList.AddRange(AB_Counsel_Item_Add(item_CounselTypeKindDict));
                        
                        studData.Add(data);                       
                    }
                    retVal.Add(studId,studData);
                }
            }
            return retVal;        
        }