public CreateClassCourse() { InitializeComponent(); _errors = new EnhancedErrorProvider(); _errors.BlinkRate = 0; this.cboEntry.Items.Clear(); this.cboEntry.Items.AddRange(new string[] { "學業", "體育", "國防通識", "健康與護理", "實習科目" }); this.cboRequired.Items.Clear(); this.cboRequired.Items.AddRange(new string[] { "選修", "必修" }); this.cboRequiredBy.Items.Clear(); this.cboRequiredBy.Items.AddRange(new string[] { "校訂", "部訂" }); this.cboEntry.SelectedIndex = this.cboRequired.SelectedIndex = this.cboRequiredBy.SelectedIndex = 0; try { for (int i = -2; i <= 2; i++) { cboSchoolYear.Items.Add((CurrentUser.Instance.SchoolYear + i) + ""); } cboSchoolYear.Text = CurrentUser.Instance.SchoolYear.ToString(); cboSemester.Text = CurrentUser.Instance.Semester.ToString(); } catch (Exception ex) { CurrentUser.ReportError(ex); } }
/// <summary> /// 檢查批次異動輸入年月 /// </summary> /// <param name="Year"></param> /// <param name="Month"></param> /// <param name="Errors"></param> /// <returns></returns> public static string checkYearAndMonthInput(TextBox Year, ComboBox Month, EnhancedErrorProvider Errors) { string strEnrrolSchoolYear = string.Empty, cMonth = string.Empty; string cYear = ""; cYear = strIntCheckA(Year.Text); if (string.IsNullOrEmpty(cYear) || cYear.Length != 4) { Errors.SetError(Year, "請檢查學年度是否是西元年"); } else { strEnrrolSchoolYear = cYear; } cMonth = strIntCheckA(Month.Text); if (string.IsNullOrEmpty(cMonth)) { Errors.SetError(Year, "請選擇月份"); } else { strEnrrolSchoolYear += cMonth; } // 200901 if (strEnrrolSchoolYear.Length != 6) { strEnrrolSchoolYear = ""; } return(strEnrrolSchoolYear); }
private void ClassItem_Load(object sender, EventArgs e) { Errors = new EnhancedErrorProvider(); _ClassNameIDDic = new Dictionary <string, string>(); _ClassSeatNoList = new List <int>(); JHSchool.Data.JHStudent.AfterChange += new EventHandler <K12.Data.DataChangedEventArgs>(JHStudent_AfterChange); objStudent = JHSchool.Data.JHStudent.SelectByID(PrimaryKey); _AllClassRecs = JHSchool.Data.JHClass.SelectAll(); _AllStudRecList = new List <JHSchool.Data.JHStudentRecord>(); _studRecList = new List <JHSchool.Data.JHStudentRecord>(); BGWork = new BackgroundWorker(); BGWork.DoWork += new DoWorkEventHandler(BGWork_DoWork); BGWork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BGWork_RunWorkerCompleted); DataListener = new ChangeListener(); DataListener.Add(new TextBoxSource(txtStudentNumber)); DataListener.Add(new ComboBoxSource(cboClass, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new ComboBoxSource(cboSeatNo, ComboBoxSource.ListenAttribute.Text)); DataListener.StatusChanged += new EventHandler <ChangeEventArgs>(ValueManager_StatusChanged); prlp = new PermRecLogProcess(); if (!string.IsNullOrEmpty(PrimaryKey)) { BGWork.RunWorkerAsync(); } Disposed += new EventHandler(ClassItem_Disposed); }
//更新模式傳 目前的補考梯次 直接對該補考梯次更新 public InsertUpdateMakeUpBatchForm(string action, string schoolYear, string semester, UDT_MakeUpBatch batch) { InitializeComponent(); _action = action; _schoolYear = schoolYear; _semester = semester; _batch = batch; _errors = new EnhancedErrorProvider(); _batchNameList = new List <string>(); // 只有新增 模式 才可以讓使用者 編輯 補考梯次名稱、包含班級 if (_action == "新增") { txtBatchName.Enabled = true; lstClass.Enabled = true; chkSelectAll.Enabled = true; } // 修改模式 使用者只能修改 補考說明 if (_action == "修改") { this.Text = "管理補考梯次"; txtBatchName.Text = _batch.MakeUp_Batch; txtDescription.Text = _batch.Description; txtStartTime.Text = _batch.Start_Time.ToString("yyyy/MM/dd HH:mm:ss"); txtEndTime.Text = _batch.End_Time.ToString("yyyy/MM/dd HH:mm:ss"); } }
public AssessmentSetupManager() { InitializeComponent(); HideNavigationBar(); List <string> cols = new List <string>() { "比重", "開始時間", "結束時間" }; Campus.Windows.DataGridViewImeDecorator dec = new Campus.Windows.DataGridViewImeDecorator(this.dataview, cols); JHAssessmentSetup.AfterDelete += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); JHAssessmentSetup.AfterInsert += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); JHAssessmentSetup.AfterUpdate += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); _errors = new EnhancedErrorProvider(); _exam = new List <JHExamRecord>(); OriginAEs = new List <JHAEIncludeRecord>(); Listener = new ChangeListener(); Listener.StatusChanged += new EventHandler <ChangeEventArgs>(Listener_StatusChanged); Listener.Add(new DataGridViewSource(dataview)); Listener.Add(new TextBoxSource(txtOStartTime)); Listener.Add(new TextBoxSource(txtOEndTime)); Listener.Add(new TextBoxSource(txtTStartTime)); Listener.Add(new TextBoxSource(txtTEndTime)); Listener.Reset(); }
private string transferInConfigKey = "TransferInReason"; //紀錄轉入原因清單的組態值的Key public UpdateRecordInfo03(DAL.StudUpdateRecordEntity sure) { InitializeComponent(); Errors = new EnhancedErrorProvider(); // 設定男、女值與設定只能選不能修改 cboGender.Items.Add("男"); cboGender.Items.Add("女"); cd = JHSchool.School.Configuration[updateConfigKey]; if (!cd.Contains(transferInConfigKey)) { cd[transferInConfigKey] = "遷居;安置;其他"; cd.Save(); } string[] reasons = cd[transferInConfigKey].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); List <string> reasonList = new List <string>(reasons); foreach (string reason in reasons) { this.cboUpdateDescription.Items.Add(reason); } foreach (string defaultReason in new string[] { "遷居", "安置", "其他" }) { if (!reasonList.Contains(defaultReason)) { this.cboUpdateDescription.Items.Add(defaultReason); } } _StudUpdateRecordEntity = sure; SetUpdateRecordInfoToForm(); }
public AssessmentSetupManager() { InitializeComponent(); HideNavigationBar(); //AssessmentSetup.Instance.ItemUpdated += delegate(object sender, ItemUpdatedEventArgs e) //{ // if (e.PrimaryKeys.Count > 0) // RefreshItemPanel(e.PrimaryKeys[0]); //}; JHAssessmentSetup.AfterDelete += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); JHAssessmentSetup.AfterInsert += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); JHAssessmentSetup.AfterUpdate += new EventHandler <K12.Data.DataChangedEventArgs>(JHAssessmentSetup_AfterChanged); _errors = new EnhancedErrorProvider(); _exam = new List <JHExamRecord>(); //_as = new List<JHAssessmentSetupRecord>(); _listener = new ChangeListener(); _listener.StatusChanged += new EventHandler <ChangeEventArgs>(Listener_StatusChanged); _listener.Add(new DataGridViewSource(dataview)); _listener.Add(new TextBoxSource(txtOStartTime)); _listener.Add(new TextBoxSource(txtOEndTime)); _listener.Add(new TextBoxSource(txtTStartTime)); _listener.Add(new TextBoxSource(txtTEndTime)); }
//新增模式傳 目前已有的補考梯次 驗證使用 public InsertUpdateMakeUpBatchForm(string action, string schoolYear, string semester, List <UDT_MakeUpBatch> batchList) { InitializeComponent(); this.MaximumSize = this.MinimumSize = this.Size; _action = action; _schoolYear = schoolYear; _semester = semester; _errors = new EnhancedErrorProvider(); _batchNameList = new List <string>(); //整理補考名稱 驗證重覆 foreach (UDT_MakeUpBatch batch in batchList) { _batchNameList.Add(batch.MakeUp_Batch); } // 只有新增 模式 才可以讓使用者 編輯 補考梯次名稱、包含班級 if (_action == "新增") { txtBatchName.Enabled = true; lstClass.Enabled = true; chkSelectAll.Enabled = true; } // 修改模式 使用者只能修改 補考說明 if (_action == "修改") { } }
private void dtUpdateDate_TextChanged(object sender, EventArgs e) { if (Errors == null) { Errors = new EnhancedErrorProvider(); } Errors.Clear(); }
public MainForm(EnterType enterType) { InitializeComponent(); this.MaximumSize = this.Size; this.MinimumSize = this.Size; this.Text = Global.ReportName; _enterType = enterType; _config = new Config(Global.ReportName); _error = new EnhancedErrorProvider(); _error.BlinkRate = 0; InitializeSemester(); InitializeDate(); _worker = new BackgroundWorker(); _worker.DoWork += delegate { #region 取得試別 _exams = JHExam.SelectAll(); //List<string> examIDs = new List<string>(); //foreach (JHExamRecord exam in _exams) //{ // examIDs.Add(exam.ID); // _ecMapping.Add(exam.ID, new List<string>()); //} #endregion }; _worker.RunWorkerCompleted += delegate { //Campus.Configuration.Config.App.Sync("新竹個人評量成績單試別"); //Campus.Configuration.ConfigData cd = Campus.Configuration.Config.App["新竹個人評量成績單試別"]; //string str = cd["新竹個人評量成績單試別"]; K12.Data.Configuration.ConfigData cd = K12.Data.School.Configuration["新竹個人評量成績單試別"]; string str = cd["新竹個人評量成績單試別"]; cbExam.DisplayMember = "Name"; foreach (var exam in _exams) { cbExam.Items.Add(exam); } int idx = cbExam.FindString(str); if (idx < 0) { cbExam.SelectedIndex = 0; } else { cbExam.SelectedIndex = idx; } cbExam.Enabled = true; btnNext.Enabled = true; LoadSubjectName(); }; _worker.RunWorkerAsync(); }
private void BatchStudGraduateUpdateRec_Load(object sender, EventArgs e) { dtUpdateDate.Text = DateTime.Now.ToShortDateString(); dtUpdateDate.Select(); if (Errors == null) { Errors = new EnhancedErrorProvider(); } // 載入預設年度與月份 UpdateRecordUtil.LoadYearAndMonth(txtYear, cboMonth); StudentIDList = new List <string>(); StudOldUpdateRecsDic = new Dictionary <string, List <JHPermrec.UpdateRecord.DAL.StudUpdateRecordEntity> >(); StudOldUpdateRecList = new List <JHPermrec.UpdateRecord.DAL.StudUpdateRecordEntity>(); StudUpdateRecsList = new List <JHPermrec.UpdateRecord.DAL.StudUpdateRecordEntity>(); // Load 上來樣式 if (_FLT == FormLoadType.學生) { labelX2.Location = new Point(12, 41); dtUpdateDate.Location = new Point(74, 42); labelX3.Location = new Point(11, 73); txtYear.Location = new Point(73, 73); labelX5.Location = new Point(136, 73); cboMonth.Location = new Point(169, 71); btnAddData.Location = new Point(55, 106); btnExit.Location = new Point(150, 106); this.MaximumSize = new System.Drawing.Size(242, 173); this.Size = new System.Drawing.Size(242, 173); labelX4.Visible = false; cboGradeYear.Visible = false; } else { labelX4.Visible = true; cboGradeYear.Visible = true; labelX4.Location = new Point(36, 42); cboGradeYear.Location = new Point(75, 42); labelX2.Location = new Point(13, 73); dtUpdateDate.Location = new Point(75, 73); labelX3.Location = new Point(13, 108); txtYear.Location = new Point(75, 106); labelX5.Location = new Point(138, 108); btnAddData.Location = new Point(71, 141); btnExit.Location = new Point(150, 141); cboMonth.Location = new Point(169, 106); this.MaximumSize = new System.Drawing.Size(252, 203); this.Size = new System.Drawing.Size(252, 203); cboGradeYear.Items.Clear(); foreach (int gr in DAL.DALTransfer2.GetClassGardeYearList()) { cboGradeYear.Items.Add(gr.ToString()); } } this.StartPosition = FormStartPosition.CenterScreen; }
public UpdateRecordInfo08(DAL.StudUpdateRecordEntity sure) { InitializeComponent(); Errors = new EnhancedErrorProvider(); // 設定男、女值與設定只能選不能修改 cboGender.Items.Add("男"); cboGender.Items.Add("女"); cboGender.DropDownStyle = ComboBoxStyle.DropDownList; _StudUpdateRecordEntity = sure; SetUpdateRecordInfoToForm(); }
public AssessmentSetupManager() { InitializeComponent(); HideNavigationBar(); AssessmentSetup.Instance.ItemUpdated += delegate(object sender, ItemUpdatedEventArgs e) { if (e.PrimaryKeys.Count > 0) { RefreshItemPanel(e.PrimaryKeys[0]); } }; _errors = new EnhancedErrorProvider(); }
public MainForm() { InitializeComponent(); _config = new Config(); _error = new EnhancedErrorProvider(); _error.BlinkRate = 0; InitializeSemester(); InitializeDate(); this.Text = Global.ReportName; this.MinimumSize = this.Size; this.MaximumSize = this.Size; }
public PeriodAbsenceSelectionForm(string setting) { InitializeComponent(); _panels = new Dictionary <string, PeriodAbsencePanel>(); _error = new EnhancedErrorProvider(); _error.BlinkRate = 0; if (setting.StartsWith("(")) { setting = setting.Substring(1, setting.Length - 1); } if (setting.EndsWith(")")) { setting = setting.Substring(0, setting.Length - 1); } _setting = setting; }
public PeriodAbsencePanel(string type, string p, EnhancedErrorProvider error) { InitializeComponent(); _error = error; _type = type; textBoxX1.Text = p; if (_type == "核可假別") { textBoxX1.Visible = false; labelX1.Visible = false; } groupPanel1.Text = type; flowPanel.Controls.Clear(); }
public AddTransStudBaseData(JHSchool.Data.JHStudentRecord studentEntity) { InitializeComponent(); _CountyTown = new JHSchool.Permrec.StudentExtendControls.CountyTown(); student = studentEntity; _StudentID = student.ID; ParentRec = JHSchool.Data.JHParent.SelectByStudentID(_StudentID); AddressRec = JHSchool.Data.JHAddress.SelectByStudentID(_StudentID); LoadStudParentInfo(); LoadStudAddress(); string msg = "班級:"; if (student.Class != null) { msg += student.Class.Name; } if (student.SeatNo.HasValue) { msg += ", 座號:" + student.SeatNo.Value; } msg += ", 姓名:" + student.Name + ", 學號:" + student.StudentNumber; lblStudName.Text = msg; chkNextYes.Checked = true; cboAlive.Items.Add("存"); cboAlive.Items.Add("歿"); cboAlive.Items.Add(""); // 讀取稱謂 DSXmlHelper helper = Config.GetRelationship().GetContent(); foreach (XmlNode node in helper.GetElements("Relationship")) { //cboRelationship.Items.Add(new KeyValuePair<string, string>(node.InnerText, node.InnerText)); cboRelationship.Items.Add(node.InnerText); } _warnings = new EnhancedErrorProvider(); _zip_code_mapping = new Dictionary <string, string>(); AddTransBackgroundManager.AddTransStudBaseDataObj = this; }
private string transferOutConfigKey = "TransferOutReason"; //紀錄轉入原因清單的組態值的Key public UpdateRecordInfo04(DAL.StudUpdateRecordEntity sure) { InitializeComponent(); if (JHSchool.Permrec.Program.ModuleType == JHSchool.Permrec.Program.ModuleFlag.KaoHsiung) { labelX6.Text = "遷出地址"; } Errors = new EnhancedErrorProvider(); // 設定男、女值與設定只能選不能修改 cboGender.Items.Add("男"); cboGender.Items.Add("女"); cboGender.DropDownStyle = ComboBoxStyle.DropDownList; //將轉入紀錄清單的key輸入至list cd中 cd = JHSchool.School.Configuration[updateConfigKey]; if (!cd.Contains(transferOutConfigKey)) { cd[transferOutConfigKey] = "遷居;出國;其他"; cd.Save(); } string[] reasons = cd[transferOutConfigKey].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); List <string> reasonList = new List <string>(reasons); foreach (string reason in reasons) { this.cboUpdateDescription.Items.Add(reason); } foreach (string defaultreason in new string[] { "遷居", "出國", "其他" }) { if (!reasonList.Contains(defaultreason)) { this.cboUpdateDescription.Items.Add(defaultreason); } } //將cdlist拆成由char所組成的,最後加入畫面之中 //string[] reasons = cd[transferOutConfigKey].Split(new char[] { ';' }); //foreach (string reason in reasons) // { // this.cboUpdateDescription.Items.Add(reason); //} _StudUpdateRecordEntity = sure; SetUpdateRecordInfoToForm(); }
private string SuspensionConfigKey = "SuspensionReason"; //紀錄休學原因清單的組態值的Key public UpdateRecordInfo05(DAL.StudUpdateRecordEntity sure) { InitializeComponent(); Errors = new EnhancedErrorProvider(); // 設定男、女值與設定只能選不能修改 cboGender.Items.Add("男"); cboGender.Items.Add("女"); cboGender.DropDownStyle = ComboBoxStyle.DropDownList; //將休學紀錄清單的key輸入至list cd中 cd = JHSchool.School.Configuration[updateConfigKey]; if (!cd.Contains(SuspensionConfigKey)) { cd[SuspensionConfigKey] = "因病;出國"; cd.Save(); } string[] reasons = cd[SuspensionConfigKey].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); List <string> reasonList = new List <string>(reasons); if (reasonList.Contains("其他")) { reasonList.Remove("其他"); } if (reasonList.Contains("死亡")) { reasonList.Remove("死亡"); } foreach (string defaultreason in new string[] { "因病", "出國" }) { if (!reasonList.Contains(defaultreason)) { reasonList.Add(defaultreason); } } foreach (string name in reasonList) { this.cboUpdateDescription.Items.Add(name); } _StudUpdateRecordEntity = sure; SetUpdateRecordInfoToForm(); }
private string ExtendingConfigKey = "ExtendingReason10"; //紀錄中輟原因清單的組態值的Key //將中輟紀錄清單的key輸入至list cd中 public UpdateRecordInfo10(DAL.StudUpdateRecordEntity sure) { InitializeComponent(); Errors = new EnhancedErrorProvider(); // 設定男、女值與設定只能選不能修改 cboGender.Items.Add("男"); cboGender.Items.Add("女"); cboGender.DropDownStyle = ComboBoxStyle.DropDownList; cd = JHSchool.School.Configuration[updateConfigKey]; if (!cd.Contains(ExtendingConfigKey)) { cd[ExtendingConfigKey] = "因病;出國;其它"; cd.Save(); } string[] reasons = cd[ExtendingConfigKey].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); List <string> reasonList = new List <string>(reasons); foreach (string reason in reasons) { if (reason == "死亡") { continue; } this.cboUpdateDescription.Items.Add(reason); } foreach (string defaultreason in new string[] { "因病", "出國", "其它" }) { if (!reasonList.Contains(defaultreason)) { this.cboUpdateDescription.Items.Add(defaultreason); } } _StudUpdateRecordEntity = sure; SetUpdateRecordInfoToForm(); }
/// <summary> /// 初始化 ErrorProvider /// </summary> private void InitializeErrorProvider() { _error = new EnhancedErrorProvider(); _error.BlinkRate = 0; }
private void ClassItem_Load(object sender, EventArgs e) { Errors = new EnhancedErrorProvider(); _ClassNameIDDic = new Dictionary<string, string>(); _ClassSeatNoList = new List<int>(); K12.Data.Student.AfterChange += new EventHandler<K12.Data.DataChangedEventArgs>(JHStudent_AfterChange); objStudent = K12.Data.Student.SelectByID(PrimaryKey); _AllClassRecs = K12.Data.Class.SelectAll(); _AllStudRecList = new List<K12.Data.StudentRecord>(); _studRecList = new List<K12.Data.StudentRecord>(); BGWork = new BackgroundWorker(); BGWork.DoWork += new DoWorkEventHandler(BGWork_DoWork); BGWork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BGWork_RunWorkerCompleted); DataListener = new ChangeListener(); DataListener.Add(new TextBoxSource(txtStudentNumber)); DataListener.Add(new ComboBoxSource(cboClass, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new ComboBoxSource(cboSeatNo, ComboBoxSource.ListenAttribute.Text)); DataListener.StatusChanged += new EventHandler<ChangeEventArgs>(ValueManager_StatusChanged); prlp = new PermRecLogProcess(); if (!string.IsNullOrEmpty(PrimaryKey)) BGWork.RunWorkerAsync(); Disposed += new EventHandler(ClassItem_Disposed); }
public ScoreCalcRuleManager() { InitializeComponent(); _error = new EnhancedErrorProvider(); #region Subscribe DataListener DataListener = new ChangeListener(); #region Add Controls 成績計算規則 DataListener.Add(new NumericUpDownSource(numericUpDown1)); DataListener.Add(new NumericUpDownSource(numericUpDown2)); DataListener.Add(new NumericUpDownSource(numericUpDown3)); DataListener.Add(new NumericUpDownSource(numericUpDown4)); DataListener.Add(new RadioButtonSource( radioButton1, radioButton2, radioButton3, radioButton4, radioButton5, radioButton6, radioButton7, radioButton8, radioButton9, radioButton10, radioButton11, radioButton12)); #endregion #region Add Controls 畢業條件 DataListener.Add(new CheckBoxSource( chkScore1, chkScore2, chkScore3, chkDaily1, chkDaily1b, chkDaily1c, chkDaily2, chkDaily2b, chkDaily2c, chkDaily3, chkDaily3b, chkDaily3c, chkDaily4, chkDaily4b, chkDaily4c )); DataListener.Add(new NumericUpDownSource(numDomain1)); DataListener.Add(new NumericUpDownSource(numDomain2)); DataListener.Add(new NumericUpDownSource(numDomain3)); DataListener.Add(new ComboBoxSource(cboDegree1, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new ComboBoxSource(cboDegree2, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new ComboBoxSource(cboDegree3, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new NumericUpDownSource(numPeriod1)); DataListener.Add(new NumericUpDownSource(numPeriod1b)); DataListener.Add(new NumericUpDownSource(numPeriod1c)); DataListener.Add(new TextBoxSource(txtPeriod2)); DataListener.Add(new TextBoxSource(txtPeriod2b)); DataListener.Add(new TextBoxSource(txtPeriod2c)); DataListener.Add(new NumericUpDownSource(numTimes3)); DataListener.Add(new NumericUpDownSource(numTimes3b)); DataListener.Add(new NumericUpDownSource(numTimes3c)); DataListener.Add(new NumericUpDownSource(numMab1)); DataListener.Add(new NumericUpDownSource(numMab2)); DataListener.Add(new NumericUpDownSource(numMbc1)); DataListener.Add(new NumericUpDownSource(numMbc2)); DataListener.Add(new NumericUpDownSource(numDab1)); DataListener.Add(new NumericUpDownSource(numDab2)); DataListener.Add(new NumericUpDownSource(numDbc1)); DataListener.Add(new NumericUpDownSource(numDbc2)); DataListener.Add(new NumericUpDownSource(numMab1b)); DataListener.Add(new NumericUpDownSource(numMab2b)); DataListener.Add(new NumericUpDownSource(numMbc1b)); DataListener.Add(new NumericUpDownSource(numMbc2b)); DataListener.Add(new NumericUpDownSource(numDab1b)); DataListener.Add(new NumericUpDownSource(numDab2b)); DataListener.Add(new NumericUpDownSource(numDbc1b)); DataListener.Add(new NumericUpDownSource(numDbc2b)); DataListener.Add(new NumericUpDownSource(numMab1c)); DataListener.Add(new NumericUpDownSource(numMab2c)); DataListener.Add(new NumericUpDownSource(numMbc1c)); DataListener.Add(new NumericUpDownSource(numMbc2c)); DataListener.Add(new NumericUpDownSource(numDab1c)); DataListener.Add(new NumericUpDownSource(numDab2c)); DataListener.Add(new NumericUpDownSource(numDbc1c)); DataListener.Add(new NumericUpDownSource(numDbc2c)); DataListener.Add(new RadioButtonSource(rbCounterbalance1, rbUseDemeritOnly1)); DataListener.Add(new RadioButtonSource(rbCounterbalance1b, rbUseDemeritOnly1b)); DataListener.Add(new RadioButtonSource(rbCounterbalance1c, rbUseDemeritOnly1c)); DataListener.Add(new TextBoxSource(txtSetAbsence1)); DataListener.Add(new TextBoxSource(txtSetAbsence2)); DataListener.Add(new TextBoxSource(txtSetAbsence1b)); DataListener.Add(new TextBoxSource(txtSetAbsence1c)); DataListener.Add(new TextBoxSource(txtSetAbsence2b)); DataListener.Add(new TextBoxSource(txtSetAbsence2c)); DataListener.Add(new TextBoxSource(txtSetAbsence2d)); DataListener.Add(new TextBoxSource(txtSetAbsence2e)); DataListener.Add(new NumericUpDownSource(numOfPeriod)); DataListener.Add(new NumericUpDownSource(numTimes4)); DataListener.Add(new ComboBoxSource(cboPerformanceDegree1, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new NumericUpDownSource(numTimes4b)); DataListener.Add(new ComboBoxSource(cboPerformanceDegree1b, ComboBoxSource.ListenAttribute.Text)); DataListener.Add(new NumericUpDownSource(numTimes4c)); DataListener.Add(new ComboBoxSource(cboPerformanceDegree1c, ComboBoxSource.ListenAttribute.Text)); #endregion DataListener.StatusChanged += new EventHandler <ChangeEventArgs>(DataListener_StatusChanged); #endregion #region Subscribe ScoreCalcRule ScoreCalcRule.Instance.ItemLoaded += new EventHandler(ScoreCalcRule_ItemLoaded); ScoreCalcRule.Instance.ItemUpdated += new EventHandler <ItemUpdatedEventArgs>(ScoreCalcRule_ItemUpdated); #endregion InitializeScoreMappingList(); InitializePerformanceDegree(); picLoading.Visible = true; CardPanelEnabled = false; gpDaily3.Enabled = chkDaily3.Checked; gpDaily3b.Enabled = chkDaily3b.Checked; gpDaily3c.Enabled = chkDaily3c.Checked; LabelNameText = ""; _worker = new BackgroundWorker(); _worker.DoWork += delegate { ScoreCalcRule.Instance.SyncAllBackground(); }; _worker.RunWorkerAsync(); }
public AddressPalmerwormItem() { InitializeComponent(); Group = "地址資料"; _errors = new EnhancedErrorProvider(); _warnings = new EnhancedErrorProvider(); prlp = new PermRecLogProcess(); BGWorker = new BackgroundWorker(); BGWorker.DoWork += new DoWorkEventHandler(BGWorker_DoWork); BGWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BGWorker_RunWorkerCompleted); _DataListener_Permanent = new ChangeListener(); _DataListener_Mailing = new ChangeListener(); _DataListener_Other = new ChangeListener(); _DataListener_Permanent.StatusChanged += new EventHandler <ChangeEventArgs>(_DataListener_Permanent_StatusChanged); _DataListener_Mailing.StatusChanged += new EventHandler <ChangeEventArgs>(_DataListener_Mailing_StatusChanged); _DataListener_Other.StatusChanged += new EventHandler <ChangeEventArgs>(_DataListener_Other_StatusChanged); // 加入戶籍 Listener Data _DataListener_Permanent.Add(new TextBoxSource(txtZipcode)); _DataListener_Permanent.Add(new ComboBoxSource(cboCounty, ComboBoxSource.ListenAttribute.Text)); _DataListener_Permanent.Add(new ComboBoxSource(cboTown, ComboBoxSource.ListenAttribute.Text)); _DataListener_Permanent.Add(new TextBoxSource(txtDistrict)); _DataListener_Permanent.Add(new TextBoxSource(txtArea)); _DataListener_Permanent.Add(new TextBoxSource(txtDetail)); _DataListener_Permanent.Add(new TextBoxSource(txtLongtitude)); _DataListener_Permanent.Add(new TextBoxSource(txtLatitude)); // 加入聯絡 Listener Data _DataListener_Mailing.Add(new TextBoxSource(txtZipcode)); _DataListener_Mailing.Add(new ComboBoxSource(cboCounty, ComboBoxSource.ListenAttribute.Text)); _DataListener_Mailing.Add(new ComboBoxSource(cboTown, ComboBoxSource.ListenAttribute.Text)); _DataListener_Mailing.Add(new TextBoxSource(txtDistrict)); _DataListener_Mailing.Add(new TextBoxSource(txtArea)); _DataListener_Mailing.Add(new TextBoxSource(txtDetail)); _DataListener_Mailing.Add(new TextBoxSource(txtLongtitude)); _DataListener_Mailing.Add(new TextBoxSource(txtLatitude)); // 加入其它 Listener Data _DataListener_Other.Add(new TextBoxSource(txtZipcode)); _DataListener_Other.Add(new ComboBoxSource(cboCounty, ComboBoxSource.ListenAttribute.Text)); _DataListener_Other.Add(new ComboBoxSource(cboTown, ComboBoxSource.ListenAttribute.Text)); _DataListener_Other.Add(new TextBoxSource(txtDistrict)); _DataListener_Other.Add(new TextBoxSource(txtArea)); _DataListener_Other.Add(new TextBoxSource(txtDetail)); _DataListener_Other.Add(new TextBoxSource(txtLongtitude)); _DataListener_Other.Add(new TextBoxSource(txtLatitude)); JHAddress.AfterUpdate += new EventHandler <K12.Data.DataChangedEventArgs>(JHAddress_AfterUpdate); _address_type = AddressType.Permanent; _getCountyBackgroundWorker = new BackgroundWorker(); _getCountyBackgroundWorker.DoWork += new DoWorkEventHandler(_getCountyBackgroundWorker_DoWork); _getCountyBackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_getCountyBackgroundWorker_RunWorkerCompleted); _getCountyBackgroundWorker.RunWorkerAsync(); if (User.Acl["Content0050"].Editable) { return; } if (User.Acl["Content0050"].Viewable) { this.Enabled = false; } Disposed += new EventHandler(AddressPalmerwormItem_Disposed); }
// datagridView 因為需求改變,所以在顯示設成隱藏,但實作上還是保留。 private void BatchStudGraduateDocNo_Load(object sender, EventArgs e) { // 加入年級, 先濾一般生 tmpStudRecs = new Dictionary <string, List <JHSchool.Data.JHStudentRecord> >(); List <JHSchool.Data.JHStudentRecord> AllStudRecList = JHSchool.Data.JHStudent.SelectAll(); foreach (JHSchool.Data.JHStudentRecord studRec in AllStudRecList) { if (studRec.Class != null) { if (studRec.Class.GradeYear.HasValue && studRec.Status == K12.Data.StudentRecord.StudentStatus.一般) { string grYear = studRec.Class.GradeYear.Value + ""; if (tmpStudRecs.ContainsKey(grYear)) { tmpStudRecs[grYear].Add(studRec); } else { List <JHSchool.Data.JHStudentRecord> studRecList = new List <JHSchool.Data.JHStudentRecord>(); studRecList.Add(studRec); tmpStudRecs.Add(grYear, studRecList); } } } } List <string> tmpGrYear = new List <string>(); foreach (KeyValuePair <string, List <JHSchool.Data.JHStudentRecord> > Grade in tmpStudRecs) { tmpGrYear.Add(Grade.Key); } tmpGrYear.Sort(); cboGradeYear.Items.AddRange(tmpGrYear.ToArray()); lblHasGraduateCount.Text = ""; lblTotalCount.Text = ""; GraduateStudRecs = new List <JHPermrec.UpdateRecord.DAL.StudDiplomaInfoJuniorDiplomaNumber>(); NGraduateStudRecs = new List <JHPermrec.UpdateRecord.DAL.StudDiplomaInfoJuniorDiplomaNumber>(); // 加入標頭 dgGraduateDocNoData.Columns.Add("StudentID", "StudentID"); dgGraduateDocNoData.Columns.Add("ClassName", "班級"); dgGraduateDocNoData.Columns.Add("SeatNo", "座號"); dgGraduateDocNoData.Columns.Add("StudentNum", "學號"); dgGraduateDocNoData.Columns.Add("Name", "姓名"); dgGraduateDocNoData.Columns.Add("Status", "離校類別"); dgGraduateDocNoData.Columns.Add("GRDocNo", "畢業證書字號"); dgGraduateDocNoData.Columns.Add("Sort1", "Sort1"); cboSortBySnum.Checked = true; if (Errors == null) { Errors = new EnhancedErrorProvider(); } studRecSDIs = new List <JHPermrec.UpdateRecord.DAL.StudDiplomaInfoJuniorDiplomaNumber>(); }
public void setStudent_Status(JHSchool.Data.JHStudentRecord student, AddTransStudStatus status) { _student = student; _status = status; Errors = new EnhancedErrorProvider(); // Errors.Icon = Properties.Resources.warning; cboNewNationality.Items.AddRange(DALTransfer1.GetNationalities().ToArray()); //cboClass.Items.Add(new KeyValuePair<string, string>("", "<空白>")); // //foreach (KeyValuePair<string, string> classItem in Utility.GetClassNameIDDict()) //{ // cboClass.Items.Add(classItem); //} //cboClass.DisplayMember = "Value"; //cboClass.ValueMember = "Key"; //cboClass.AutoCompleteMode = AutoCompleteMode.SuggestAppend; //cboClass.AutoCompleteSource = AutoCompleteSource.ListItems; cboNewGender.Items.AddRange(new string[] { "男", "女" }); if (student != null) { //把資料填入各項控制項當中 txtName.Text = txtNewName.Text = _student.Name; txtSSN.Text = txtNewSSN.Text = _student.IDNumber; if (_student.Birthday.HasValue) { dtBirthDate.Text = dtNewBirthday.Text = _student.Birthday.Value.ToString(); } cboGender.Text = cboNewGender.Text = _student.Gender; cboNationality.Text = cboNewNationality.Text = _student.Nationality; txtBirthPlace.Text = txtNewBirthPlace.Text = _student.BirthPlace; _StudentPhone = JHSchool.Data.JHPhone.SelectByStudentID(_student.ID); txtTel.Text = txtNewTel.Text = _StudentPhone.Contact; //txtEngName.Text = txtNewEngName.Text = _student.na if (_student.Class != null) { lblClassName.Text = _student.Class.Name; } if (_student.SeatNo.HasValue) { lblSeatNo.Text = cboSeatNo.Text = _student.SeatNo.Value.ToString(); } lblStudentNum.Text = cbotStudentNumber.Text = _student.StudentNumber; // 如果轉出又入,使用原班 lblNewClassName.Text = lblClassName.Text; } //依照status不同調整畫面大小 if (status == AddTransStudStatus.Added) { gpOld.Visible = false; this.Size = new Size(422, 438); //txtNewName.Text = ""; txtNewSSN.Text = AddTransBackgroundManager.StudentIDNumber; } else { gpOld.Visible = true; this.Size = new Size(823, 379); } // setClassNo(); reLoadStudNumItems(); this.MaximumSize = this.MinimumSize = this.Size; //AddTransBackgroundManager.AddTransStudBaseObj = this; }