private void buttonX4_Click(object sender, EventArgs e) { if (!_CommonPlanEditor.IsValidated) { MsgBox.Show("課程資料表內容輸入錯誤,請檢查輸入資料。"); return; } EditGraduationPlan.SetCommon(_CommonPlanEditor.GetSource()); EventHub.Instance.InvokCommonPlanUpdated(); LoadGraduationPlan(); }
private void frm_SaveEvent(object sender, FrmReviseRuleName.ReviseRuleNameEventArgs e) { if (_SelectItem != null) { if (e.IsSame == true) { return; } EditGraduationPlan.Update(_SelectItem.Name, e.NewFullName, _GraduationPlanEditor.GetSource(e.NewSchoolYear)); SetAdvTreeExpandStatus(e.NewSchoolYear, true); EventHub.Instance.InvokGraduationPlanUpdated(_SelectItem.Name); } }
private void buttonX2_Click(object sender, EventArgs e) { if (_SelectButton != null) { if (!_GraduationPlanEditor.IsValidated) { MsgBox.Show("課程資料表內容輸入錯誤,請檢查輸入資料。"); return; } EditGraduationPlan.Update(_SelectButton.Name, _GraduationPlanEditor.GetSource()); //SmartSchool.GraduationPlanRelated.GraduationPlan.Instance.Reflash(); //bool RemoveNode=true; //foreach (GraduationPlanInfo info in SmartSchool.GraduationPlanRelated.GraduationPlan.Instance.Items) //{ // if (info.ID == _SelectButton.Name) // { // _SelectButton.Tag = info; // _SelectButton.Text = info.Name; // SmartSchool.GraduationPlanRelated.Validate.ValidateGraduationPlanInfo validater = new SmartSchool.GraduationPlanRelated.Validate.ValidateGraduationPlanInfo(); // if (validater.Validate(info, null)) // { // _SelectButton.Tooltip = "驗證失敗,請檢查內容。\n否則使用此規劃表之學生將無法加入修課。"; // _SelectButton.Image = Properties.Resources.warning1; // _SelectButton.Refresh(); // } // else // { // _SelectButton.Tooltip = ""; // _SelectButton.Image = null; // _SelectButton.Refresh(); // } // RemoveNode=false; // item_Click(_SelectButton, new EventArgs()); // break; // } //} //if (RemoveNode) //{ // itemPanel1.Items.Remove(_SelectButton); // tabControl2.Visible = false; //} EventHub.Instance.InvokGraduationPlanUpdated(_SelectButton.Name); } }
private void btnUpdate_Click(object sender, EventArgs e) { if (_SelectItem == null) { return; } if (!_GraduationPlanEditor.IsValidated) { MsgBox.Show("課程資料表內容輸入錯誤,請檢查輸入資料。"); return; } SaveAdvTreeExpandStatus(); string schoolYear = _SelectItem.Parent.TagString; string id = _SelectItem.Name; string name = schoolYear + (_SelectItem.Tag as GraduationPlanInfo).TrimName; EditGraduationPlan.Update(_SelectItem.Name, _GraduationPlanEditor.GetSource(schoolYear)); EventHub.Instance.InvokGraduationPlanUpdated(_SelectItem.Name); }