public void AddAssignScoreCalcRuleButtons() { Class.Instance.SelectedListChanged += delegate { classButton.Enable = (Class.Instance.SelectedList.Count > 0 && User.Acl["JHSchool.Class.Ribbon0056"].Executable); }; Student.Instance.SelectedListChanged += delegate { studentButton.Enable = (Student.Instance.SelectedList.Count > 0 && User.Acl["JHSchool.Student.Ribbon0056"].Executable); }; classButton = Class.Instance.RibbonBarItems["指定"]["計算規則"]; //classButton.Image = JHSchool.Evaluation.ClassExtendControls.Ribbon.Resources.btnProgramPlan_Image; classButton.Image = Properties.Resources.course_plan; classButton.Tag = "Class"; classButton.Enable = false; classButton.PopupOpen += new EventHandler <PopupOpenEventArgs>(Button_PopupOpen); classNoAssignButton = classButton["不指定"]; classNoAssignButton.Tag = ""; classNoAssignButton.Click += new EventHandler(ChangeScoreCalcRuleID); studentButton = Student.Instance.RibbonBarItems["指定"]["計算規則"]; //studentButton.Image = JHSchool.Evaluation.ClassExtendControls.Ribbon.Resources.btnProgramPlan_Image; studentButton.Image = Properties.Resources.course_plan; studentButton.Tag = "Student"; studentButton.Enable = false; studentButton.PopupOpen += new EventHandler <PopupOpenEventArgs>(Button_PopupOpen); studentNoAssignButton = studentButton["不指定"]; studentNoAssignButton.Tag = ""; studentNoAssignButton.Click += new EventHandler(ChangeScoreCalcRuleID); }
internal static void Init() { #region 教務作業/成績作業 RibbonBarButton rbItem = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["基本設定"]["設定"]; //rbItem["評分樣版管理"].Image = KaoHsiung.JHEvaluation.Properties.Resources.notepad_level_64; //rbItem["評分樣版管理"].Size = RibbonBarButton.MenuButtonSize.Large; rbItem["評分樣版設定"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0010"].Executable; rbItem["評分樣版設定"].Click += delegate { new KaoHsiung.JHEvaluation.EduAdminExtendControls.Ribbon.AssessmentSetupManager().ShowDialog(); }; //移到其他模組。 //rbItem["計算成績"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0045"].Executable; //rbItem["計算成績"].Image = KaoHsiung.JHEvaluation.Properties.Resources.calcScore; //rbItem["計算成績"].Click += delegate //{ // System.Windows.Forms.Form form = new KaoHsiung.JHEvaluation.StudentExtendControls.Ribbon.CalculationWizardStudent("EduAdmin"); // form.ShowDialog(); //}; RibbonBarButton rbItem1 = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["成績作業"]; //rbItem1["評量輸入狀況"].Image = Properties.Resources.成績輸入檢查; rbItem1["評量輸入狀況檢視"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0020"].Executable; rbItem1["評量輸入狀況檢視"].Click += delegate { new KaoHsiung.JHEvaluation.EduAdminExtendControls.Ribbon.CourseScoreStatusForm().ShowDialog(); }; #endregion }
// 啟用國中 private static void StartJHSchool() { // 註冊與載入自訂資料欄位 // 註冊權限 Catalog StudUserDefineDataFuncButtonRoleAcl = RoleAclSource.Instance["學生"]["功能按鈕"]; StudUserDefineDataFuncButtonRoleAcl.Add(new RibbonFeature(strSetUserDefineDataAcl, "設定自訂資料欄位樣版")); StudUserDefineDataFuncButtonRoleAcl.Add(new RibbonFeature(strUserDefineDataExportAcl, "匯出自訂資料欄位")); StudUserDefineDataFuncButtonRoleAcl.Add(new RibbonFeature(strUserDefineDataImportAcl, "匯入自訂資料欄位")); // 設定自訂資料欄位樣版 K12.Presentation.NLDPanels.Student.AddDetailBulider(new FISCA.Presentation.DetailBulider <UserDefineDataItem>()); Catalog detail = RoleAclSource.Instance["學生"]["資料項目"]; detail.Add(new DetailItemFeature(typeof(UserDefineDataItem))); RibbonBarButton rbSetUserDefineData = K12.Presentation.NLDPanels.Student.RibbonBarItems["其它"]["自訂資料欄位管理"]; rbSetUserDefineData.Image = Properties.Resources.windows_save_64; rbSetUserDefineData.Enable = UserAcl.Current[strSetUserDefineDataAcl].Executable; rbSetUserDefineData.Click += delegate { SetUserDefineDataForm sudd = new SetUserDefineDataForm(); sudd.ShowDialog(); }; // 匯出匯入自訂資料欄位 MenuButton rbUserDefDataExport = K12.Presentation.NLDPanels.Student.RibbonBarItems["資料統計"]["匯出"]["其它相關匯出"]; MenuButton rbUserDefDataImport = K12.Presentation.NLDPanels.Student.RibbonBarItems["資料統計"]["匯入"]["其它相關匯入"]; // 匯出自訂資料欄位 rbUserDefDataExport["匯出自訂資料欄位"].Enable = UserAcl.Current[strUserDefineDataExportAcl].Executable; rbUserDefDataExport["匯出自訂資料欄位"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ImportExport.ExportUserDefData(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入自訂資料欄位 rbUserDefDataImport["匯入自訂資料欄位"].Enable = UserAcl.Current[strUserDefineDataImportAcl].Executable; rbUserDefDataImport["匯入自訂資料欄位"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new ImportExport.ImportUserDefData(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; }
public static void Main() { // 異動 K12.Presentation.NLDPanels.Student.AddDetailBulider(new FISCA.Presentation.DetailBulider <UpdateRecordItem>()); // 匯出新生異動 RibbonBarButton rbEnrollmentListExport = MotherForm.RibbonBarItems["學生", "資料統計"]["匯出"]; rbEnrollmentListExport["異動相關匯出"]["匯出新生異動(舊進校)"].Enable = FISCA.Permission.UserAcl.Current["Button0200"].Executable; rbEnrollmentListExport["異動相關匯出"]["匯出新生異動(舊進校)"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new Export.ExportEnrollmentListOld(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯出轉入異動 RibbonBarButton rbTransferListExport = MotherForm.RibbonBarItems["學生", "資料統計"]["匯出"]; rbTransferListExport["異動相關匯出"]["匯出轉入異動(舊進校)"].Enable = FISCA.Permission.UserAcl.Current["Button0200"].Executable; rbTransferListExport["異動相關匯出"]["匯出轉入異動(舊進校)"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new Export.ExportTransferListOld(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯出學籍異動 RibbonBarButton rbStudUpdateRecordExport = MotherForm.RibbonBarItems["學生", "資料統計"]["匯出"]; rbStudUpdateRecordExport["異動相關匯出"]["匯出學籍異動(舊進校)"].Enable = FISCA.Permission.UserAcl.Current["Button0200"].Executable; rbStudUpdateRecordExport["異動相關匯出"]["匯出學籍異動(舊進校)"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new Export.ExportStudUpdateRecordListOld(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯出畢業異動 RibbonBarButton rbGraduateExport = MotherForm.RibbonBarItems["學生", "資料統計"]["匯出"]; rbGraduateExport["異動相關匯出"]["匯出畢業異動(舊進校)"].Enable = FISCA.Permission.UserAcl.Current["Button0200"].Executable; rbGraduateExport["異動相關匯出"]["匯出畢業異動(舊進校)"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new Export.ExportGraduateListOld(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; }
public static RibbonBarButton CreateTransferOrderButton(RibbonBarGroup group) { var button = new RibbonBarButton { Text = Translate.Translate("Transfer to ERP"), Image = Dynamicweb.Controls.Icons.Icon.Type.Export, Size = Dynamicweb.Controls.Icons.Icon.Size.Large }; group.AddItem(button); return(button); }
public static RibbonBarButton CreateUserSyncButton(RibbonBarGroup group) { var button = new RibbonBarButton { Text = Translate.Translate("Sync Shipping Location"), Image = Dynamicweb.Controls.Icons.Icon.Type.Export, Size = Dynamicweb.Controls.Icons.Icon.Size.Large }; group.AddItem(button); return(button); }
public static RibbonBarButton CreateExportToXmlButton(RibbonBarGroup group, string buttonText) { var button = new RibbonBarButton { Text = Translate.Translate(buttonText), Image = Dynamicweb.Controls.Icons.Icon.Type.DocumentNotebook, Size = Dynamicweb.Controls.Icons.Icon.Size.Large }; group.AddItem(button); return(button); }
static public void Main() { // 2017/4/28 穎驊更新,因應高雄小組會議 [02-05][01] 非明細獎懲紀錄問題 項目, 局端決議 將各校 匯入獎勵懲戒統計 拿掉,避免使用者誤使用 // 在此將其改為不可以見。(已在JHSchool.Behavior 專案修改) // 另外由於局端要求,希望在test.kh.edu.tw 能暫時保留此選項,供它們 2017/9 教育訓練說明用,在此另外做了一個專門掛給test.kh.edu.tw的模組, // 會將此功能開啟讓使用者可以使用, // 日後有任何test.kh.edu.tw 想要與外部高雄國中有不同模組開放差異,皆在此專案管理。 //匯入 RibbonBarButton rbItemImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; rbItemImport["學務相關匯入"]["匯入獎勵懲戒統計"].Visible = true; }
public static void Main() { RibbonBarItem rbItem = FISCA.Presentation.MotherForm.RibbonBarItems["課程", "讀卡"]; RibbonBarButton importButton = rbItem["匯入讀卡成績"]; importButton.Size = RibbonBarButton.MenuButtonSize.Large; importButton.Enable = User.Acl["KaoHsiung.JHEvaluation.Course.ReaderScoreImport01"].Executable; importButton.Image = Properties.Resources.proyector_save_64; importButton.Click += delegate { ImportStartupForm form = new ImportStartupForm(); form.ShowDialog(); }; RibbonBarButton classButton = rbItem["班級代碼設定"]; classButton.Size = RibbonBarButton.MenuButtonSize.Small; classButton.Enable = User.Acl["KaoHsiung.JHEvaluation.Course.ReaderScoreImport02"].Executable;; classButton.Click += delegate { new ClassCodeConfig().ShowDialog(); }; RibbonBarButton examButton = rbItem["試別代碼設定"]; examButton.Size = RibbonBarButton.MenuButtonSize.Small; examButton.Enable = User.Acl["KaoHsiung.JHEvaluation.Course.ReaderScoreImport03"].Executable;; examButton.Click += delegate { new ExamCodeConfig().ShowDialog(); }; RibbonBarButton subjectButton = rbItem["科目代碼設定"]; subjectButton.Size = RibbonBarButton.MenuButtonSize.Small; subjectButton.Enable = User.Acl["KaoHsiung.JHEvaluation.Course.ReaderScoreImport04"].Executable;; subjectButton.Click += delegate { new SubjectCodeConfig().ShowDialog(); }; Catalog detail = RoleAclSource.Instance["課程"]["功能按鈕"]; detail.Add(new ReportFeature("KaoHsiung.JHEvaluation.Course.ReaderScoreImport01", "匯入讀卡成績")); detail.Add(new ReportFeature("KaoHsiung.JHEvaluation.Course.ReaderScoreImport02", "班級代碼設定")); detail.Add(new ReportFeature("KaoHsiung.JHEvaluation.Course.ReaderScoreImport03", "試別代碼設定")); detail.Add(new ReportFeature("KaoHsiung.JHEvaluation.Course.ReaderScoreImport04", "科目代碼設定")); }
public static void Main() { Catalog ribbon = RoleAclSource.Instance["教務作業"]["功能按鈕"]; ribbon.Add(new RibbonFeature("ESL評分樣版設定", "ESL評分樣版設定")); RibbonBarButton rbItem = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["基本設定"]["設定"]; rbItem["ESL評分樣版設定"].Enable = Framework.User.Acl["ESL評分樣版設定"].Executable; rbItem["ESL評分樣版設定"].Click += delegate { new HsinChu.JHEvaluation.CourseExtendControls.Ribbon.AssessmentSetupManager().ShowDialog(); }; }
public static void Main() { RibbonBarItem rbItem = FISCA.Presentation.MotherForm.RibbonBarItems["課程", "讀卡"]; RibbonBarButton importButton = rbItem["匯入讀卡成績"]; importButton.Size = RibbonBarButton.MenuButtonSize.Large; importButton.Enable = Permissions.匯入讀卡成績權限; importButton.Image = Properties.Resources.byte_add_64; importButton.Click += delegate { ImportStartupForm form = new ImportStartupForm(); form.ShowDialog(); }; RibbonBarButton classButton = rbItem["班級代碼設定"]; classButton.Size = RibbonBarButton.MenuButtonSize.Small; classButton.Enable = Permissions.班級代碼設定權限; classButton.Click += delegate { new ClassCodeConfig().ShowDialog(); }; RibbonBarButton examButton = rbItem["試別代碼設定"]; examButton.Size = RibbonBarButton.MenuButtonSize.Small; examButton.Enable = Permissions.試別代碼設定權限; examButton.Click += delegate { new ExamCodeConfig().ShowDialog(); }; RibbonBarButton subjectButton = rbItem["科目代碼設定"]; subjectButton.Size = RibbonBarButton.MenuButtonSize.Small; subjectButton.Enable = Permissions.科目代碼設定權限; subjectButton.Click += delegate { new SubjectCodeConfig().ShowDialog(); }; Catalog detail = RoleAclSource.Instance["課程"]["功能按鈕"]; detail.Add(new ReportFeature(Permissions.匯入讀卡成績, "匯入讀卡成績")); detail.Add(new ReportFeature(Permissions.班級代碼設定, "班級代碼設定")); detail.Add(new ReportFeature(Permissions.試別代碼設定, "試別代碼設定")); detail.Add(new ReportFeature(Permissions.科目代碼設定, "科目代碼設定")); }
private void AddAssignAssessmentSetupButtons() { //增加權限控管 by dylan(2010/11/25) Course.Instance.SelectedListChanged += delegate { assignButton.Enable = User.Acl["JHSchool.Course.Ribbon.AssignAssessmentSetup"].Executable && (Course.Instance.SelectedList.Count > 0); }; assignButton = Course.Instance.RibbonBarItems["指定"]["評分樣版"]; assignButton.Image = Properties.Resources.btnScores_Image; assignButton.Enable = User.Acl["JHSchool.Course.Ribbon.AssignAssessmentSetup"].Executable; assignButton.PopupOpen += new EventHandler <PopupOpenEventArgs>(AssignButton_PopupOpen); noAssignButton = assignButton["<無評分樣版>"]; noAssignButton.Tag = ""; noAssignButton.Click += new EventHandler(MenuButton_Click); }
public static void Main() { DeployModeSetup(); RibbonBarButton rbItem = K12.Presentation.NLDPanels.Class.RibbonBarItems["教務"]["評量成績複製"]; rbItem.Image = Properties.Resources.rotate_save_64; rbItem.Enable = false; rbItem.Click += delegate { MainForm.Run(); }; K12.Presentation.NLDPanels.Class.SelectedSourceChanged += delegate { rbItem.Enable = (K12.Presentation.NLDPanels.Class.SelectedSource.Count > 0); }; }
public ImportExport() { Program.MainPanel.RibbonBarItems["匯入/匯出"]["匯入"].Image = Properties.Resources.Import_Image; Program.MainPanel.RibbonBarItems["匯入/匯出"]["匯入"].Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; Program.MainPanel.RibbonBarItems["匯入/匯出"]["匯入"].Click += delegate { ReadSchoolRecords(); }; RibbonBarButton mb = Program.MainPanel.RibbonBarItems["匯入/匯出"]["匯出"]; mb.Image = Properties.Resources.Export_Image; mb.Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; mb.Click += delegate { MessageBox.Show("製作中!"); }; }
public static void Main() { Global.Params = ModuleLoader.GetDeployParametsers(typeof(Program), "Mode=KaoHsiung"); if (Global.Params["Mode"].ToUpper() == "KaoHsiung".ToUpper()) { RibbonBarButton button = MotherForm.RibbonBarItems["教務作業", "批次作業/檢視"]["成績作業"]; //button.Size = RibbonBarButton.MenuButtonSize.Large; //button.Image = Properties.Resources.preview_info_64; button["平時評量輸入狀況檢視"].Enable = UserAcl.Current["JHSchool.Course.Ribbon.CourseScoreStatusForm"].Executable; button["平時評量輸入狀況檢視"].Click += delegate { CourseScoreStatusForm cssf = new CourseScoreStatusForm(); cssf.ShowDialog(); }; RibbonBarButton button1 = MotherForm.RibbonBarItems["課程", "教務"]["平時評量輸入"]; button1.Image = Resource1.skills_ok_64; button1.Enable = false; button1.Click += delegate { if (K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1) { JHSchool.Data.JHCourseRecord courseRec = JHSchool.Data.JHCourse.SelectByID(K12.Presentation.NLDPanels.Course.SelectedSource[0]); MainFormScoreInput mainForm = new MainFormScoreInput(courseRec); mainForm.ShowDialog(); } }; K12.Presentation.NLDPanels.Course.SelectedSourceChanged += delegate { button1.Enable = UserAcl.Current["JHSchool.Course.Ribbon.MainFormScoreInput"].Executable && (K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1); }; //增加權限控管 by dylan(2010/11/25) Catalog ribbon1 = RoleAclSource.Instance["教務作業"]; ribbon1.Add(new RibbonFeature("JHSchool.Course.Ribbon.CourseScoreStatusForm", "平時評量輸入狀況")); Catalog ribbon2 = RoleAclSource.Instance["課程"]["功能按鈕"]; ribbon2.Add(new RibbonFeature("JHSchool.Course.Ribbon.MainFormScoreInput", "平時評量輸入")); } }
public static void Main() { Global.Params = ModuleLoader.GetDeployParametsers(typeof(Program), "Mode=KaoHsiung"); if (Global.Params["Mode"].ToUpper() == "KaoHsiung".ToUpper()) { RibbonBarButton button = MotherForm.RibbonBarItems["教務作業", "批次作業/檢視"]["成績作業"]; //button.Size = RibbonBarButton.MenuButtonSize.Large; //button.Image = Properties.Resources.preview_info_64; button["小考輸入狀況檢視"].BeginGroup = true; button["小考輸入狀況檢視"].Enable = User.Acl["JHSchool.Course.Ribbon.AssignmentExamManager"].Executable; button["小考輸入狀況檢視"].Click += delegate { MainForm.Run(); }; Catalog ribbon1 = RoleAclSource.Instance["教務作業"]; ribbon1.Add(new RibbonFeature("JHSchool.Course.Ribbon.AssignmentExamManager", "小考輸入狀況檢視")); } }
public static void main() { #region 自訂驗證規則 FactoryProvider.FieldFactory.Add(new CLUBScoreFieldValidatorFactory()); #endregion RibbonBarButton btnReport = MotherForm.RibbonBarItems["學生", "資料統計"]["匯入"]; btnReport["社團相關匯入"]["匯入社團學期成績"].Enable = Permissions.IsEnableCLUBScoreImport; btnReport["社團相關匯入"]["匯入社團學期成績"].Click += delegate { // 準備所有一般生的學生ID, 之後驗證資料時會用到 Global._AllStudentNumberIDTemp = DAO.FDQuery.GetAllStudenNumberDict(); FrmImportClubScore frmImport = new FrmImportClubScore(); frmImport.Execute(); }; // 在權限畫面出現"匯入社團學期成績"權限 Catalog catalog1 = RoleAclSource.Instance["學生"]["匯出/匯入"]; catalog1.Add(new RibbonFeature(Permissions.KeyCLUBScoreImport, "匯入社團學期成績")); }
private void Button_PopupOpen(object sender, PopupOpenEventArgs e) { RibbonBarButton button = sender as RibbonBarButton; entity = "" + button.Tag; if (entity == "Class" && K12.Presentation.NLDPanels.Class.SelectedSource.Count <= 0) { return; } if (entity == "Student" && K12.Presentation.NLDPanels.Student.SelectedSource.Count <= 0) { return; } foreach (var item in JHProgramPlan.SelectAll()) { MenuButton mb = e.VirtualButtons[item.Name]; mb.Tag = item.ID; mb.Click += new EventHandler(ChangeProgramPlanID); } }
private void Button_PopupOpen(object sender, PopupOpenEventArgs e) { RibbonBarButton button = sender as RibbonBarButton; entity = "" + button.Tag; if (entity == "Class" && Class.Instance.SelectedList.Count <= 0) { return; } if (entity == "Student" && Student.Instance.SelectedList.Count <= 0) { return; } foreach (var item in ScoreCalcRule.Instance.Items) { MenuButton mb = e.VirtualButtons[item.Name]; mb.Tag = item.ID; mb.Click += new EventHandler(ChangeScoreCalcRuleID); } }
public ImportExport() { Program.MainPanel.RibbonBarItems["資料統計"]["匯入"].Image = Properties.Resources.Import_Image; Program.MainPanel.RibbonBarItems["資料統計"]["匯入"].Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; Program.MainPanel.RibbonBarItems["資料統計"]["匯入"].Click += delegate { ReadSchoolRecords(); }; Program.MainPanel.RibbonBarItems["資料統計"]["匯出"].Enable = false; RibbonBarButton mb = Program.MainPanel.RibbonBarItems["資料統計"]["匯出"]; mb.Image = Properties.Resources.Export_Image; mb.Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; mb.Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ExportSchoolObject(); ExportStudentV2 wizard = new ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; }
private void AddAssignProgramPlanButtons() { K12.Presentation.NLDPanels.Class.SelectedSourceChanged += delegate { classButton.Enable = (K12.Presentation.NLDPanels.Class.SelectedSource.Count > 0 && User.Acl["JHSchool.Class.Ribbon0055"].Executable); }; K12.Presentation.NLDPanels.Student.SelectedSourceChanged += delegate { studentButton.Enable = (K12.Presentation.NLDPanels.Student.SelectedSource.Count > 0 && User.Acl["JHSchool.Student.Ribbon0055"].Executable); }; classButton = K12.Presentation.NLDPanels.Class.RibbonBarItems["指定"]["課程規劃"]; classButton.Image = JHSchool.Evaluation.ClassExtendControls.Ribbon.Resources.btnProgramPlan_Image; classButton.Tag = "Class"; classButton.Enable = false; classButton.PopupOpen += new EventHandler <PopupOpenEventArgs>(Button_PopupOpen); classNoAssignButton = classButton["不指定"]; classNoAssignButton.Tag = ""; classNoAssignButton.Click += new EventHandler(ChangeProgramPlanID); studentButton = K12.Presentation.NLDPanels.Student.RibbonBarItems["指定"]["課程規劃"]; studentButton.Image = JHSchool.Evaluation.ClassExtendControls.Ribbon.Resources.btnProgramPlan_Image; studentButton.Tag = "Student"; studentButton.Enable = false; studentButton.PopupOpen += new EventHandler <PopupOpenEventArgs>(Button_PopupOpen); studentNoAssignButton = studentButton["不指定"]; studentNoAssignButton.Tag = ""; studentNoAssignButton.Click += new EventHandler(ChangeProgramPlanID); }
internal static void Init() { #region RibbonBar #region 教務作業/成績作業 RibbonBarButton rbItem = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["基本設定"]["設定"]; //rbItem["評量設定"].Image = HsinChu.JHEvaluation.Properties.Resources.評量設定; rbItem["評分樣版設定"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0010"].Executable; rbItem["評分樣版設定"].Click += delegate { new HsinChu.JHEvaluation.CourseExtendControls.Ribbon.AssessmentSetupManager().ShowDialog(); }; RibbonBarButton rbItem1 = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["成績作業"]; //rbItem1["評量輸入狀況檢視"].Image = Properties.Resources.成績輸入檢查; rbItem1["評量輸入狀況檢視"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0020"].Executable; rbItem1["評量輸入狀況檢視"].Click += delegate { new HsinChu.JHEvaluation.EduAdminExtendControls.Ribbon.CourseScoreStatusForm().ShowDialog(); }; #endregion #region 教務作業/基本設定/設定/評量成績缺考/免試 var Permission = RoleAclSource.Instance["教務作業"]["功能按鈕"]; Permission.Add(new RibbonFeature("EduAdmin_Button_ScoreMap", "設定評量成績缺考/免試")); RibbonBarButton rbItem2 = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["基本設定"]["設定"]; rbItem2["評量成績缺考/免試"].Enable = UserAcl.Current["EduAdmin_Button_ScoreMap"].Executable; rbItem2["評量成績缺考/免試"].Click += delegate { new ConfigControls.Ribbon.ScoreValueManager().ShowDialog(); }; #endregion #endregion }
public static void Main() { try { RibbonBarButton rbItem = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"]; rbItem["異動資料檢視"].Enable = FISCA.Permission.UserAcl.Current["SHSchool.EduAdmin.Ribbon0070"].Executable; //User.Acl["SHSchool.EduAdmin.Ribbon0070"].Executable; rbItem["異動資料檢視"].Click += delegate { UpdateRecordViewForm urvf = new UpdateRecordViewForm(); urvf.ShowDialog(); }; //// 註冊 //Catalog ribbon11 = RoleAclSource.Instance["教務作業"]["功能按鈕"]; //ribbon11.Add(new RibbonFeature("SHSchool.EduAdmin.Ribbon0070", "異動資料檢視")); } catch (Exception ex) { MsgBox.Show(ex.Message); } }
internal static void Init() { #region RibbonBar #region 教務作業/成績作業 RibbonBarButton rbItem = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["基本設定"]["設定"]; //rbItem["評量設定"].Image = HsinChu.JHEvaluation.Properties.Resources.評量設定; rbItem["評分樣版設定"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0010"].Executable; rbItem["評分樣版設定"].Click += delegate { new HsinChu.JHEvaluation.CourseExtendControls.Ribbon.AssessmentSetupManager().ShowDialog(); }; RibbonBarButton rbItem1 = JHSchool.Affair.EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["成績作業"]; //rbItem1["評量輸入狀況檢視"].Image = Properties.Resources.成績輸入檢查; rbItem1["評量輸入狀況檢視"].Enable = Framework.User.Acl["JHSchool.EduAdmin.Ribbon0020"].Executable; rbItem1["評量輸入狀況檢視"].Click += delegate { new HsinChu.JHEvaluation.EduAdminExtendControls.Ribbon.CourseScoreStatusForm().ShowDialog(); }; #endregion #endregion }
public static void Main() { // 異動匯入匯出是否可以使用 bool CanUseUpRecIE01, CanUseUpRecIE02, CanUseUpRecIE03, CanUseUpRecIE04, CanUseUpRecIE05, CanUseUpRecIE06, CanUseUpRecIE07, CanUseUpRecIE08, CanUseUpRecIE09; CanUseUpRecIE01 = CanUseUpRecIE02 = CanUseUpRecIE03 = CanUseUpRecIE04 = CanUseUpRecIE05 = CanUseUpRecIE06 = CanUseUpRecIE07 = CanUseUpRecIE08 = CanUseUpRecIE09 = false; // 更正學籍異動精靈是否可以使用 bool CanUseWizardUpCode09 = false; // 新竹專用 if (JHSchool.Permrec.Program.ModuleType == JHSchool.Permrec.Program.ModuleFlag.HsinChu) { // 學生異動資料 Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHPermrec.UpdateRecord.UpdateRecordItem>()); // 設定可使用的異動類別與新增時順序 DAL.DALTransfer2.CheckCanInputUpdateType = new List <JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType>(); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉入); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉出); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.復學); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.中輟); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.新生); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.畢業); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.更正學籍); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.延長修業年限); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.死亡); // 異動匯入匯出 CanUseUpRecIE01 = CanUseUpRecIE02 = CanUseUpRecIE03 = CanUseUpRecIE04 = CanUseUpRecIE06 = CanUseUpRecIE07 = CanUseUpRecIE09 = true; // 更正學籍異動精靈 CanUseWizardUpCode09 = true; } // 高雄專用 if (JHSchool.Permrec.Program.ModuleType == JHSchool.Permrec.Program.ModuleFlag.KaoHsiung) { // 學生異動資料 Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHPermrec.UpdateRecord.UpdateRecordItem>()); // 設定可使用的異動類別與新增時順序 DAL.DALTransfer2.CheckCanInputUpdateType = new List <JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType>(); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉入); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉出); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.休學); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.復學); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.中輟); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.續讀); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.新生); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.畢業); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.更正學籍); // 2014/8/15 加入 DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.死亡); // 異動匯入匯出 CanUseUpRecIE01 = CanUseUpRecIE02 = CanUseUpRecIE03 = CanUseUpRecIE04 = CanUseUpRecIE05 = CanUseUpRecIE06 = CanUseUpRecIE07 = CanUseUpRecIE08 = CanUseUpRecIE09 = true; // 更正學籍異動精靈 CanUseWizardUpCode09 = true; } // 台中專用 if (JHSchool.Permrec.Program.ModuleType == JHSchool.Permrec.Program.ModuleFlag.TaiChung) { // 學生異動資料 Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHPermrec.UpdateRecord.UpdateRecordItem>()); // 設定可使用的異動類別與新增時順序 DAL.DALTransfer2.CheckCanInputUpdateType = new List <JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType>(); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉入); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.轉出); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.復學); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.中輟); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.新生); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.畢業); DAL.DALTransfer2.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer2.UpdateType.更正學籍); // 異動匯入匯出 CanUseUpRecIE01 = CanUseUpRecIE02 = CanUseUpRecIE03 = CanUseUpRecIE04 = CanUseUpRecIE06 = CanUseUpRecIE07 = true; // 更正學籍異動精靈 CanUseWizardUpCode09 = true; } //// 學生異動資料 ////Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider<JHPermrec.UpdateRecord.UpdateRecordItem>()); //// 設定可使用的異動類別與新增時順序 ////DAL.DALTransfer.CheckCanInputUpdateType = new List<JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType>(); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.轉入); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.轉出); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.休學); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.復學); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.中輟); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.續讀); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.新生); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.畢業); ////DAL.DALTransfer.CheckCanInputUpdateType.Add(JHPermrec.UpdateRecord.DAL.DALTransfer.UpdateType.更正學籍); // 批次新生異動 Student.Instance.RibbonBarItems["教務"]["新生作業"]["新生異動"].Enable = User.Acl["JHSchool.Student.Ribbon0110"].Executable; //Student.Instance.RibbonBarItems["教務"]["新生作業"]["新生異動"].Image = Properties.Resources.user_write_64; MenuButton rbItemTool01 = Student.Instance.RibbonBarItems["教務"]["新生作業"]["新生異動"]; rbItemTool01.Click += delegate { Batch.BatchAddNewStudUpdateRecord BASUR = new JHPermrec.UpdateRecord.Batch.BatchAddNewStudUpdateRecord(Batch.BatchAddNewStudUpdateRecord.FormLoadType.學生); BASUR.ShowDialog(); }; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["新生作業"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0090"].Executable; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["新生作業"].Image = Properties.Resources.user_write_64; MenuButton rbItemTool02 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["新生作業"]["批次產生新生異動"]; rbItemTool02.Click += delegate { Batch.BatchAddNewStudUpdateRecord BASUR = new JHPermrec.UpdateRecord.Batch.BatchAddNewStudUpdateRecord(Batch.BatchAddNewStudUpdateRecord.FormLoadType.教務); BASUR.ShowDialog(); }; Student.Instance.RibbonBarItems["教務"]["畢業作業"]["畢業異動"].Enable = User.Acl["JHSchool.Student.Ribbon0111"].Executable; //Student.Instance.RibbonBarItems["教務"]["畢業作業"]["畢業異動"].Image = Properties.Resources.graduated_write_64; MenuButton rbItemTool03 = Student.Instance.RibbonBarItems["教務"]["畢業作業"]["畢業異動"]; MenuButton rbItemTool04 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"]["批次產生畢業異動"]; //MenuButton rbItemTool05 = EduAdmin.Instance.RibbonBarItems["學籍"]["畢業作業"]["產生異業證書字號"]; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0080"].Executable; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Image = Properties.Resources.graduated_write_64; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0100"].Executable; //EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"].Image = Properties.Resources.demographic_reload_64; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"].Image = Properties.Resources.history_save_64; Student.Instance.RibbonBarItems["教務"]["異動作業"].Enable = User.Acl["JHSchool.Student.Ribbon0100"].Executable; //Student.Instance.RibbonBarItems["教務"]["轉入作業"].Image = Properties.Resources.demographic_reload_64; MenuButton rbItemTool09 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"]["轉入異動"]; MenuButton rbItemTool11 = Student.Instance.RibbonBarItems["教務"]["異動作業"]["轉入異動"]; rbItemTool03.Click += delegate { Batch.BatchStudGraduateUpdateRec BSGRUR = new JHPermrec.UpdateRecord.Batch.BatchStudGraduateUpdateRec(JHPermrec.UpdateRecord.Batch.BatchStudGraduateUpdateRec.FormLoadType.學生); BSGRUR.ShowDialog(); }; rbItemTool04.Click += delegate { Batch.BatchStudGraduateUpdateRec BSGRUR = new JHPermrec.UpdateRecord.Batch.BatchStudGraduateUpdateRec(JHPermrec.UpdateRecord.Batch.BatchStudGraduateUpdateRec.FormLoadType.教務); BSGRUR.ShowDialog(); }; //rbItemTool05.Click += delegate //{ // Batch.BatchStudGraduateDocNo BSGD = new JHPermrec.UpdateRecord.Batch.BatchStudGraduateDocNo(); // BSGD.ShowDialog(); //}; rbItemTool09.Click += delegate { Transfer.AddTransStud ATS = new JHPermrec.UpdateRecord.Transfer.AddTransStud(); ATS.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; ATS.ShowDialog(FISCA.Presentation.MotherForm.Form); }; rbItemTool11.Click += delegate { Transfer.AddTransStud ATS = new JHPermrec.UpdateRecord.Transfer.AddTransStud(); ATS.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; ATS.ShowDialog(FISCA.Presentation.MotherForm.Form); }; // 匯出匯入異動啟動 RibbonBarButton rbUpdateRecordExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; RibbonBarButton rbUpdateRecordImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; // 匯入匯出註冊權限 Catalog StudUpdateRecFuncButtonRoleAcl = RoleAclSource.Instance["學生"]["功能按鈕"]; if (CanUseUpRecIE01) { // 匯出新生異動 rbUpdateRecordExport["異動相關匯出"]["匯出新生異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode01"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出新生異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode01(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入新生異動 rbUpdateRecordImport["異動相關匯入"]["匯入新生異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode01"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入新生異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode01(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode01", "匯出新生異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode01", "匯入新生異動")); } if (CanUseUpRecIE02) { // 匯出畢業異動 rbUpdateRecordExport["異動相關匯出"]["匯出畢業異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode02"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出畢業異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode02(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入畢業異動 rbUpdateRecordImport["異動相關匯入"]["匯入畢業異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode02"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入畢業異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode02(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode02", "匯出畢業異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode02", "匯入畢業異動")); } if (CanUseUpRecIE03) { // 匯出轉入異動 rbUpdateRecordExport["異動相關匯出"]["匯出轉入異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode03"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出轉入異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode03(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入轉入異動 rbUpdateRecordImport["異動相關匯入"]["匯入轉入異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode03"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入轉入異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode03(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode03", "匯出轉入異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode03", "匯入轉入異動")); } if (CanUseUpRecIE04) { // 匯出轉出異動 rbUpdateRecordExport["異動相關匯出"]["匯出轉出異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode04"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出轉出異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode04(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入轉出異動 rbUpdateRecordImport["異動相關匯入"]["匯入轉出異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode04"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入轉出異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode04(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode04", "匯出轉出異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode04", "匯入轉出異動")); } if (CanUseUpRecIE05) { // 匯出休學異動 rbUpdateRecordExport["異動相關匯出"]["匯出休學異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode05"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出休學異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode05(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入休學異動 rbUpdateRecordImport["異動相關匯入"]["匯入休學異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode05"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入休學異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode05(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode05", "匯出休學異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode05", "匯入休學異動")); } if (CanUseUpRecIE06) { // 匯出復學異動 rbUpdateRecordExport["異動相關匯出"]["匯出復學異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode06"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出復學異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode06(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入復學異動 rbUpdateRecordImport["異動相關匯入"]["匯入復學異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode06"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入復學異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode06(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode06", "匯出復學異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode06", "匯入復學異動")); } if (CanUseUpRecIE07) { // 匯出中輟異動 rbUpdateRecordExport["異動相關匯出"]["匯出中輟異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode07"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出中輟異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode07(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入中輟異動 rbUpdateRecordImport["異動相關匯入"]["匯入中輟異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode07"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入中輟異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode07(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode07", "匯出中輟異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode07", "匯入中輟異動")); } if (CanUseUpRecIE08) { // 匯出續讀異動 rbUpdateRecordExport["異動相關匯出"]["匯出續讀異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode08"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出續讀異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode08(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入續讀異動 rbUpdateRecordImport["異動相關匯入"]["匯入續讀異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode08"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入續讀異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode08(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode08", "匯出續讀異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode08", "匯入續讀異動")); } if (CanUseUpRecIE09) { // 匯出更正學籍異動 rbUpdateRecordExport["異動相關匯出"]["匯出更正學籍異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode09"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出更正學籍異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode09(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入更正學籍異動 rbUpdateRecordImport["異動相關匯入"]["匯入更正學籍異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode09"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入更正學籍異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode09(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode09", "匯出更正學籍異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode09", "匯入更正學籍異動")); } // 匯出學籍異動 rbUpdateRecordExport["異動相關匯出"]["匯出學籍異動"].Enable = User.Acl["JHSchool.Student.RibbonExportUpdateRecCode100"].Executable; rbUpdateRecordExport["異動相關匯出"]["匯出學籍異動"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHPermrec.UpdateRecord.ImportExport.ExportUpdateRecCode100(); ImportExport.ExportStudentV2 wizard = new ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; // 匯入學籍異動 rbUpdateRecordImport["異動相關匯入"]["匯入學籍異動"].Enable = User.Acl["JHSchool.Student.RibbonImportUpdateRecCode100"].Executable; rbUpdateRecordImport["異動相關匯入"]["匯入學籍異動"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHPermrec.UpdateRecord.ImportExport.ImportUpdateRecCode100(); ImportExport.ImportStudentV2 wizard = new ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonExportUpdateRecCode100", "匯出學籍異動")); StudUpdateRecFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonImportUpdateRecCode100", "匯入學籍異動")); // 更正學籍異動精靈 if (CanUseWizardUpCode09) { MenuButton rbItemRibbonWizard_UpdateCode09 = Student.Instance.RibbonBarItems["教務"]["異動作業"]["更正學籍"]; rbItemRibbonWizard_UpdateCode09.Enable = User.Acl["JHSchool.Student.RibbonWizard_UpdateCode09"].Executable; rbItemRibbonWizard_UpdateCode09.Click += delegate { bool check = true; if (K12.Presentation.NLDPanels.Student.SelectedSource.Count == 0) { FISCA.Presentation.Controls.MsgBox.Show("請選擇學生."); check = false; } if (K12.Presentation.NLDPanels.Student.SelectedSource.Count > 1) { FISCA.Presentation.Controls.MsgBox.Show("只能處理單筆學生異動."); check = false; } if (check) { Wizard.Wizard_UpdateCode09Form_1 wuc9f = new JHPermrec.UpdateRecord.Wizard.Wizard_UpdateCode09Form_1(); wuc9f.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; wuc9f.ShowDialog(FISCA.Presentation.MotherForm.Form); } }; } Catalog ribbon = RoleAclSource.Instance["教務作業"]; ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0060", "異動名冊")); MenuButton rbItem1 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"]["異動名冊"]; //rbItem1.Size = RibbonBarButton.MenuButtonSize.Large; //rbItem1.Image = Properties.Resources.history_save_64; //rbItem1.Image = JHPermrec.UpdateRecord.GovernmentalDocument.GDResources.btnItemNameList_Image; rbItem1.Enable = User.Acl["JHSchool.EduAdmin.Ribbon0060"].Executable; rbItem1.Click += delegate { JHPermrec.UpdateRecord.GovernmentalDocument.Process.NameList.RegisterNames(); new JHPermrec.UpdateRecord.GovernmentalDocument.NameList.ListForm().ShowDialog(); }; RibbonBarItem ViewForm1 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]; //ViewForm1["檢視"]["異動資料檢視"].Image = Properties.Resources.contract_zoom_128; ViewForm1["異動作業"]["異動資料檢視"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0070"].Executable; ViewForm1["異動作業"]["異動資料檢視"].Click += delegate { UpdateRecordViewForm.UpdateRecordViewForm UpReViewForm = new JHPermrec.UpdateRecord.UpdateRecordViewForm.UpdateRecordViewForm(); UpReViewForm.ShowDialog(); }; // 學生異動資料註冊權限 Catalog detail = RoleAclSource.Instance["學生"]["資料項目"]; detail.Add(new DetailItemFeature(typeof(JHPermrec.UpdateRecord.UpdateRecordItem))); Catalog catalog = RoleAclSource.Instance["學生"]["功能按鈕"]; catalog.Add(new RibbonFeature("JHSchool.Student.Ribbon0110", "新生異動")); catalog.Add(new RibbonFeature("JHSchool.Student.Ribbon0111", "畢業異動")); catalog.Add(new RibbonFeature("JHSchool.Student.Ribbon0100", "轉入異動")); catalog.Add(new RibbonFeature("JHSchool.Student.RibbonWizard_UpdateCode09", "更正學籍")); Catalog catalog1 = RoleAclSource.Instance["教務作業"]["新生作業"]; Catalog catalog2 = RoleAclSource.Instance["教務作業"]["畢業作業"]; Catalog catalog3 = RoleAclSource.Instance["教務作業"]["轉入作業"]; catalog1.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0090", "批次新生異動")); catalog2.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0080", "批次畢業異動")); //catalog2.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon00801", "產生異業證書字號")); catalog3.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0100", "轉入異動")); Catalog ribbon1 = RoleAclSource.Instance["教務作業"]; ribbon1.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0070", "異動資料檢視")); }
static void SetButtonPermission(RibbonBarButton btn, string featureCode, string categoryName) { Catalog cat = RoleAclSource.Instance["課程"]["功能按鈕"]; cat.Add(new RibbonFeature(featureCode, categoryName)); btn.Enable = UserAcl.Current[featureCode].Executable; }
public static void Main() { //診斷模式不要執行 UDM 更新。 if (!RTContext.IsDiagMode) { ServerModule.AutoManaged("http://module.ischool.com.tw/module/137815/School_IBSH/udm.xml"); } // 課程加入教師檢視 Course.Instance.AddView(new TeacherCategoryView()); //Sync UDT Table AccessHelper a = new AccessHelper(); a.Select <ConductRecord>("uid is null"); a.Select <CourseExtendRecord>("uid is null"); a.Select <ConductSetting>("uid is null"); a.Select <SubjectRecord>("uid is null"); a.Select <GpaRef>("uid is null"); #region 限註冊 // 學生 Catalog ribbon = RoleAclSource.Instance["學生"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0169", "匯出學期歷程")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0170", "匯入學期歷程")); ribbon.Add(new RibbonFeature("JHSchool.Student.SubjectScoreCalculate", "計算科目成績")); ribbon = RoleAclSource.Instance["學生"]["資料項目"]; ribbon.Add(new DetailItemFeature("JHSchool.Student.Detail.SemsScore", "學期成績")); //班級 ribbon = RoleAclSource.Instance["班級"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Class.Ribbon0070", "班級開課")); ribbon.Add(new RibbonFeature("JHSchool.Class.Ribbon0070.HrtConductInputForm", "指標輸入")); // 課程 ribbon = RoleAclSource.Instance["課程"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0031", "匯出課程修課學生")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0021", "匯入課程修課學生")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0070.CourseScoreInputForm", "成績輸入")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0070.SubjectConductInputForm", "指標輸入")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0070.CourseGradeEditor", "批次修改開課年級")); ribbon = RoleAclSource.Instance["課程"]["資料項目"]; ribbon.Add(new DetailItemFeature("JHSchool.Course.Detail.BasicInfo", "基本資料")); ribbon.Add(new DetailItemFeature("JHSchool.Course.Detail.AttendStudent", "修課學生")); //教務作業 ribbon = RoleAclSource.Instance["教務作業"]; //ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0000", "評量名稱管理")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon.SubjectManager", "科目資料管理")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.SetHoursOpeningForm", "開放時間管理")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.SubjectScoreCalculateByGradeyear", "批次計算科目成績")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.GpaRefForm", "歷屆GPA統計")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.SemsHistoryMaker", "產生學期歷程")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.CourseScoreStatusForm", "輸入狀況檢視(評量成績)")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.HRTConductStatusForm", "輸入狀況檢視(Conduct班導師)")); ribbon.Add(new RibbonFeature("CourseGradeB.EduAdminExtendControls.Ribbon.SubjectConductStatusForm", "輸入狀況檢視(Conduct授課老師)")); //ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon.ExamTemplateManager", "評分樣板設定")); //學務作業 ribbon = RoleAclSource.Instance["學務作業"]; ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon.ConductTitleManager", "指標管理")); #endregion #region 資料項目 // 基本資料 //Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider<BasicInfoItem>()); Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider <BasicInfoItem>()); // 修課學生 Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider <SCAttendItem>()); // 學期成績 Student.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider <SemsSubjScoreItem>()); #endregion #region 課程/編輯 RibbonBarItem rbItem = Student.Instance.RibbonBarItems["教務"]; RibbonBarButton rbButton; rbItem = Course.Instance.RibbonBarItems["編輯"]; rbButton = rbItem["新增"]; rbButton.Size = RibbonBarButton.MenuButtonSize.Large; rbButton.Image = Properties.Resources.btnAddCourse; rbButton.Enable = User.Acl["JHSchool.Course.Ribbon0000"].Executable; rbButton.Click += delegate { new CourseGradeB.CourseExtendControls.Ribbon.AddCourse().ShowDialog(); }; rbButton = rbItem["刪除"]; rbButton.Size = RibbonBarButton.MenuButtonSize.Large; rbButton.Image = Properties.Resources.btnDeleteCourse; rbButton.Enable = User.Acl["JHSchool.Course.Ribbon0010"].Executable; rbButton.Click += delegate { if (Course.Instance.SelectedKeys.Count == 1) { JHSchool.Data.JHCourseRecord record = JHSchool.Data.JHCourse.SelectByID(Course.Instance.SelectedKeys[0]); //int CourseAttendCot = Course.Instance.Items[record.ID].GetAttendStudents().Count; List <JHSchool.Data.JHSCAttendRecord> scattendList = JHSchool.Data.JHSCAttend.SelectByStudentIDAndCourseID(new List <string>() { }, new List <string>() { record.ID }); int attendStudentCount = 0; foreach (JHSchool.Data.JHSCAttendRecord scattend in scattendList) { if (scattend.Student.Status == K12.Data.StudentRecord.StudentStatus.一般) { attendStudentCount++; } } if (attendStudentCount > 0) { MsgBox.Show(record.Name + " 有" + attendStudentCount.ToString() + "位修課學生,請先移除修課學生後再刪除課程."); } else { string msg = string.Format("確定要刪除「{0}」?", record.Name); if (MsgBox.Show(msg, "刪除課程", MessageBoxButtons.YesNo) == DialogResult.Yes) { #region 自動刪除非一般學生的修課記錄 List <JHSchool.Data.JHSCAttendRecord> deleteSCAttendList = new List <JHSchool.Data.JHSCAttendRecord>(); foreach (JHSchool.Data.JHSCAttendRecord scattend in scattendList) { JHSchool.Data.JHStudentRecord stuRecord = JHSchool.Data.JHStudent.SelectByID(scattend.RefStudentID); if (stuRecord == null) { continue; } if (stuRecord.Status != K12.Data.StudentRecord.StudentStatus.一般) { deleteSCAttendList.Add(scattend); } } List <string> studentIDs = new List <string>(); foreach (JHSchool.Data.JHSCAttendRecord scattend in deleteSCAttendList) { studentIDs.Add(scattend.RefStudentID); } List <JHSchool.Data.JHSCETakeRecord> sceList = JHSchool.Data.JHSCETake.SelectByStudentAndCourse(studentIDs, new List <string>() { record.ID }); JHSchool.Data.JHSCETake.Delete(sceList); JHSchool.Data.JHSCAttend.Delete(deleteSCAttendList); #endregion JHSchool.Data.JHCourse.Delete(record); //刪除CourseExtendRecord List <CourseExtendRecord> list = a.Select <CourseExtendRecord>("ref_course_id=" + record.ID); if (list.Count > 0) { a.DeletedValues(list); } // 加這主要是重新整理 Course.Instance.SyncDataBackground(record.ID); } else { return; } } } }; RibbonBarButton CouItem = Course.Instance.RibbonBarItems["編輯"]["刪除"]; Course.Instance.SelectedListChanged += delegate { // 課程刪除不能多選 CouItem.Enable = (Course.Instance.SelectedList.Count < 2) && User.Acl["JHSchool.Course.Ribbon0010"].Executable; }; //指定評分樣板 //CouItem = Course.Instance.RibbonBarItems["指定"]["指定評分樣板"]; //Course.Instance.SelectedListChanged += delegate //{ // CouItem.Enable = (Course.Instance.SelectedList.Count > 0); //}; //CouItem.Click += delegate //{ // new CourseGradeB.CourseExtendControls.Ribbon.GiveRefExamTemplateForm(K12.Presentation.NLDPanels.Course.SelectedSource).ShowDialog(); //}; RibbonBarItem scores = JHSchool.Course.Instance.RibbonBarItems["教務"]; scores["成績輸入"].Size = RibbonBarButton.MenuButtonSize.Medium; scores["成績輸入"].Image = Properties.Resources.exam_write_64; scores["成績輸入"].Enable = Framework.User.Acl["JHSchool.Course.Ribbon0070.CourseScoreInputForm"].Executable; scores["成績輸入"].Click += delegate { if (K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1) { CourseRecord courseRecord = Course.Instance.SelectedList[0]; //int key = int.Parse(courseRecord.ID); //int value = Global.Instance.CourseExtendCatch.ContainsKey(key) ? Global.Instance.CourseExtendCatch[key] : -1; //if (value == -1) // FISCA.Presentation.Controls.MsgBox.Show("課程 '" + courseRecord.Name + "' 沒有評量設定。"); //else new CourseGradeB.CourseExtendControls.Ribbon.CourseScoreInputForm(courseRecord).ShowDialog(); } }; K12.Presentation.NLDPanels.Course.SelectedSourceChanged += delegate { scores["成績輸入"].Enable = K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1 && Framework.User.Acl["JHSchool.Course.Ribbon0070.CourseScoreInputForm"].Executable; }; RibbonBarItem conduct = JHSchool.Course.Instance.RibbonBarItems["教務"]; conduct["指標輸入"].Size = RibbonBarButton.MenuButtonSize.Medium; conduct["指標輸入"].Image = Properties.Resources.exam_write_64; conduct["指標輸入"].Enable = Framework.User.Acl["JHSchool.Course.Ribbon0070.SubjectConductInputForm"].Executable; conduct["指標輸入"].Click += delegate { if (K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1) { CourseRecord courseRecord = Course.Instance.SelectedList[0]; new CourseGradeB.CourseExtendControls.Ribbon.SubjectConductInputForm(courseRecord).ShowDialog(); } }; K12.Presentation.NLDPanels.Course.SelectedSourceChanged += delegate { conduct["指標輸入"].Enable = K12.Presentation.NLDPanels.Course.SelectedSource.Count == 1 && Framework.User.Acl["JHSchool.Course.Ribbon0070.SubjectConductInputForm"].Executable; }; RibbonBarItem editGrade = JHSchool.Course.Instance.RibbonBarItems["指定"]; editGrade["批次修改開課年級"].Size = RibbonBarButton.MenuButtonSize.Medium; editGrade["批次修改開課年級"].Image = Properties.Resources.record_b_write_64; editGrade["批次修改開課年級"].Enable = Framework.User.Acl["JHSchool.Course.Ribbon0070.CourseGradeEditor"].Executable; editGrade["批次修改開課年級"].Click += delegate { if (K12.Presentation.NLDPanels.Course.SelectedSource.Count > 0) { new CourseGradeB.CourseExtendControls.Ribbon.CourseGradeEditor(K12.Presentation.NLDPanels.Course.SelectedSource).ShowDialog(); } }; K12.Presentation.NLDPanels.Course.SelectedSourceChanged += delegate { editGrade["批次修改開課年級"].Enable = K12.Presentation.NLDPanels.Course.SelectedSource.Count > 0 && Framework.User.Acl["JHSchool.Course.Ribbon0070.CourseGradeEditor"].Executable; }; #endregion #region 匯出/匯入 RibbonBarButton rbItemExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; RibbonBarButton rbItemImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; rbItemExport["成績相關匯出"]["匯出學期歷程"].Enable = User.Acl["JHSchool.Student.Ribbon0169"].Executable; rbItemExport["成績相關匯出"]["匯出學期歷程"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new CourseGradeB.ImportExport.ExportSemesterHistory(); CourseGradeB.ImportExport.ExportStudentV2 wizard = new CourseGradeB.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemImport["成績相關匯入"]["匯入學期歷程"].Enable = User.Acl["JHSchool.Student.Ribbon0170"].Executable; rbItemImport["成績相關匯入"]["匯入學期歷程"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new CourseGradeB.ImportExport.ImportSemesterHistory(); CourseGradeB.ImportExport.ImportStudentV2 wizard = new CourseGradeB.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; RibbonBarItem rbItemCourseImportExport = Course.Instance.RibbonBarItems["資料統計"]; rbItemCourseImportExport["匯出"]["匯出課程修課學生"].Enable = User.Acl["JHSchool.Course.Ribbon0031"].Executable; rbItemCourseImportExport["匯出"]["匯出課程修課學生"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new CourseGradeB.ImportExport.Course.ExportCourseStudents(""); CourseGradeB.ImportExport.Course.ExportStudentV2 wizard = new CourseGradeB.ImportExport.Course.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemCourseImportExport["匯入"]["匯入課程修課學生"].Enable = User.Acl["JHSchool.Course.Ribbon0021"].Executable; rbItemCourseImportExport["匯入"]["匯入課程修課學生"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new CourseGradeB.ImportExport.Course.ImportCourseStudents(""); CourseGradeB.ImportExport.Course.ImportStudentV2 wizard = new CourseGradeB.ImportExport.Course.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; #endregion #region 班級功能 rbButton = K12.Presentation.NLDPanels.Class.RibbonBarItems["教務"]["班級開課"]; rbButton.Enable = User.Acl["JHSchool.Class.Ribbon0070"].Executable; rbButton.Image = Properties.Resources.organigram_refresh_64; rbButton["直接開課"].Click += delegate { if (Class.Instance.SelectedList.Count > 0) { new CourseGradeB.ClassExtendControls.Ribbon.CreateCoursesDirectly(); } }; RibbonBarItem hrtConduct = JHSchool.Class.Instance.RibbonBarItems["教務"]; hrtConduct["指標輸入"].Size = RibbonBarButton.MenuButtonSize.Medium; hrtConduct["指標輸入"].Image = Properties.Resources.exam_write_64; hrtConduct["指標輸入"].Enable = Framework.User.Acl["JHSchool.Class.Ribbon0070.HrtConductInputForm"].Executable; hrtConduct["指標輸入"].Click += delegate { if (K12.Presentation.NLDPanels.Class.SelectedSource.Count == 1) { new CourseGradeB.ClassExtendControls.Ribbon.HrtSelectSchoolYear(K12.Presentation.NLDPanels.Class.SelectedSource[0]).ShowDialog(); } }; K12.Presentation.NLDPanels.Class.SelectedSourceChanged += delegate { hrtConduct["指標輸入"].Enable = K12.Presentation.NLDPanels.Class.SelectedSource.Count == 1 && Framework.User.Acl["JHSchool.Class.Ribbon0070.HrtConductInputForm"].Executable; }; #endregion #region 教務作業功能 FISCA.Presentation.RibbonBarItem eduitem1 = FISCA.Presentation.MotherForm.RibbonBarItems["教務作業", "基本設定"]; eduitem1["對照/代碼"].Image = Properties.Resources.notepad_lock_64; eduitem1["對照/代碼"].Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; FISCA.Presentation.RibbonBarItem eduitem2 = FISCA.Presentation.MotherForm.RibbonBarItems["教務作業", "批次作業/檢視"]; eduitem2["成績作業"].Image = Properties.Resources.calc_save_64; eduitem2["成績作業"].Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; eduitem2["成績作業"]["批次計算科目成績"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.SubjectScoreCalculateByGradeyear"].Executable; eduitem2["成績作業"]["批次計算科目成績"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.SubjectScoreCalculateByGradeyear().ShowDialog(); }; eduitem2["成績作業"]["歷屆GPA統計"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.GpaRefForm"].Executable; eduitem2["成績作業"]["歷屆GPA統計"].Click += delegate { new GpaRefForm().ShowDialog(); }; //產生學期歷程 eduitem2["成績作業"]["產生學期歷程"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.SemsHistoryMaker"].Executable; eduitem2["成績作業"]["產生學期歷程"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.SemsHistoryMaker().ShowDialog(); }; //評量輸入狀況檢視 eduitem2["成績作業"]["輸入狀況檢視(評量成績)"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.CourseScoreStatusForm"].Executable; eduitem2["成績作業"]["輸入狀況檢視(評量成績)"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.CourseScoreStatusForm().ShowDialog(); }; //Conduct輸入狀況檢視(班導師) eduitem2["成績作業"]["輸入狀況檢視(Conduct、StandardBase班導師)"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.HRTConductStatusForm"].Executable; eduitem2["成績作業"]["輸入狀況檢視(Conduct、StandardBase班導師)"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.HRTConductStatusForm().ShowDialog(); }; //Conduct輸入狀況檢視(授課老師) eduitem2["成績作業"]["輸入狀況檢視(Conduct、StandardBase授課老師)"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.SubjectConductStatusForm"].Executable; eduitem2["成績作業"]["輸入狀況檢視(Conduct、StandardBase授課老師)"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.SubjectConductStatusForm().ShowDialog(); }; RibbonBarItem eduitem3 = EduAdmin.Instance.RibbonBarItems["基本設定"]; eduitem3["管理"].Size = RibbonBarButton.MenuButtonSize.Large; eduitem3["管理"].Image = Properties.Resources.network_lock_64; //rbItem["管理"]["評量名稱管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0000"].Executable; //rbItem["管理"]["評量名稱管理"].Click += delegate //{ // new CourseGradeB.CourseExtendControls.Ribbon.ExamManager().ShowDialog(); //}; eduitem3["管理"]["科目資料管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon.SubjectManager"].Executable; eduitem3["管理"]["科目資料管理"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.SubjectManager().ShowDialog(); }; eduitem3["管理"]["開放時間管理"].Enable = User.Acl["CourseGradeB.EduAdminExtendControls.Ribbon.SetHoursOpeningForm"].Executable; eduitem3["管理"]["開放時間管理"].Click += delegate { new CourseGradeB.EduAdminExtendControls.Ribbon.SetHoursOpeningForm().ShowDialog(); }; //rbItem["設定"].Image = Properties.Resources.sandglass_unlock_64; //rbItem["設定"].Size = RibbonBarButton.MenuButtonSize.Large; //rbItem["設定"]["評分樣板設定"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon.ExamTemplateManager"].Executable; //rbItem["設定"]["評分樣板設定"].Click += delegate //{ // new CourseGradeB.EduAdminExtendControls.Ribbon.ExamTemplateManager().ShowDialog(); //}; #endregion #region 學務作業功能 FISCA.Presentation.RibbonBarItem stuitem1 = FISCA.Presentation.MotherForm.RibbonBarItems["學務作業", "基本設定"]; //item3["管理"].Image = Properties.Resources.network_lock_64; //item3["管理"].Size = FISCA.Presentation.RibbonBarButton.MenuButtonSize.Large; stuitem1["管理"]["指標管理"].Enable = User.Acl["JHSchool.StuAdmin.Ribbon.ConductTitleManager"].Executable; stuitem1["管理"]["指標管理"].Click += delegate { new CourseGradeB.StuAdminExtendControls.ConductSettingForm().ShowDialog(); }; #endregion #region 學生功能 //註冊成績計算功能項目。 FISCA.Presentation.RibbonBarItem student_rbitem = FISCA.Presentation.MotherForm.RibbonBarItems["學生", "教務"]; student_rbitem["成績作業"].Size = RibbonBarButton.MenuButtonSize.Large; student_rbitem["成績作業"].Image = Properties.Resources.calc_save_64; student_rbitem["成績作業"]["計算科目成績"].Enable = false; K12.Presentation.NLDPanels.Student.SelectedSourceChanged += delegate { student_rbitem["成績作業"]["計算科目成績"].Enable = K12.Presentation.NLDPanels.Student.SelectedSource.Count > 0 && User.Acl["JHSchool.Student.SubjectScoreCalculate"].Executable; }; student_rbitem["成績作業"]["計算科目成績"].Click += delegate { new CourseGradeB.StudentExtendControls.Ribbon.SubjectScoreCalculate(K12.Presentation.NLDPanels.Student.SelectedSource).ShowDialog(); }; #endregion //教師系統類別 Tagging.Main(); ResCourseData(); }
static public void Main() { //Student.Instance.AddDetailBulider(new ContentItemBulider<StudentExtendControls.UpdateRecordItem>()); //Class.Instance.AddDetailBulider(new DetailBulider<JHSchool.Permrec.ClassExtendControls.ClassStudentItem>()); System.Threading.ThreadPool.QueueUserWorkItem(x => { JHSchool.Data.JHStudent.SelectAll(); }); // 學生聯絡電話 // K12.Presentation.NLDPanels.Student.AddDetailBulider(new DetailBulider<StudentExtendControls.PhoneItem>()); Student.Instance.AddDetailBulider(new DetailBulider <StudentExtendControls.PhoneItem>()); Catalog catalog02 = RoleAclSource.Instance["學生"]["資料項目"]; catalog02.Add(new DetailItemFeature(typeof(StudentExtendControls.PhoneItem))); // 班級學生資訊 Class.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHSchool.Permrec.ClassExtendControls.ClassStudentItem>()); Student.Instance.AddDetailBulider(new DetailBulider <StudentExtendControls.AddressPalmerwormItem>()); // 聯絡電話功能先移除 //Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider<JHSchool.Permrec.StudentExtendControls.PhonePalmerwormItem>()); // 高中自訂欄位註解 // Student.Instance.AddDetailBulider(new ContentItemBulider<StudentExtendControls.ExtensionValuesPalmerwormItem>()); Student.Instance.AddDetailBulider(new DetailBulider <StudentExtendControls.DiplomaInfoPalmerworm>()); Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHSchool.Permrec.StudentExtendControls.ParentInfoPalmerwormItem>()); //Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHSchool.Permrec.StudentExtendControls.ParentInfoPalmerwormItem>()); // Test new Class Item // 學生>班級資訊覆寫 IStudentClassDetailItemAPI item = FISCA.InteractionService.DiscoverAPI <IStudentClassDetailItemAPI>(); if (item != null) { Student.Instance.AddDetailBulider(item.CreateBasicInfo()); } else { Student.Instance.AddDetailBulider(new DetailBulider <JHSchool.Permrec.StudentExtendControls.ClassItem>()); } Student.Instance.AddDetailBulider(new FISCA.Presentation.DetailBulider <JHSchool.Permrec.StudentExtendControls.SemesterHistoryDetail>()); Student.Instance.AddDetailBulider(new DetailBulider <StudentExtendControls.BeforeEnrollmentItem>()); RibbonBarButton Class_rbDelItem = Class.Instance.RibbonBarItems["編輯"]["刪除"]; RibbonBarButton Student_rbDelItem = Student.Instance.RibbonBarItems["編輯"]["刪除"]; RibbonBarButton Teacher_rbDelItem = Teacher.Instance.RibbonBarItems["編輯"]["刪除"]; Student.Instance.RibbonBarItems["教務"]["新生作業"].Size = RibbonBarButton.MenuButtonSize.Large; Student.Instance.RibbonBarItems["教務"]["新生作業"].Image = Properties.Resources.user_write_64; Student.Instance.RibbonBarItems["教務"]["異動作業"].Size = RibbonBarButton.MenuButtonSize.Large; Student.Instance.RibbonBarItems["教務"]["異動作業"].Image = Properties.Resources.demographic_reload_64; EduAdmin.Instance.RibbonBarItems["基本設定"].Index = 0; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"].Index = 1; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["新生作業"].Enable = true; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["新生作業"].Size = RibbonBarButton.MenuButtonSize.Large; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"].Enable = true; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["異動作業"].Size = RibbonBarButton.MenuButtonSize.Large; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["成績作業"].Enable = true; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["成績作業"].Size = RibbonBarButton.MenuButtonSize.Large; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Enable = true; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Size = RibbonBarButton.MenuButtonSize.Large; //Teacher.Instance.SelectedListChanged _=dele Class.Instance.SelectedListChanged += delegate { Class_rbDelItem.Enable = (Class.Instance.SelectedList.Count < 2) & User.Acl["JHSchool.Class.Ribbon0010"].Executable; }; Student.Instance.SelectedListChanged += delegate { Student_rbDelItem.Enable = (Student.Instance.SelectedList.Count < 2) & User.Acl["JHSchool.Student.Ribbon0010"].Executable; }; Teacher.Instance.SelectedListChanged += delegate { Teacher_rbDelItem.Enable = (Teacher.Instance.SelectedList.Count < 2) & User.Acl["JHSchool.Teacher.Ribbon0010"].Executable; }; // 匯入照片 //20131216 - dylan註解 //RibbonBarItem rbiPhotoImport = Student.Instance.RibbonBarItems["資料統計"]; //rbiPhotoImport["匯入"]["學籍相關匯入"]["匯入學生照片"].Enable = User.Acl["JHSchool.Student.Ribbon0130"].Executable; //rbiPhotoImport["匯入"]["學籍相關匯入"]["匯入學生照片"].Click += (sender, e) => (new K12.Form.Photo.PhotosBatchImportForm()).ShowDialog(); //已由K12.Form.Photo取代 //rbiPhotoImport["匯入"]["匯入照片"].Click += delegate //{ // JHSchool.Permrec.StudentExtendControls.PhotosBatchImportExports.PhotosBatchImportForm PhotoBatchImport = new JHSchool.Permrec.StudentExtendControls.PhotosBatchImportExports.PhotosBatchImportForm(); // PhotoBatchImport.ShowDialog(); //}; // 匯出照片 //20131216 - dylan註解 //RibbonBarItem rbiPhotoExport = Student.Instance.RibbonBarItems["資料統計"]; //rbiPhotoExport["匯出"]["學籍相關匯出"]["匯出學生照片"].Enable = User.Acl["JHSchool.Student.Ribbon0120"].Executable; //rbiPhotoExport["匯出"]["學籍相關匯出"]["匯出學生照片"].Click += (sender, e) => (new K12.Form.Photo.PhotosBatchExportForm()).ShowDialog(); //已由K12.Form.Photo取代 //rbiPhotoExport["匯出"]["匯出照片"].Click += delegate //{ // JHSchool.Permrec.StudentExtendControls.PhotosBatchImportExports.PhotosBatchExportForm PhotoBatchExport = new JHSchool.Permrec.StudentExtendControls.PhotosBatchImportExports.PhotosBatchExportForm(); // PhotoBatchExport.ShowDialog(); //}; //2012/5/10 - dylan - (移除此功能,由快速待處理替代) // 快速加入待處理功能 //Student.Instance.RibbonBarItems["待處理學生"]["加入"].Size = RibbonBarButton.MenuButtonSize.Small; //Student.Instance.RibbonBarItems["待處理學生"]["加入"].Click += delegate //{ // // 將所選學生加入待處理 // Student.Instance.AddToTemporal(Student.Instance.SelectedKeys); //}; //Student.Instance.RibbonBarItems["待處理學生"]["移出"].Size = RibbonBarButton.MenuButtonSize.Small; //Student.Instance.RibbonBarItems["待處理學生"]["移出"].Click += delegate //{ // // 將所選學生移出待處理 // Student.Instance.RemoveFromTemporal(Student.Instance.SelectedKeys); //}; //Student.Instance.RibbonBarItems["待處理學生"]["瀏覽"].Size = RibbonBarButton.MenuButtonSize.Small; //Student.Instance.RibbonBarItems["待處理學生"]["瀏覽"].Click += delegate //{ // // 瀏覽待處理學生 // K12.Presentation.NLDPanels.Student.DisplayStatus = DisplayStatus.Temp; // if ( K12.Presentation.NLDPanels.Student.DisplayStatus == DisplayStatus.Temp ) // K12.Presentation.NLDPanels.Student.SelectAll(); //}; //RibbonBarControlContainer rbiTemporaStudentManager = MotherForm.RibbonBarItems["學生", "待處理學生"].Controls["快速加入"]; //rbiTemporaStudentManager.Control = new JHSchool.Permrec.StudentExtendControls.Ribbon.TemporaStudentManager(); //MotherForm.RibbonBarItems["學生", "待處理學生"].SetTopContainer(ContainerType.Small); // 教育程度資料檔 RibbonBarItem rbiEducationData = Student.Instance.RibbonBarItems["教務"]; //rbiEducationData["新生作業"]["產生教育程度資料"].Image = Properties.Resources.capture_save_64; rbiEducationData["新生作業"]["產生教育程度資料"].Enable = User.Acl["JHSchool.Student.Ribbon0140"].Executable; rbiEducationData["新生作業"]["產生教育程度資料"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.EduAdminExtendCotnrols.EducationDataCreator.EducationCodeCreateForm edCreator = new JHSchool.Permrec.EduAdminExtendCotnrols.EducationDataCreator.EducationCodeCreateForm(); edCreator.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; #region 產生教育程度資料 - 刻意放2份程式碼 //rbiEducationData["畢業作業"]["產生教育程度資料"].Image = Properties.Resources.capture_save_64; rbiEducationData["畢業作業"]["產生教育程度資料"].Enable = User.Acl["JHSchool.Student.Ribbon0140"].Executable; rbiEducationData["畢業作業"]["產生教育程度資料"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.EduAdminExtendCotnrols.EducationDataCreator.EducationCodeCreateForm edCreator = new JHSchool.Permrec.EduAdminExtendCotnrols.EducationDataCreator.EducationCodeCreateForm(); edCreator.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; #endregion // 學生報表 // 轉出回條 MenuButton rbStudentReports = Student.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbStudentReports["轉出回條"].Enable = User.Acl["JHSchool.Student.Report0080"].Executable; rbStudentReports["轉出回條"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentBackToArticleForm sbtaf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentBackToArticleForm(); sbtaf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; string 轉出回條 = "ischool/國中系統/學生/報表/學籍/轉出回條"; FISCA.Features.Register(轉出回條, arg => { JHSchool.Permrec.StudentExtendControls.Reports.StudentBackToArticleForm sbtaf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentBackToArticleForm(); sbtaf.ShowDialog(); }); // 在學證明書_無成績 rbStudentReports["在學證明書(無成績)"].Enable = User.Acl["JHSchool.Student.Report0090"].Executable; rbStudentReports["在學證明書(無成績)"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentAtSchoolCertificateForm sascf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentAtSchoolCertificateForm(); sascf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; // 畢修業證明書相關資料 rbStudentReports["畢修業證明書相關資料"].Enable = User.Acl["JHSchool.Student.Report0100"].Executable; rbStudentReports["畢修業證明書相關資料"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentGraduateInfoManager sgim = new JHSchool.Permrec.StudentExtendControls.Reports.StudentGraduateInfoManager(); } else { MsgBox.Show("請選擇學生"); } }; // 轉學證明書 rbStudentReports["轉學證明書"].Enable = User.Acl["JHSchool.Student.Report0110"].Executable; rbStudentReports["轉學證明書"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentTransExportForm stff = new JHSchool.Permrec.StudentExtendControls.Reports.StudentTransExportForm(); stff.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; string URL轉學證明書 = "ischool/國中系統/學生/報表/學籍/轉學證明書"; FISCA.Features.Register(URL轉學證明書, arg => { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentTransExportForm stff = new JHSchool.Permrec.StudentExtendControls.Reports.StudentTransExportForm(); stff.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }); if (ModuleType == ModuleFlag.KaoHsiung) { // 休學證明書 rbStudentReports["休學證明書"].Enable = User.Acl["JHSchool.Permrec.StudentExtendControls.Reports.StudentLeaveForm"].Executable; rbStudentReports["休學證明書"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentLeaveForm slf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentLeaveForm(); slf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; } // 畢業證明書 rbStudentReports["畢業證明書"].Enable = User.Acl["JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateFormA"].Executable; rbStudentReports["畢業證明書"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateFormA sgcfa = new JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateFormA(); sgcfa.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; // 畢業證書 rbStudentReports["畢業證書"].Enable = User.Acl["JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateForm"].Executable; rbStudentReports["畢業證書"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateForm sgcf = new JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateForm(); sgcf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; #region 在教務作業上增加RibbonBar RibbonBarButton rbItemClassUpgrade = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["班級升級"]; rbItemClassUpgrade.Size = RibbonBarButton.MenuButtonSize.Medium; rbItemClassUpgrade.Image = Properties.Resources.btnUpgrade_Image; rbItemClassUpgrade.Enable = User.Acl["JHSchool.EduAdmin.Ribbon0110"].Executable; rbItemClassUpgrade.Click += delegate { JHSchool.Permrec.EduAdminExtendCotnrols.ClassUpgrade.ClassUpgradeForm CUF = new JHSchool.Permrec.EduAdminExtendCotnrols.ClassUpgrade.ClassUpgradeForm(); CUF.ShowDialog(); }; MenuButton rbItemTool05 = EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"]["產生畢業證書字號"]; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Image = Properties.Resources.graduated_write_64; EduAdmin.Instance.RibbonBarItems["批次作業/檢視"]["畢業作業"].Size = RibbonBarButton.MenuButtonSize.Medium; rbItemTool05.Enable = User.Acl["JHSchool.EduAdmin.Ribbon00801"].Executable; rbItemTool05.Click += delegate { EduAdminExtendCotnrols.StudGraduateDocNo.BatchStudGraduateDocNo BSGD = new JHSchool.Permrec.EduAdminExtendCotnrols.StudGraduateDocNo.BatchStudGraduateDocNo(); BSGD.ShowDialog(); }; //RibbonBarButton rbItem1 = EduAdmin.Instance.RibbonBarItems["學籍"]["名冊"]; //rbItem1.Size = RibbonBarButton.MenuButtonSize.Medium; //rbItem1.Image = GDResources.btnItemNameList_Image; //rbItem1.Enable = User.Acl["JHSchool.EduAdmin.Ribbon0060"].Executable; //rbItem1.Click += delegate //{ // JHSchool.Permrec.AffairExtendControls.GovernmentalDocument.Process.NameList.RegisterNames(); // new ListForm().ShowDialog(); //}; //RibbonBarItem ViewForm1 = EduAdmin.Instance.RibbonBarItems["學籍"]; //ViewForm1["異動資料檢視"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0070"].Executable; //ViewForm1["異動資料檢視"].Click += delegate //{ // UpdateRecordViewForm UpReViewForm = new UpdateRecordViewForm(); // UpReViewForm.ShowDialog(); //}; #endregion MenuButton rbClassStudentListRptItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassStudentListRptItem["班級名條"].Enable = User.Acl["JHSchool.Class.Report0000"].Executable; rbClassStudentListRptItem["班級名條"].Click += delegate { //JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentListRpt jcslr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentListRpt(); JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentListRptForm cslpr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentListRptForm(); cslpr.ShowDialog(); }; // 學生男女比例 MenuButton rbClassGenderPercentageItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassGenderPercentageItem["學生男女比例"].Enable = User.Acl["JHSchool.Class.Report0130"].Executable; rbClassGenderPercentageItem["學生男女比例"].Click += delegate { JHSchool.Permrec.ClassExtendControls.Reports.ClassGenderPercentageRpt csgrp = new JHSchool.Permrec.ClassExtendControls.Reports.ClassGenderPercentageRpt(); }; // 里鄰統計 MenuButton rbClassDistrictAreaCountItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassDistrictAreaCountItem["學生里鄰統計"].Enable = User.Acl["JHSchool.Class.Report0140"].Executable; rbClassDistrictAreaCountItem["學生里鄰統計"].Click += delegate { JHSchool.Permrec.ClassExtendControls.Reports.ClassDistrictAreaCountRpt csacr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassDistrictAreaCountRpt(); }; // 學生年齡統計 MenuButton rbClassStudentAgeCountItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassStudentAgeCountItem["學生年齡統計"].Enable = User.Acl["JHSchool.Class.Report0150"].Executable; rbClassStudentAgeCountItem["學生年齡統計"].Click += delegate { JHSchool.Permrec.ClassExtendControls.Reports.ClassAgePercentageRpt capr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassAgePercentageRpt(); capr.ShowDialog(); }; // 學生父母職業統計 MenuButton rbClassStudentJobCountItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassDistrictAreaCountItem["學生父母職業統計"].Enable = User.Acl["JHSchool.Class.Report0160"].Executable; rbClassDistrictAreaCountItem["學生父母職業統計"].Click += delegate { JHSchool.Permrec.ClassExtendControls.Reports.ClassParentJobPercentageRpt cpjpr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassParentJobPercentageRpt(); cpjpr.ShowDialog(); }; // 學生類別統計 MenuButton rbClassStudentTagCountItem = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; rbClassStudentTagCountItem["學生類別統計"].Enable = User.Acl["JHSchool.Class.Report0160"].Executable; rbClassStudentTagCountItem["學生類別統計"].Click += delegate { JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentTagCountRpt cstcr = new JHSchool.Permrec.ClassExtendControls.Reports.ClassStudentTagCountRpt(); cstcr.ShowDialog(); }; JHSchool.Class.Instance.SelectedListChanged += delegate { rbClassStudentListRptItem["班級名條"].Enable = (JHSchool.Class.Instance.SelectedKeys.Count > 0); }; /*在班級新增報表*/ MenuButton countGenderRecord = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; // 因討論先註解 //countGenderRecord["學生男女統計表"].Enable = false; //countGenderRecord["學生男女統計表"].Enable = User.Acl["JHSchool.Class.Report0010"].Executable; //countGenderRecord["學生男女統計表"].Click += delegate //{ // // countGenderRecord["學生男女統計表"].Enable = (JHSchool.Class.Instance.SelectedKeys.Count > 0); // new JHSchool.Permrec.ClassExtendControls.GenderCount().ShowDialog(); //}; #region 成績的東西,註解掉 //MenuButton classExamPrint = Class.Instance.RibbonBarItems["資料統計"]["報表"]["成績相關報表"]; // classExamPrint["班級考試成績單"].Enable = User.Acl["JHSchool.Class.Report0011"].Executable; //MenuButton btnSelectExamPrint = classExamPrint["班級考試成績單"]; //btnSelectExamPrint.Image = Properties.Resources.schedule_64; //btnSelectExamPrint.Click += delegate //{ // new JHSchool.Permrec.ClassExtendControls.SelectExamPrint().ShowDialog(); //}; // classExamPrint["班級考試成績單"].Enable = User.Acl["JHSchool.Class.Report0011"].Executable; //classExamPrint["班級學期領域成績一覽表"].Click += delegate //{ // new JHSchool.Permrec.ClassExtendControls.PrintClassDomainSemesterScore().ShowDialog(); //}; //classExamPrint["班級學期科目成績一覽表"].Click += delegate //{ // new JHSchool.Permrec.ClassExtendControls.PrintClassSubjectSemesterScore().ShowDialog(); //}; //classExamPrint["班級考試成績單"].Enable = false; //classExamPrint["班級學期領域成績一覽表"].Enable = false; //classExamPrint["班級學期科目成績一覽表"].Enable = false ; //當有被選取的班級時,才能執行 ... //JHSchool.Class.Instance.SelectedListChanged += delegate //{ // classExamPrint["班級考試成績單"].Enable = (JHSchool.Class.Instance.SelectedKeys.Count > 0); // classExamPrint["班級學期領域成績一覽表"].Enable = (JHSchool.Class.Instance.SelectedKeys.Count > 0); // //classExamPrint["班級學期科目成績一覽表"].Enable = (JHSchool.Class.Instance.SelectedKeys.Count > 0); //}; #endregion /*在學生中新增報表*/ Student.Instance.RibbonBarItems["資料統計"]["報表"].Image = Properties.Resources.paste_64; Student.Instance.RibbonBarItems["資料統計"]["報表"].Size = RibbonBarButton.MenuButtonSize.Large; Class.Instance.RibbonBarItems["資料統計"]["報表"].Image = Properties.Resources.paste_64; Class.Instance.RibbonBarItems["資料統計"]["報表"].Size = RibbonBarButton.MenuButtonSize.Large; Course.Instance.RibbonBarItems["資料統計"]["報表"].Image = Properties.Resources.paste_64; Course.Instance.RibbonBarItems["資料統計"]["報表"].Size = RibbonBarButton.MenuButtonSize.Large; MenuButton studentIdDocument = Student.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; MenuButton studentidClass = Class.Instance.RibbonBarItems["資料統計"]["報表"]["學籍相關報表"]; ////因為順序問題,所以放在這裡。 //LogViewfinder.PluginMain.RegisterEntityRibbon(); // 學生證給新竹舊式用 if (ModuleType == ModuleFlag.HsinChu) { studentIdDocument["學生證(舊)"].Enable = User.Acl["JHSchool.Student.Report0071"].Executable; studentIdDocument["學生證(舊)"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld sidf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld(JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld.UseModuleType.學生); sidf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; studentidClass["學生證(舊)"].Enable = User.Acl["JHSchool.Class.Report0121"].Executable; studentidClass["學生證(舊)"].Click += delegate { JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld sidfC = new JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld(JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardFormOld.UseModuleType.班級); sidfC.ShowDialog(); }; } studentIdDocument["學生證"].Enable = User.Acl["JHSchool.Student.Report0070"].Executable; studentIdDocument["學生證"].Click += delegate { if (Student.Instance.SelectedList.Count >= 1) { JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm sidf = new JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm(JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm.UseModuleType.學生); sidf.ShowDialog(); } else { MsgBox.Show("請選擇學生"); } }; studentidClass["學生證"].Enable = User.Acl["JHSchool.Class.Report0120"].Executable; studentidClass["學生證"].Click += delegate { JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm sidfC = new JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm(JHSchool.Permrec.StudentExtendControls.Reports.StudentIDCardForm.UseModuleType.班級); sidfC.ShowDialog(); }; // 匯出匯入異動 //由類別模組提供 RibbonBarButton rbUpdateRecordExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; //rbUpdateRecordExport["學籍相關匯出"]["匯出學生類別"].Enable = User.Acl["JHSchool.Student.Ribbon0300"].Executable; //rbUpdateRecordExport["學籍相關匯出"]["匯出學生類別"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Permrec.ImportExport.StudentTag.ExportStudentTag(); // JHSchool.Permrec.ImportExport.ExportStudentV2 wizard = new JHSchool.Permrec.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; RibbonBarButton rbUpdateRecordImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; //由類別模組提供 //rbUpdateRecordImport["學籍相關匯入"]["匯入學生類別"].Enable = User.Acl["JHSchool.Student.ImportExport.StudentTag.ImportStudentTag"].Executable; //rbUpdateRecordImport["學籍相關匯入"]["匯入學生類別"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer Importer = new JHSchool.Permrec.ImportExport.StudentTag.ImportStudentTag(); // JHSchool.Permrec.ImportExport.ImportStudentV2 wizard = new JHSchool.Permrec.ImportExport.ImportStudentV2(Importer.Text, Importer.Image); // Importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; RibbonBarButton rbTeacherTagRecordIE = Teacher.Instance.RibbonBarItems["資料統計"]["匯出"]; //由類別模組提供 //rbTeacherTagRecordIE["匯出教師類別"].Enable = User.Acl["JHSchool.Teacher.Ribbon0300"].Executable; //rbTeacherTagRecordIE["匯出教師類別"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Permrec.ImportExport.TeacherTag.ExportTeacherTag(); // JHSchool.Permrec.ImportExport.ExportTeacherV2 wizard = new JHSchool.Permrec.ImportExport.ExportTeacherV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; RibbonBarItem rbStudBatchAddressLatitude = Student.Instance.RibbonBarItems["其它"]; rbStudBatchAddressLatitude["查詢經緯度"].Image = Properties.Resources.world_zoom_64; rbStudBatchAddressLatitude["查詢經緯度"].Enable = User.Acl["JHSchool.Student.RibbonBatchAddressLatitude"].Executable; rbStudBatchAddressLatitude["查詢經緯度"].Click += delegate { JHSchool.Permrec.StudentExtendControls.Ribbon.BatchAddressLatitudeForm balf = new JHSchool.Permrec.StudentExtendControls.Ribbon.BatchAddressLatitudeForm(); balf.ShowDialog(); }; // 匯出匯入畢業資訊 RibbonBarButton rbGraduateInfoExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; rbGraduateInfoExport["學籍相關匯出"]["匯出畢業資訊"].Enable = User.Acl["JHSchool.Permrec.ImportExport.GraduateInfo.ExportGraduateInfo"].Executable; rbGraduateInfoExport["學籍相關匯出"]["匯出畢業資訊"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporterGradInfo = new JHSchool.Permrec.ImportExport.GraduateInfo.ExportGraduateInfo(); JHSchool.Permrec.ImportExport.ExportStudentV2 wizardGradInfo = new JHSchool.Permrec.ImportExport.ExportStudentV2(exporterGradInfo.Text, exporterGradInfo.Image); exporterGradInfo.InitializeExport(wizardGradInfo); wizardGradInfo.ShowDialog(); }; RibbonBarButton rbGraduateInfoImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; rbGraduateInfoImport["學籍相關匯入"]["匯入畢業資訊"].Enable = User.Acl["JHSchool.Permrec.ImportExport.GraduateInfo.ImportGraduateInfo"].Executable; rbGraduateInfoImport["學籍相關匯入"]["匯入畢業資訊"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer Importer = new JHSchool.Permrec.ImportExport.GraduateInfo.ImportGraduateInfo(); JHSchool.Permrec.ImportExport.ImportStudentV2 wizard = new JHSchool.Permrec.ImportExport.ImportStudentV2(Importer.Text, Importer.Image); Importer.InitializeImport(wizard); wizard.ShowDialog(); }; #region 註冊權限管理 //學生 Catalog detail = RoleAclSource.Instance["學生"]["資料項目"]; detail.Add(new DetailItemFeature(typeof(StudentExtendControls.DiplomaInfoPalmerworm))); detail.Add(new DetailItemFeature(typeof(StudentExtendControls.AddressPalmerwormItem))); detail.Add(new DetailItemFeature(typeof(StudentExtendControls.ParentInfoPalmerwormItem))); // 學生電話功能先移除 //detail.Add(new DetailItemFeature(typeof(StudentExtendControls.PhonePalmerwormItem))); detail.Add(new DetailItemFeature(typeof(JHSchool.Permrec.StudentExtendControls.ClassItem))); detail.Add(new DetailItemFeature(typeof(StudentExtendControls.BeforeEnrollmentItem))); detail.Add(new DetailItemFeature(typeof(JHSchool.Permrec.StudentExtendControls.SemesterHistoryDetail))); Catalog studReportRoleAcl = RoleAclSource.Instance["學生"]["報表"]; studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0070", "學生證")); if (ModuleType == ModuleFlag.HsinChu) { studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0071", "學生證(舊)")); } studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0080", "轉出回條")); studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0090", "在學證明書(無成績)")); studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0100", "畢修業證明書相關資料")); studReportRoleAcl.Add(new ReportFeature("JHSchool.Student.Report0110", "轉學證明書")); if (ModuleType == ModuleFlag.KaoHsiung) { studReportRoleAcl.Add(new ReportFeature("JHSchool.Permrec.StudentExtendControls.Reports.StudentLeaveForm", "休學證明書")); } studReportRoleAcl.Add(new ReportFeature("JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateFormA", "畢業證明書")); studReportRoleAcl.Add(new ReportFeature("JHSchool.Permrec.StudentExtendControls.Reports.StudGraduateCertficateForm", "畢業證書")); Catalog StudFunctionButtonRoleAcl = RoleAclSource.Instance["學生"]["功能按鈕"]; //StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.Ribbon0120", "匯出照片")); //StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.Ribbon0130", "匯入照片")); StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.Ribbon0140", "產生教育程度資料")); //StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.Ribbon0300", "匯出學生類別")); StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.RibbonBatchAddressLatitude", "查詢經緯度")); //StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Student.ImportExport.StudentTag.ImportStudentTag", "匯入學生類別")); StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Permrec.ImportExport.GraduateInfo.ExportGraduateInfo", "匯出畢業資訊")); StudFunctionButtonRoleAcl.Add(new RibbonFeature("JHSchool.Permrec.ImportExport.GraduateInfo.ImportGraduateInfo", "匯入畢業資訊")); // 教師 Catalog TeacherFuncButtonRoleAcl = RoleAclSource.Instance["教師"]["功能按鈕"]; //TeacherFuncButtonRoleAcl.Add(new RibbonFeature("JHSchool.Teacher.Ribbon0300", "匯出教師類別")); //班級 detail = RoleAclSource.Instance["班級"]["資料項目"]; detail.Add(new DetailItemFeature(typeof(JHSchool.Permrec.ClassExtendControls.ClassStudentItem))); Catalog report = RoleAclSource.Instance["班級"]["報表"]; report.Add(new ReportFeature("JHSchool.Class.Report0000", "班級名條")); report.Add(new ReportFeature("JHSchool.Class.Report0120", "學生證")); if (ModuleType == ModuleFlag.HsinChu) { report.Add(new ReportFeature("JHSchool.Class.Report0121", "學生證(舊)")); } report.Add(new ReportFeature("JHSchool.Class.Report0130", "學生男女比例")); report.Add(new ReportFeature("JHSchool.Class.Report0140", "學生里鄰統計")); report.Add(new ReportFeature("JHSchool.Class.Report0150", "學生年齡統計")); report.Add(new ReportFeature("JHSchool.Class.Report0160", "學生父母職業統計")); //教務作業 Catalog ribbon = RoleAclSource.Instance["教務作業"]; ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0110", "班級升級")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon00801", "產生異業證書字號")); #endregion Dictionary <string, string> _PermanentTelDic = new Dictionary <string, string>(); Dictionary <string, string> _ContactTelDic = new Dictionary <string, string>(); #region 戶籍電話欄位 FISCA.Presentation.ListPaneField PermanentTelField = new ListPaneField("戶籍電話"); PermanentTelField.GetVariable += delegate(object sender, GetVariableEventArgs e) { if (_PermanentTelDic.ContainsKey(e.Key)) { e.Value = _PermanentTelDic[e.Key]; } else { e.Value = string.Empty; } }; PermanentTelField.PreloadVariableBackground += delegate(object sender, PreloadVariableEventArgs e) { _PermanentTelDic.Clear(); foreach (JHSchool.Data.JHPhoneRecord PhoneRec in JHSchool.Data.JHPhone.SelectByStudentIDs(e.Keys)) { if (!_PermanentTelDic.ContainsKey(PhoneRec.RefStudentID)) { _PermanentTelDic.Add(PhoneRec.RefStudentID, PhoneRec.Permanent); } } }; //Student.Instance.AddListPaneField(PermanentTelField); // 加入戶籍電話權限管理 if (User.Acl["Student.Field.戶籍電話"].Executable) { Student.Instance.AddListPaneField(PermanentTelField); } Catalog ribbonField = RoleAclSource.Instance["學生"]["清單欄位"]; ribbonField.Add(new RibbonFeature("Student.Field.戶籍電話", "戶籍電話")); //AsyncFieldLoader<Phone, PhoneRecord> field = new AsyncFieldLoader<Phone, PhoneRecord>(Phone.Instance, "戶籍電話"); //field.GetValue += delegate(object sender, GetValueEventArgs e) //{ // if (Phone.Instance[e.Key] != null) // e.Value = Phone.Instance[e.Key].Permanent; // else // e.Value = string.Empty; //}; //Student.Instance.AddListPaneField(field.Field); #endregion #region 聯絡電話 FISCA.Presentation.ListPaneField ContactTelField = new ListPaneField("聯絡電話"); ContactTelField.GetVariable += delegate(object sender, GetVariableEventArgs e) { if (_ContactTelDic.ContainsKey(e.Key)) { e.Value = _ContactTelDic[e.Key]; } else { e.Value = string.Empty; } }; ContactTelField.PreloadVariableBackground += delegate(object sender, PreloadVariableEventArgs e) { _ContactTelDic.Clear(); foreach (JHSchool.Data.JHPhoneRecord PhoneRec in JHSchool.Data.JHPhone.SelectByStudentIDs(new List <string>(e.Keys))) { if (!_ContactTelDic.ContainsKey(PhoneRec.RefStudentID)) { _ContactTelDic.Add(PhoneRec.RefStudentID, PhoneRec.Contact); } } }; //Student.Instance.AddListPaneField(ContactTelField); // 加入聯絡電話權限管理 if (User.Acl["Student.Field.聯絡電話"].Executable) { Student.Instance.AddListPaneField(ContactTelField); } ribbonField = RoleAclSource.Instance["學生"]["清單欄位"]; ribbonField.Add(new RibbonFeature("Student.Field.聯絡電話", "聯絡電話")); //AsyncFieldLoader<Phone, PhoneRecord> telfield1 = new AsyncFieldLoader<Phone, PhoneRecord>(Phone.Instance, "聯絡電話"); //telfield1.GetValue += delegate(object sender, GetValueEventArgs e) //{ // if (Phone.Instance[e.Key] != null) // e.Value = Phone.Instance[e.Key].Contact; // else // e.Value = string.Empty; //}; //Student.Instance.AddListPaneField(telfield1.Field); #endregion #region 監護人 Dictionary <string, string> _CustodianFieldDic = new Dictionary <string, string>(); CustodianField = new ListPaneField("監護人"); CustodianField.GetVariable += delegate(object sender, GetVariableEventArgs e) { if (_CustodianFieldDic.ContainsKey(e.Key)) { e.Value = _CustodianFieldDic[e.Key]; } else { e.Value = string.Empty; } }; CustodianField.PreloadVariableBackground += delegate(object sender, PreloadVariableEventArgs e) { _CustodianFieldDic.Clear(); foreach (JHSchool.Data.JHParentRecord ParentRec in JHSchool.Data.JHParent.SelectByStudentIDs(new List <string>(e.Keys))) { if (!_CustodianFieldDic.ContainsKey(ParentRec.RefStudentID)) { _CustodianFieldDic.Add(ParentRec.RefStudentID, ParentRec.Custodian.Name); } } }; Student.Instance.AddListPaneField(CustodianField); //AsyncFieldLoader<Parent, ParentRecord> parent1 = new AsyncFieldLoader<Parent, ParentRecord>(Parent.Instance, "監護人"); //parent1.GetValue += delegate(object sender, GetValueEventArgs e) //{ // if (Parent.Instance[e.Key] != null) // e.Value = Parent.Instance[e.Key].Custodian.Name; // else // e.Value = string.Empty; //}; //Student.Instance.AddListPaneField(parent1.Field); #endregion #region 畢業國小 // 新寫法 Dictionary <string, string> _BeforeInfoFieldDic = new Dictionary <string, string>(); FISCA.Presentation.ListPaneField BeforeInfoField = new ListPaneField("畢業國小"); BeforeInfoField.GetVariable += delegate(object sender, GetVariableEventArgs e) { if (_BeforeInfoFieldDic.ContainsKey(e.Key)) { e.Value = _BeforeInfoFieldDic[e.Key]; } else { e.Value = string.Empty; } }; BeforeInfoField.PreloadVariableBackground += delegate(object sender, PreloadVariableEventArgs e) { _BeforeInfoFieldDic.Clear(); foreach (JHSchool.Data.JHBeforeEnrollmentRecord be in JHSchool.Data.JHBeforeEnrollment.SelectByStudentIDs(e.Keys)) { if (!_BeforeInfoFieldDic.ContainsKey(be.RefStudentID)) { _BeforeInfoFieldDic.Add(be.RefStudentID, be.School); } } }; Student.Instance.AddListPaneField(BeforeInfoField); //AsyncFieldLoader<BeforeInfoRec, JHSchool.Data.JHBeforeEnrollmentRecord> grad = new AsyncFieldLoader<BeforeInfoRec, JHSchool.Data.JHBeforeEnrollmentRecord>(BeforeInfoRec.Instance, "畢業國小"); //grad.GetValue += delegate(object sender, GetValueEventArgs e) //{ // if (BeforeInfoRec.Instance[e.Key] != null) // e.Value = BeforeInfoRec.Instance[e.Key].School; // else // e.Value = string.Empty; //}; //Student.Instance.AddListPaneField(grad.Field); #endregion #region 搜尋(畢業國小) //TODO 因為 Presentation 不支援非同步搜尋,所以先拿掉。 //ConfigData cd = User.Configuration["StudentSearchOptionPreference"]; //SearchGraduateSchool = Student.Instance.SearchConditionMenu["畢業國小"]; //SearchGraduateSchool.AutoCheckOnClick = true; //SearchGraduateSchool.AutoCollapseOnClick = false; //SearchGraduateSchool.Checked = cd.GetBoolean("SearchGraduateSchool", false); //預設不要尋找這種的。 //SearchGraduateSchool.Click += delegate //{ // cd.SetBoolean("SearchGraduateSchool", SearchGraduateSchool.Checked); // BackgroundWorker async = new BackgroundWorker(); // async.DoWork += delegate(object sender, DoWorkEventArgs e) { (e.Argument as ConfigData).Save(); }; // async.RunWorkerAsync(cd); //}; //TODO 新的 Presentation 不支援這種的。 //Student.Instance.SearchAsync += new EventHandler<SearchEventArgs>(Instance_SearchAsync); #endregion //Student.Instance.RibbonBarItems["測試"]["測"].Click += delegate //{ // List<string> keys = Class.Instance.SelectedList[0].Students.AsKeyList(); // BackgroundWorker worker = new BackgroundWorker(); // worker.DoWork += delegate // { // for (int i = 0; i < keys.Count; i++) // { // List<UpdateRecordRecord> r1 = UpdateRecord.Instance[keys[i]]; // } // }; // worker.RunWorkerAsync(); // for (int i = 0; i < keys.Count; i++) // { // List<UpdateRecordRecord> r2 = UpdateRecord.Instance[keys[i]]; // } //}; }
/// <summary> /// 設定使用者介面 /// </summary> public void SetupPresentation() { if (_initialized) { return; } #region 課程加入授課教師 Course.Instance.SelectedListChanged += delegate { assignTeacherButton.Enable = (Course.Instance.SelectedList.Count > 0 && Teacher.Instance.TemporaList.Count > 0); }; Teacher.Instance.TemporaListChanged += delegate { assignTeacherButton.Enable = (Course.Instance.SelectedList.Count > 0 && Teacher.Instance.TemporaList.Count > 0); }; assignTeacherButton = Course.Instance.RibbonBarItems["指定"]["評分教師"]; assignTeacherButton.Enable = false; assignTeacherButton.Image = Properties.Resources.teacher_64; MenuButton loadingMenuButton = assignTeacherButton["載入中…"]; assignTeacherButton.PopupOpen += delegate(object sender, PopupOpenEventArgs e) { if (Teacher.Instance.TemporaList.Count <= 0) { return; } if (Course.Instance.SelectedList.Count <= 0) { return; } loadingMenuButton.Visible = false; foreach (var item in Teacher.Instance.TemporaList) { MenuButton mb = e.VirtualButtons[item.Name]; mb.Tag = item; mb.Click += new EventHandler(MenuButton_Click); } }; #endregion #region 授課教師 ListPanelField teacherField = new ListPaneField("授課教師"); teacherField.GetVariable += delegate(object sender, GetVariableEventArgs e) { string teacherName = ""; if (TCInstruct.Instance.Loaded) { TeacherRecord teacher1 = Course.Instance[e.Key].GetFirstTeacher(); if (teacher1 != null) { teacherName += teacher1.FullName; } TeacherRecord teacher2 = Course.Instance[e.Key].GetSecondTeacher(); if (teacher2 != null) { if (teacherName.Length > 0) { teacherName += "," + teacher2.FullName; } else { teacherName += teacher2.FullName; } } TeacherRecord teacher3 = Course.Instance[e.Key].GetThirdTeacher(); if (teacher3 != null) { if (teacherName.Length > 0) { teacherName += "," + teacher3.FullName; } else { teacherName += teacher3.FullName; } } if (teacherName.Length > 0) { e.Value = teacherName; } else { e.Value = string.Empty; } } else { e.Value = "Loading..."; } }; Course.Instance.AddListPaneField(teacherField); #endregion _initialized = true; }
public static void Main() { #region SyncAllBackground //授課教師 if (!TCInstruct.Instance.Loaded) { TCInstruct.Instance.SyncAllBackground(); } //修課記錄 //if (!SCAttend.Instance.Loaded) SCAttend.Instance.SyncAllBackground(); //課程規劃 if (!ProgramPlan.Instance.Loaded) { ProgramPlan.Instance.SyncAllBackground(); } //計算規則 if (!ScoreCalcRule.Instance.Loaded) { ScoreCalcRule.Instance.SyncAllBackground(); } //評量設定 if (!AssessmentSetup.Instance.Loaded) { AssessmentSetup.Instance.SyncAllBackground(); } #endregion #region SetupPresentation //授課教師 TCInstruct.Instance.SetupPresentation(); //修課記錄 SCAttend.Instance.SetupPresentation(); //課程規劃 ProgramPlan.Instance.SetupPresentation(); //計算規則 ScoreCalcRule.Instance.SetupPresentation(); //評量設定 AssessmentSetup.Instance.SetupPresentation(); #endregion // 當授課教師變更 FISCA.InteractionService.SubscribeEvent("JH_CourseTeacherChange", (sender, args) => { TCInstruct.Instance.SyncAllBackground(); }); #region ContentItem 資料項目 //學期成績 //Student.Instance.AddDetailBulider(new DetailBulider<SemesterScoreItem>()); //Student.Instance.AddDetailBulider(new DetailBulider<DLScoreItem>()); //課程基本資訊 Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider <CourseExtendControls.BasicInfoItem>()); //成績計算 Course.Instance.AddDetailBulider(new DetailBulider <ScoreCalcSetupItem>()); //修課學生 Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider <SCAttendItem>()); //電子報表(因相關功能未完成先註) //Course.Instance.AddDetailBulider(new JHSchool.Legacy.ContentItemBulider<CourseExtendControls.ElectronicPaperItem>()); //班級課程規劃 Class.Instance.AddDetailBulider(new DetailBulider <ClassExtendControls.ClassBaseInfoItem_Extend>()); //暫時註解 //個人活動表現紀錄 //Student.Instance.AddDetailBulider(new DetailBulider<StudentActivityRecordItem>()); // 2017/5/9 穎驊 註解 下面位子 搬去 JHEvaluation.ScoreCalculation //畢業成績 //Student.Instance.AddDetailBulider(new DetailBulider<GraduationScoreItem>()); //修課及評量成績 //Student.Instance.AddDetailBulider(new DetailBulider<CourseScoreItem>()); #endregion #region RibbonBar NLDPanels.Student.RibbonBarItems["教務"]["成績作業"].Size = RibbonBarButton.MenuButtonSize.Large; NLDPanels.Student.RibbonBarItems["教務"]["成績作業"].Image = Properties.Resources.calc_save_64; NLDPanels.Student.RibbonBarItems["教務"]["畢業作業"].Size = RibbonBarButton.MenuButtonSize.Large; NLDPanels.Student.RibbonBarItems["教務"]["畢業作業"].Image = Properties.Resources.graduated_write_64; #region 學生/資料統計/報表 RibbonBarButton rbButton = Student.Instance.RibbonBarItems["資料統計"]["報表"]; // 2017/5/9 穎驊 註解 下面位子 搬去 JHEvaluation.ScoreCalculation //rbButton["成績相關報表"]["畢業預警報表"].Enable = User.Acl["JHSchool.Student.Report0010"].Executable; //rbButton["成績相關報表"]["畢業預警報表"].Click += delegate //{ // if (Student.Instance.SelectedList.Count <= 0) return; // JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationPredictReport report = new JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationPredictReport(Student.Instance.SelectedList); //}; //rbButton["學務相關報表"]["畢業預警報表"].Enable = User.Acl["JHSchool.Student.Report0010"].Executable; //rbButton["學務相關報表"]["畢業預警報表"].Click += delegate //{ // if (Student.Instance.SelectedList.Count <= 0) return; // JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationPredictReport report = new JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationPredictReport(Student.Instance.SelectedList); //}; #endregion #region 學生/資料統計/匯入匯出 RibbonBarButton rbItemExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; RibbonBarButton rbItemImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; //rbItemExport["匯出學期科目成績"].Enable = User.Acl["JHSchool.Student.Ribbon0180"].Executable; //rbItemExport["匯出學期科目成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportSemesterSubjectScore(); // JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; //rbItemExport["匯出學期領域成績"].Enable = User.Acl["JHSchool.Student.Ribbon0181"].Executable; //rbItemExport["匯出學期領域成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportSemesterDomainScore(); // JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; //rbItemExport["匯出畢業成績"].Enable = User.Acl["JHSchool.Student.Ribbon0182"].Executable; //rbItemExport["匯出畢業成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportGradScore(); // JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; rbItemExport["成績相關匯出"]["匯出課程成績"].Enable = User.Acl["JHSchool.Student.Ribbon0183"].Executable; rbItemExport["成績相關匯出"]["匯出課程成績"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportCourseScore(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemExport["成績相關匯出"]["匯出學期歷程"].Enable = User.Acl["JHSchool.Student.Ribbon0169"].Executable; rbItemExport["成績相關匯出"]["匯出學期歷程"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportSemesterHistory(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; //rbItemExport["匯出評量成績"].Enable = User.Acl["JHSchool.Student.Ribbon0184"].Executable; //rbItemExport["匯出評量成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.ExportExamScore(); // JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; //rbItemImport["匯入學期科目成績"].Enable = User.Acl["JHSchool.Student.Ribbon0190"].Executable; //rbItemImport["匯入學期科目成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportSemesterSubjectScore(); // JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); // importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; //rbItemImport["匯入學期領域成績"].Enable = User.Acl["JHSchool.Student.Ribbon0191"].Executable; //rbItemImport["匯入學期領域成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportSemesterDomainScore(); // JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); // importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; //rbItemImport["匯入畢業成績"].Enable = User.Acl["JHSchool.Student.Ribbon0192"].Executable; //rbItemImport["匯入畢業成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportGradScore(); // JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); // importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; rbItemImport["成績相關匯入"]["匯入課程成績"].Enable = User.Acl["JHSchool.Student.Ribbon0193"].Executable; rbItemImport["成績相關匯入"]["匯入課程成績"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportCourseScore(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; rbItemImport["成績相關匯入"]["匯入學期歷程"].Enable = User.Acl["JHSchool.Student.Ribbon0170"].Executable; rbItemImport["成績相關匯入"]["匯入學期歷程"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportSemesterHistory(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; //rbItemImport["匯入評量成績"].Enable = User.Acl["JHSchool.Student.Ribbon0194"].Executable; //rbItemImport["匯入評量成績"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.ImportExamScore(); // JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); // importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; #endregion #region 學生/教務 //移到成績計算模組。 RibbonBarItem rbItem = Student.Instance.RibbonBarItems["教務"]; //rbItem["畢業資格審查"].Enable = User.Acl["JHSchool.Student.Ribbon0058"].Executable; //rbItem["畢業資格審查"].Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.graduation_64; //rbItem["畢業資格審查"].Click += delegate //{ // if (Student.Instance.SelectedList.Count == 0) return; // Form form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationInspectWizard("Student"); // form.ShowDialog(); //}; #endregion #region 學生/成績/排名 /** 程式碼移動到 JHEvaluation.Rating Module 中。*/ //rbButton = Student.Instance.RibbonBarItems["成績"]["排名"]; //rbButton.Enable = User.Acl["JHSchool.Student.Ribbon0059"].Executable; //rbButton["評量科目成績排名"].Enable = true; //rbButton["評量科目成績排名"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormExamSubject form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormExamSubject(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; ////rbButton.Enable = User.Acl[""].Executable; //rbButton["評量領域成績排名"].Enable = true; //rbButton["評量領域成績排名"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormExamDomain form= new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormExamDomain(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; //rbButton["學期科目成績排名"].Enable = true; //rbButton["學期科目成績排名"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemesterSubject form= new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemesterSubject(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; //rbButton["學期領域成績排名"].Enable = true; //rbButton["學期領域成績排名"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemesterDomain form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemesterDomain(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; //rbButton["學期科目成績排名(多學期)"].Enable = true; //rbButton["學期科目成績排名(多學期)"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemestersSubject form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemestersSubject(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; //rbButton["學期領域成績排名(多學期)"].Enable = true; //rbButton["學期領域成績排名(多學期)"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemestersDomain form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormSemestersDomain(); // form.SetRatingStudents(K12.Presentation.NLDPanels.Student.SelectedSource); // form.ShowDialog(); // } //}; //rbButton["畢業成績排名"].Enable = true; //rbButton["畢業成績排名"].Click += delegate //{ // if (Student.Instance.SelectedList.Count > 0) // { // Form form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.Rating.FormGraduation(); // form.ShowDialog(); // } //}; #endregion #region 班級/資料統計/報表 MenuButton semsGoodStudentReportButton = Class.Instance.RibbonBarItems["資料統計"]["報表"]["成績相關報表"]["學期優異表現名單"]; semsGoodStudentReportButton.Enable = User.Acl["JHSchool.Class.Report0180"].Executable; semsGoodStudentReportButton.Click += delegate { if (Class.Instance.SelectedList.Count > 0) { Form form = new JHSchool.Evaluation.ClassExtendControls.Ribbon.Score.SemsGoodStudentReport.SemsGoodStudentReport(); form.ShowDialog(); } }; #endregion #region 班級/教務 rbButton = K12.Presentation.NLDPanels.Class.RibbonBarItems["教務"]["班級開課"]; //rbButton = Class.Instance.RibbonBarItems["成績"]["班級開課"]; rbButton.Enable = User.Acl["JHSchool.Class.Ribbon0070"].Executable; rbButton.Image = Properties.Resources.organigram_refresh_64; rbButton["依課程規劃表開課"].Click += delegate { if (K12.Presentation.NLDPanels.Class.SelectedSource.Count > 0) { JHSchool.Evaluation.ClassExtendControls.Ribbon.CreateCoursesByProgramPlan.Run(); } }; rbButton["直接開課"].Click += delegate { if (Class.Instance.SelectedList.Count > 0) { new JHSchool.Evaluation.ClassExtendControls.Ribbon.CreateCoursesDirectly(); } }; #endregion #region 課程/編輯 rbItem = Course.Instance.RibbonBarItems["編輯"]; rbButton = rbItem["新增"]; rbButton.Size = RibbonBarButton.MenuButtonSize.Large; rbButton.Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.btnAddCourse; rbButton.Enable = User.Acl["JHSchool.Course.Ribbon0000"].Executable; rbButton.Click += delegate { new JHSchool.Evaluation.CourseExtendControls.Ribbon.AddCourse().ShowDialog(); }; rbButton = rbItem["刪除"]; rbButton.Size = RibbonBarButton.MenuButtonSize.Large; rbButton.Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.btnDeleteCourse; rbButton.Enable = false; rbButton.Click += delegate { //2018/3/26 穎驊註記 下列為舊的 刪除課程,一次僅能一筆,且如果內有資料,則無法刪除,也不會有Log 紀錄 //if (Course.Instance.SelectedKeys.Count == 1) //{ // JHSchool.Data.JHCourseRecord record = JHSchool.Data.JHCourse.SelectByID(Course.Instance.SelectedKeys[0]); // //int CourseAttendCot = Course.Instance.Items[record.ID].GetAttendStudents().Count; // List<JHSchool.Data.JHSCAttendRecord> scattendList = JHSchool.Data.JHSCAttend.SelectByStudentIDAndCourseID(new List<string>() { }, new List<string>() { record.ID }); // int attendStudentCount = 0; // foreach (JHSchool.Data.JHSCAttendRecord scattend in scattendList) // { // if (scattend.Student.Status == K12.Data.StudentRecord.StudentStatus.一般) // attendStudentCount++; // } // if (attendStudentCount > 0) // MsgBox.Show(record.Name + " 有" + attendStudentCount.ToString() + "位修課學生,請先移除修課學生後再刪除課程."); // else // { // string msg = string.Format("確定要刪除「{0}」?", record.Name); // if (MsgBox.Show(msg, "刪除課程", MessageBoxButtons.YesNo) == DialogResult.Yes) // { // #region 自動刪除非一般學生的修課記錄 // List<JHSchool.Data.JHSCAttendRecord> deleteSCAttendList = new List<JHSchool.Data.JHSCAttendRecord>(); // foreach (JHSchool.Data.JHSCAttendRecord scattend in scattendList) // { // JHSchool.Data.JHStudentRecord stuRecord = JHSchool.Data.JHStudent.SelectByID(scattend.RefStudentID); // if (stuRecord == null) continue; // if (stuRecord.Status != K12.Data.StudentRecord.StudentStatus.一般) // deleteSCAttendList.Add(scattend); // } // List<string> studentIDs = new List<string>(); // foreach (JHSchool.Data.JHSCAttendRecord scattend in deleteSCAttendList) // studentIDs.Add(scattend.RefStudentID); // List<JHSchool.Data.JHSCETakeRecord> sceList = JHSchool.Data.JHSCETake.SelectByStudentAndCourse(studentIDs, new List<string>() { record.ID }); // JHSchool.Data.JHSCETake.Delete(sceList); // JHSchool.Data.JHSCAttend.Delete(deleteSCAttendList); // #endregion // JHSchool.Data.JHCourse.Delete(record); // //CourseRecordEditor crd = Course.Instance.Items[record.ID].GetEditor(); // //crd.Remove = true; // //crd.Save(); // // 加這主要是重新整理 // Course.Instance.SyncDataBackground(record.ID); // } // else // return; // } //} if (MsgBox.Show("本功能將會將所選全部課程移除,請問是否繼續?", "批次刪除課程", MessageBoxButtons.YesNo) == DialogResult.Yes) { List <JHSchool.Data.JHCourseRecord> record_list = JHSchool.Data.JHCourse.SelectByIDs(Course.Instance.SelectedKeys); //課程資料 List <string> courseIDList = new List <string>(); foreach (JHSchool.Data.JHCourseRecord r in record_list) { courseIDList.Add(r.ID); } // 學生參與課堂紀錄 List <JHSchool.Data.JHSCAttendRecord> scattendList = JHSchool.Data.JHSCAttend.SelectByStudentIDAndCourseID(new List <string>() { }, courseIDList); List <string> scattendIDList = new List <string>(); List <string> studentIDList = new List <string>(); foreach (JHSchool.Data.JHSCAttendRecord r in scattendList) { scattendIDList.Add(r.ID); studentIDList.Add(r.RefStudentID); } //學生課堂考試紀錄 List <JHSchool.Data.JHSCETakeRecord> sceList = JHSchool.Data.JHSCETake.SelectByStudentAndCourse(new List <string>() { }, courseIDList); Dictionary <string, List <JHSchool.Data.JHSCETakeRecord> > studentScoreDict = new Dictionary <string, List <Data.JHSCETakeRecord> >(); //用RefStudentID 整理個學生的成績 foreach (JHSchool.Data.JHSCETakeRecord jhscetr in sceList) { if (!studentScoreDict.ContainsKey(jhscetr.RefStudentID)) { studentScoreDict.Add(jhscetr.RefStudentID, new List <Data.JHSCETakeRecord>()); studentScoreDict[jhscetr.RefStudentID].Add(jhscetr); } else { studentScoreDict[jhscetr.RefStudentID].Add(jhscetr); } } List <string> WarningList = new List <string>(); System.Text.StringBuilder sb1 = new System.Text.StringBuilder(); foreach (KeyValuePair <string, List <JHSchool.Data.JHSCETakeRecord> > p in studentScoreDict) { sb1.AppendLine("學生:" + p.Value[0].Student.Name + ",於"); foreach (JHSchool.Data.JHSCETakeRecord r in p.Value) { sb1.AppendLine("課程:" + r.Course.Name + ",試別:" + r.Exam.Name + ",含有分數:" + r.Score + "資料"); } WarningList.Add(sb1.ToString()); sb1.Clear(); } string warning_total = string.Format("發現「{0}」位學生在課程具有成績資料,請問是否仍要刪除?", WarningList.Count); System.Text.StringBuilder sb2 = new System.Text.StringBuilder(); sb2.AppendLine(warning_total); foreach (string s in WarningList) { sb2.AppendLine(s); } // 假如刪除的學生中,有人有成績資料,則提醒使用者是否要刪掉 if (sceList.Count > 0) { DeleteCourseWarningForm dcwf = new DeleteCourseWarningForm(warning_total, studentScoreDict); if (dcwf.ShowDialog() == DialogResult.Yes) { DeleteCourseWithLogSQL(); } //if (MsgBox.Show(sb2.ToString(), "批次刪除課程", MessageBoxButtons.YesNo) == DialogResult.Yes) //{ // DeleteCourseWithLogSQL(); //} } else { DeleteCourseWithLogSQL(); } } }; //2018/3/26 穎驊註解,將此功能一併併入刪除處理 //////2018/3/9 穎驊註解,此為因應高雄小組項目 [09-05][04] 批次刪除課程功能 所新增的功能 //rbButton = rbItem["批次刪除修課學生"]; //rbButton.Size = RibbonBarButton.MenuButtonSize.Large; //rbButton.Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.btnDeleteStudent_Image; ////2018/3/9 穎驊註解,暫時找不到期註冊開放權限的Code,先跟隨 刪除課程的設定 //rbButton.Enable = false; //rbButton.Click += delegate //{ // if (MsgBox.Show("本功能將會將所選課程的全部修課學生移除,請問是否繼續?", "批次刪除修課學生", MessageBoxButtons.YesNo) == DialogResult.Yes) // { // List<JHSchool.Data.JHCourseRecord> record_list = JHSchool.Data.JHCourse.SelectByIDs(Course.Instance.SelectedKeys); // //課程資料 // List<string> courseIDList = new List<string>(); // foreach (JHSchool.Data.JHCourseRecord r in record_list) // { // courseIDList.Add(r.ID); // } // // 學生參與課堂紀錄 // List<JHSchool.Data.JHSCAttendRecord> scattendList = JHSchool.Data.JHSCAttend.SelectByStudentIDAndCourseID(new List<string>() { }, courseIDList); // List<string> scattendIDList = new List<string>(); // foreach (JHSchool.Data.JHSCAttendRecord r in scattendList) // { // scattendIDList.Add(r.ID); // } // //學生課堂考試紀錄 // List<JHSchool.Data.JHSCETakeRecord> sceList = JHSchool.Data.JHSCETake.SelectByIDs(scattendIDList); // // 假如刪除的學生中,有人有成績資料,則提醒使用者是否要刪掉 // if (sceList.Count > 0) // { // if (MsgBox.Show("發現有學生在課程具有成績資料,請問是否仍要刪除?", "批次刪除修課學生", MessageBoxButtons.YesNo) == DialogResult.Yes) // { // } // } // } //}; RibbonBarButton CouItem1 = Course.Instance.RibbonBarItems["編輯"]["刪除"]; //RibbonBarButton CouItem2 = Course.Instance.RibbonBarItems["編輯"]["批次刪除修課學生"]; Course.Instance.SelectedListChanged += delegate { // 課程刪除不能多選 //CouItem1.Enable = (Course.Instance.SelectedList.Count < 2) && User.Acl["JHSchool.Course.Ribbon0010"].Executable; CouItem1.Enable = User.Acl["JHSchool.Course.Ribbon0010"].Executable; ////2018/3/9 穎驊註解,批次刪除學生至少要選一 //CouItem2.Enable = (Course.Instance.SelectedList.Count > 0) && User.Acl["JHSchool.Course.Ribbon0010"].Executable; }; #endregion #region 課程/資料統計/報表 rbButton = Course.Instance.RibbonBarItems["資料統計"]["報表"]; rbButton["學生修課清單"].Enable = User.Acl["JHSchool.Course.Report0000"].Executable; rbButton["學生修課清單"].Click += delegate { if (Course.Instance.SelectedList.Count >= 1) { new JHSchool.Evaluation.ClassExtendControls.Ribbon.StuinCourse.StuinCourse(); } else { MsgBox.Show("請選擇課程"); } }; #endregion #region 課程/資料統計/匯入匯出 RibbonBarItem rbItemCourseImportExport = Course.Instance.RibbonBarItems["資料統計"]; rbItemCourseImportExport["匯出"]["匯出課程修課學生"].Enable = User.Acl["JHSchool.Course.Ribbon0031"].Executable; rbItemCourseImportExport["匯出"]["匯出課程修課學生"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.Course.ExportCourseStudents(""); JHSchool.Evaluation.ImportExport.Course.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.Course.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemCourseImportExport["匯入"]["匯入課程修課學生"].Enable = User.Acl["JHSchool.Course.Ribbon0021"].Executable; rbItemCourseImportExport["匯入"]["匯入課程修課學生"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.Course.ImportCourseStudents(""); JHSchool.Evaluation.ImportExport.Course.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.Course.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; //rbItemCourseImportExport = FISCA.Presentation.MotherForm.RibbonBarItems["社團作業", "資料統計"]; //rbItemCourseImportExport["匯出"]["匯出社團參與學生"].Enable = User.Acl["JHSchool.Course.Ribbon0031"].Executable; //rbItemCourseImportExport["匯出"]["匯出社團參與學生"].Click += delegate //{ // SmartSchool.API.PlugIn.Export.Exporter exporter = new JHSchool.Evaluation.ImportExport.Course.ExportCourseStudents("社團"); // JHSchool.Evaluation.ImportExport.Course.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.Course.ExportStudentV2(exporter.Text, exporter.Image, "社團", K12.Presentation.NLDPanels.Course.SelectedSource); // exporter.InitializeExport(wizard); // wizard.ShowDialog(); //}; //rbItemCourseImportExport["匯入"]["匯入社團參與學生"].Enable = User.Acl["JHSchool.Course.Ribbon0021"].Executable; //rbItemCourseImportExport["匯入"]["匯入社團參與學生"].Click += delegate //{ // SmartSchool.API.PlugIn.Import.Importer importer = new JHSchool.Evaluation.ImportExport.Course.ImportCourseStudents("社團"); // JHSchool.Evaluation.ImportExport.Course.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.Course.ImportStudentV2(importer.Text, importer.Image); // importer.InitializeImport(wizard); // wizard.ShowDialog(); //}; #endregion #region 課程/教務 RibbonBarButton group = Course.Instance.RibbonBarItems["教務"]["分組上課"]; group.Size = RibbonBarButton.MenuButtonSize.Medium; group.Image = Properties.Resources.meeting_refresh_64; group.Enable = User.Acl["JHSchool.Course.Ribbon0060"].Executable; group.Click += delegate { if (Course.Instance.SelectedList.Count > 0) { new JHSchool.Evaluation.Legacy.SwapAttendStudents(Course.Instance.SelectedList.Count).ShowDialog(); } }; ////課程超過7項,則"分組上課"不能點擊 //Course.Instance.SelectedListChanged += delegate //{ // //分組上課不能超過七個課程。 // group.Enable = (Course.Instance.SelectedList.Count <= 7) && User.Acl["JHSchool.Course.Ribbon0060"].Executable; //}; RibbonBarItem scores = Course.Instance.RibbonBarItems["教務"]; //scores["成績輸入"].Size = RibbonBarButton.MenuButtonSize.Medium; //scores["成績輸入"].Image = Resources.exam_write_64; //scores["成績輸入"].Enable = User.Acl["JHSchool.Course.Ribbon0070"].Executable; //scores["成績輸入"].Click += delegate //{ // if (Course.Instance.SelectedList.Count == 1) // { // //new JHSchool.Evaluation.CourseExtendControls.Ribbon.EditCourseScore(Course.Instance.SelectedList[0]).ShowDialog(); // CourseRecord courseRecord = Course.Instance.SelectedList[0]; // if (courseRecord.GetAssessmentSetup() == null) // MsgBox.Show("課程 '" + courseRecord.Name + "' 沒有評量設定。"); // else // new JHSchool.Evaluation.CourseExtendControls.Ribbon.CourseScoreInputForm(courseRecord).ShowDialog(); // } //}; //Course.Instance.SelectedListChanged += delegate //{ // scores["成績輸入"].Enable = Course.Instance.SelectedList.Count == 1 && User.Acl["JHSchool.Course.Ribbon0070"].Executable; //}; //scores["成績計算"].Size = RibbonBarButton.MenuButtonSize.Medium; //scores["成績計算"].Image = Resources.calcScore; //scores["成績計算"].Enable = User.Acl["JHSchool.Course.Ribbon0080"].Executable; //scores["成績計算"].Click += delegate //{ // new JHSchool.Evaluation.CourseExtendControls.Ribbon.CalculateionWizard().ShowDialog(); //}; // UNDONE: 等有討論出什麼結論再說吧… //scores["合科什麼鬼的"].Size = RibbonBarButton.MenuButtonSize.Medium; //scores["合科什麼鬼的"].Enable = true; //scores["合科什麼鬼的"].Click += delegate //{ // List<JHSchool.Data.JHCourseRecord> courseList = JHSchool.Data.JHCourse.SelectByIDs(K12.Presentation.NLDPanels.Course.SelectedSource); // if (courseList.Count <= 0) return; // if (SubjectCombinationConfigForm.CheckAssessmentSetup(courseList) == true) // { // new SubjectCombinationConfigForm(courseList).ShowDialog(); // } //}; #endregion #region 教務作業/課務作業 rbItem = EduAdmin.Instance.RibbonBarItems["基本設定"]; rbItem["管理"].Size = RibbonBarButton.MenuButtonSize.Large; rbItem["管理"].Image = Properties.Resources.network_lock_64; rbItem["管理"]["領域資料管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon.DomainList"].Executable; rbItem["管理"]["領域資料管理"].Click += delegate { new DomainListTable().ShowDialog(); }; rbItem["管理"]["科目資料管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon.DomainList"].Executable; rbItem["管理"]["科目資料管理"].Click += delegate { new SubjectListTable().ShowDialog(); }; //rbItem["管理"]["評量名稱管理"].Image = Resources.評量名稱管理; rbItem["管理"]["評量名稱管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0000"].Executable; rbItem["管理"]["評量名稱管理"].Click += delegate { new JHSchool.Evaluation.CourseExtendControls.Ribbon.ExamManager().ShowDialog(); }; //rbItem["等第對照表"].Size = RibbonBarButton.MenuButtonSize.Medium; //rbItem["等第對照表"].Image = Resources.對照表; rbItem["管理"]["等第對照管理"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0031"].Executable; rbItem["管理"]["等第對照管理"].Click += delegate { new JHSchool.Evaluation.EduAdminExtendControls.Ribbon.ScoreMappingTable().ShowDialog(); }; #endregion #region 教務作業/成績作業 rbItem["對照/代碼"].Image = Properties.Resources.notepad_lock_64; rbItem["對照/代碼"].Size = RibbonBarButton.MenuButtonSize.Large; rbItem["對照/代碼"]["文字描述代碼表"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0032"].Executable; rbItem["對照/代碼"]["文字描述代碼表"].Click += delegate { TextMappingTable text = new TextMappingTable(); text.ShowDialog(); }; //rbItem["努力程度對照表"].Size = RibbonBarButton.MenuButtonSize.Medium; //rbItem["努力程度對照表"].Image = Resources.對照表; rbItem["對照/代碼"]["努力程度代碼表"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0030"].Executable; rbItem["對照/代碼"]["努力程度代碼表"].Click += delegate { new JHSchool.Evaluation.EduAdminExtendControls.Ribbon.EffortDegreeTable().ShowDialog(); }; EffortDegreeTable.CheckDefault(); //如果需要此分類再進行應用 rbItem["設定"].Image = Properties.Resources.sandglass_unlock_64; rbItem["設定"].Size = RibbonBarButton.MenuButtonSize.Large; ScoreMappingTable.CheckDefault(); //rbItem["課程規劃表"].Size = RibbonBarButton.MenuButtonSize.Large; //rbItem["課程規劃表"].Image = ClassExtendControls.Ribbon.Resources.btnProgramPlan_Image; rbItem["設定"]["課程規劃表"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0050"].Executable; rbItem["設定"]["課程規劃表"].Click += delegate { new ProgramPlanManager().ShowDialog(); }; //rbItem["成績計算規則"].Size = RibbonBarButton.MenuButtonSize.Large; //rbItem["成績計算規則"].Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.course_plan; rbItem["設定"]["成績計算規則"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0040"].Executable; rbItem["設定"]["成績計算規則"].Click += delegate { //if (Control.ModifierKeys == Keys.Shift) new JHSchool.Evaluation.EduAdminExtendControls.Ribbon.ScoreCalcRuleManager().ShowDialog(); }; //移到成績計算模組。 //rbItem["畢業資格審查"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0046"].Executable; //rbItem["畢業資格審查"].Image = JHSchool.Evaluation.CourseExtendControls.Ribbon.Resources.graduation_64; //rbItem["畢業資格審查"].Click += delegate //{ // Form form = new JHSchool.Evaluation.StudentExtendControls.Ribbon.GraduationInspectWizard("EduAdmin"); // form.ShowDialog(); //}; //rbItem["評量輸入狀況"].Image = Resources.成績輸入檢查; //rbItem["評量輸入狀況"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0020"].Executable; //rbItem["評量輸入狀況"].Click += delegate //{ // new JHSchool.Evaluation.EduAdminExtendControls.Ribbon.CourseScoreStatusForm().ShowDialog(); //}; //rbItem["評量設定"].Image = Resources.評量設定; //rbItem["評量設定"].Enable = User.Acl["JHSchool.EduAdmin.Ribbon0010"].Executable; //rbItem["評量設定"].Click += delegate //{ // new JHSchool.Evaluation.CourseExtendControls.Ribbon.AssessmentSetupManager().ShowDialog(); //}; //rbItem["特殊教育領域設定"].Image = Resources.; //rbItem["特殊教育領域設定"].Enable = true; //rbItem["特殊教育領域設定"].Click += delegate //{ // new SpecialEduDomainTable().ShowDialog(); //}; #endregion #endregion //--------------------------------下面還沒整理的分隔線-------------------------------- #region 註冊權限管理 //學生 Catalog detail = RoleAclSource.Instance["學生"]["資料項目"]; // 2017/5/9 穎驊 註解 下面位子 搬去 JHEvaluation.ScoreCalculation //detail.Add(new DetailItemFeature(typeof(SemesterScoreItem))); //detail.Add(new DetailItemFeature(typeof(GraduationScoreItem))); //detail.Add(new DetailItemFeature(typeof(CourseScoreItem))); Catalog ribbon = RoleAclSource.Instance["學生"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0055", "課程規劃")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0056", "計算規則")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0057", "計算成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0058", "畢業資格審查")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0059", "排名")); //程式碼移動到 JHEvaluation.Rating Module 中。 ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0180", "匯出學期科目成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0181", "匯出學期領域成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0182", "匯出畢業成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0183", "匯出課程成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0184", "匯出評量成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0169", "匯出學期歷程")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0190", "匯入學期科目成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0191", "匯入學期領域成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0192", "匯入畢業成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0193", "匯入課程成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0194", "匯入評量成績")); ribbon.Add(new RibbonFeature("JHSchool.Student.Ribbon0170", "匯入學期歷程")); ribbon = RoleAclSource.Instance["學生"]["報表"]; ribbon.Add(new ReportFeature("JHSchool.Student.Report0010", "畢業預警報表")); //班級 ribbon = RoleAclSource.Instance["班級"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Class.Ribbon0055", "課程規劃")); ribbon.Add(new RibbonFeature("JHSchool.Class.Ribbon0056", "計算規則")); ribbon.Add(new RibbonFeature("JHSchool.Class.Ribbon0070", "班級開課")); ribbon = RoleAclSource.Instance["班級"]["報表"]; ribbon.Add(new RibbonFeature("JHSchool.Class.Report0180", "學期優異表現名單")); //課程 ribbon = RoleAclSource.Instance["課程"]["功能按鈕"]; ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0031", "匯出課程修課學生")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon0021", "匯入課程修課學生")); ribbon.Add(new RibbonFeature("JHSchool.Course.Ribbon.AssignAssessmentSetup", "評量設定")); //增加權限控管 by dylan(2010/11/25) detail = RoleAclSource.Instance["課程"]["資料項目"]; detail.Add(new DetailItemFeature(typeof(CourseExtendControls.BasicInfoItem))); detail.Add(new DetailItemFeature(typeof(CourseExtendControls.ScoreCalcSetupItem))); detail.Add(new DetailItemFeature(typeof(CourseExtendControls.SCAttendItem))); // //電子報表(因相關功能未完成先註) //detail.Add(new DetailItemFeature(typeof(CourseExtendControls.ElectronicPaperItem))); //教務作業 ribbon = RoleAclSource.Instance["教務作業"]; ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon.DomainList", "領域清單")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon.SubjectList", "科目清單")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0000", "評量名稱管理")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0010", "評量設定")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0020", "評量輸入狀況")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0030", "努力程度對照表")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0031", "等第對照表")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0032", "文字描述代碼表")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0040", "成績計算規則")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0045", "計算成績")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0046", "畢業資格審查")); ribbon.Add(new RibbonFeature("JHSchool.EduAdmin.Ribbon0050", "課程規劃表")); //建文的舊功能 //ribbon = RoleAclSource.Instance["學務作業"]; //ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon0090.2", "幹部名稱管理")); //ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon0091", "班級幹部管理")); //ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon0092", "社團幹部管理")); //ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon0093", "學校幹部管理")); //ribbon.Add(new RibbonFeature("JHSchool.StuAdmin.Ribbon0094", "競賽項目管理")); #endregion Domain.TestDrive(); Course.Instance.AddView(new TeacherCategoryView()); // 2017/5/9 穎驊 註解 下面位子 搬去 JHEvaluation.ScoreCalculation // 學生學期歷程與學期成績學年度學期檢查 //DataRationalityManager.Checks.Add(new StudentExtendControls.Ribbon.CheckStudentSemHistoryScoreRAT()); }
internal static void Init() { #region ContentItem 資料項目 //學期成績 //Student.Instance.AddDetailBulider(new DetailBulider<HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItem>()); //修課及評量成績 Student.Instance.AddDetailBulider(new DetailBulider <HsinChu.JHEvaluation.StudentExtendControls.CourseScoreItem>()); #endregion #region 學生/資料統計/匯入匯出 RibbonBarButton rbItemExport = Student.Instance.RibbonBarItems["資料統計"]["匯出"]; RibbonBarButton rbItemImport = Student.Instance.RibbonBarItems["資料統計"]["匯入"]; rbItemExport["成績相關匯出"]["匯出學期科目成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0180"].Executable; rbItemExport["成績相關匯出"]["匯出學期科目成績"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ImportExport.ExportSemesterSubjectScore(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemExport["成績相關匯出"]["匯出學期領域成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0181"].Executable; rbItemExport["成績相關匯出"]["匯出學期領域成績"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ImportExport.ExportSemesterDomainScore(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemExport["成績相關匯出"]["匯出畢業成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0182"].Executable; rbItemExport["成績相關匯出"]["匯出畢業成績"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ImportExport.ExportGradScore(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemExport["成績相關匯出"]["匯出評量成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0184"].Executable; rbItemExport["成績相關匯出"]["匯出評量成績"].Click += delegate { SmartSchool.API.PlugIn.Export.Exporter exporter = new ImportExport.ExportExamScore(); JHSchool.Evaluation.ImportExport.ExportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ExportStudentV2(exporter.Text, exporter.Image); exporter.InitializeExport(wizard); wizard.ShowDialog(); }; rbItemImport["成績相關匯入"]["匯入學期科目成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0190"].Executable; rbItemImport["成績相關匯入"]["匯入學期科目成績"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new ImportExport.ImportSemesterSubjectScore(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); _eh(null, EventArgs.Empty); }; rbItemImport["成績相關匯入"]["匯入學期領域成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0191"].Executable; rbItemImport["成績相關匯入"]["匯入學期領域成績"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new ImportExport.ImportSemesterDomainScore(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); _eh(null, EventArgs.Empty); }; rbItemImport["成績相關匯入"]["匯入畢業成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0192"].Executable; rbItemImport["成績相關匯入"]["匯入畢業成績"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new ImportExport.ImportGradScore(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; rbItemImport["成績相關匯入"]["匯入評量成績"].Enable = Framework.User.Acl["JHSchool.Student.Ribbon0194"].Executable; rbItemImport["成績相關匯入"]["匯入評量成績"].Click += delegate { SmartSchool.API.PlugIn.Import.Importer importer = new ImportExport.ImportExamScore(); JHSchool.Evaluation.ImportExport.ImportStudentV2 wizard = new JHSchool.Evaluation.ImportExport.ImportStudentV2(importer.Text, importer.Image); importer.InitializeImport(wizard); wizard.ShowDialog(); }; #endregion #region Standard Function JHSchool.SF.Evaluation.QuickInputSemesterScoreForm.RegisterHandler(delegate(string studentId) { HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.QuickInputSemesterScoreForm form; form = new HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.QuickInputSemesterScoreForm(JHStudent.SelectByID(studentId)); return(form.ShowDialog()); }); //JHSchool.SF.Evaluation.SemesterScoreEditor.RegisterHandler(delegate(string studentId) //{ // HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.SemesterScoreEditor form; // form = new HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.SemesterScoreEditor(Student.Instance[studentId]); // return form.ShowDialog(); //}); //JHSchool.SF.Evaluation.SemesterScoreEditor.RegisterHandler(delegate(string studentId, int schoolYear, int semester) //{ // HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.SemesterScoreEditor form; // form = new HsinChu.JHEvaluation.StudentExtendControls.SemesterScoreItemRelated.SemesterScoreEditor(Student.Instance[studentId], JHSchool.Data.JHSemesterScore.SelectBySchoolYearAndSemester(studentId, schoolYear, semester)); // return form.ShowDialog(); //}); #endregion }