using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel; using WebLib; namespace Education { [DataObject] public class DAC_檢討報告改善措施選項 { public DAC_檢討報告改善措施選項() { } #region 改善作法 (所有類別共用) [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善作法ForDropDown() { NameValueList result = new NameValueList(); result.Add("(請選擇)", ""); result.Add("納入下次課程", "1"); result.Add("修訂教材", "2"); result.Add("修訂表單", "3"); result.Add("修訂SOP", "4"); result.Add("修訂訓練品質手冊", "5"); result.Add("其他", "9"); return result; } [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善作法ForList() { NameValueList result = new NameValueList(); result.Add("", ""); result.Add("納入下次課程", "1"); result.Add("修訂教材", "2"); result.Add("修訂表單", "3"); result.Add("修訂SOP", "4"); result.Add("修訂訓練品質手冊", "5"); result.Add("其他", "9"); return result; } public static string Get改善作法名稱(object id) { switch (DAC.GetString(id)) { case "1": return "納入下次課程"; case "2": return "修訂教材"; case "3": return "修訂表單"; case "4": return "修訂SOP"; case "5": return "修訂訓練品質手冊"; case "9": return "其他"; default: return ""; } } #endregion #region 改善內容_學員 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_學員ForCheckBox() { NameValueList result = new NameValueList(); result.Add("加強課前提醒", "1"); result.Add("增加案例分享", "2"); result.Add("增加實作練習", "3"); result.Add("提供課後學習資源", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_學員名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "加強課前提醒" }, { "2", "增加案例分享" }, { "3", "增加實作練習" }, { "4", "提供課後學習資源" }, { "9", "其他" } }); } #endregion #region 改善內容_講師 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_講師ForCheckBox() { NameValueList result = new NameValueList(); result.Add("調整授課節奏", "1"); result.Add("加強重點說明", "2"); result.Add("增加課堂互動", "3"); result.Add("課前確認授課需求", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_講師名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "調整授課節奏" }, { "2", "加強重點說明" }, { "3", "增加課堂互動" }, { "4", "課前確認授課需求" }, { "9", "其他" } }); } #endregion #region 改善內容_教材及教具 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_教材及教具ForCheckBox() { NameValueList result = new NameValueList(); result.Add("修正教材內容", "1"); result.Add("更新教材資料", "2"); result.Add("增加教具輔助", "3"); result.Add("提供電子教材", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_教材及教具名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "修正教材內容" }, { "2", "更新教材資料" }, { "3", "增加教具輔助" }, { "4", "提供電子教材" }, { "9", "其他" } }); } #endregion #region 改善內容_教學方法 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_教學方法ForCheckBox() { NameValueList result = new NameValueList(); result.Add("增加案例討論", "1"); result.Add("增加分組互動", "2"); result.Add("增加實作演練", "3"); result.Add("調整教學方式", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_教學方法名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "增加案例討論" }, { "2", "增加分組互動" }, { "3", "增加實作演練" }, { "4", "調整教學方式" }, { "9", "其他" } }); } #endregion #region 改善內容_場地及設備 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_場地及設備ForCheckBox() { NameValueList result = new NameValueList(); result.Add("調整教室配置", "1"); result.Add("增加設備數量", "2"); result.Add("提前測試設備", "3"); result.Add("改善上課環境", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_場地及設備名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "調整教室配置" }, { "2", "增加設備數量" }, { "3", "提前測試設備" }, { "4", "改善上課環境" }, { "9", "其他" } }); } #endregion #region 改善內容_行政流程 [DataObjectMethod(DataObjectMethodType.Select)] public NameValueList Select改善內容_行政流程ForCheckBox() { NameValueList result = new NameValueList(); result.Add("提前通知資訊", "1"); result.Add("調整報到流程", "2"); result.Add("強化行政協助", "3"); result.Add("加強課後追蹤", "4"); result.Add("其他", "9"); return result; } public static string Get改善內容_行政流程名稱(object id) { return Get改善內容名稱(id, new Dictionary { { "1", "提前通知資訊" }, { "2", "調整報到流程" }, { "3", "強化行政協助" }, { "4", "加強課後追蹤" }, { "9", "其他" } }); } #endregion #region 輔助方法 private static string Get改善內容名稱(object id, Dictionary map) { string s = DAC.GetString(id); if (string.IsNullOrEmpty(s)) return ""; string[] values = s.Split(','); List labels = new List(); foreach (string v in values) { string trimmed = v.Trim(); if (map.ContainsKey(trimmed)) labels.Add(map[trimmed]); } return string.Join(", ", labels.ToArray()); } #endregion } }