private void reloadChkdData() { DataListener.SuspendListen(); if (objStudent.Class != null) { cboClass.Text = objStudent.Class.Name; cboClass.Items.Add(objStudent.Class.Name); this._DefaultClassName = objStudent.Class.Name; } else { cboClass.Text = string.Empty; } cboSeatNo.Text = string.Empty; this._DefaultSeatNo = string.Empty; // 當有座號 if (objStudent.SeatNo.HasValue) { if (objStudent.SeatNo.Value > 0) { string strSeatNo = objStudent.SeatNo.Value + ""; cboSeatNo.Text = strSeatNo; cboSeatNo.Items.Add(strSeatNo); this._DefaultSeatNo = strSeatNo; } } // 當有學號 if (string.IsNullOrEmpty(objStudent.StudentNumber)) { this._DefaultStudNum = string.Empty; txtStudentNumber.Text = string.Empty; } else { txtStudentNumber.Text = objStudent.StudentNumber; this._DefaultStudNum = objStudent.StudentNumber; } prlp.SetBeforeSaveText("班級", cboClass.Text); prlp.SetBeforeSaveText("座號", cboSeatNo.Text); prlp.SetBeforeSaveText("學號", txtStudentNumber.Text); tmpClassName = cboClass.Text; setClassName(); setClassNo(); DataListener.Reset(); DataListener.ResumeListen(); this.Loading = false; }
private void reloadChkdData() { DataListener.SuspendListen(); if (objStudent != null) { if (objStudent.Class != null) { lblClassName.Text = objStudent.Class.Name; this._DefaultClassName = objStudent.Class.Name; } else { lblClassName.Text = string.Empty; } lblSeatNo.Text = string.Empty; this._DefaultSeatNo = string.Empty; // 當有座號 if (objStudent.SeatNo.HasValue) { if (objStudent.SeatNo.Value > 0) { string strSeatNo = objStudent.SeatNo.Value.ToString(); lblSeatNo.Text = strSeatNo; this._DefaultSeatNo = strSeatNo; } } // 當有學號 if (string.IsNullOrEmpty(objStudent.StudentNumber)) { this._DefaultStudNum = string.Empty; txtStudentNumber.Text = string.Empty; } else { txtStudentNumber.Text = objStudent.StudentNumber; this._DefaultStudNum = objStudent.StudentNumber; } prlp.SetBeforeSaveText("班級", lblClassName.Text); prlp.SetBeforeSaveText("座號", lblSeatNo.Text); prlp.SetBeforeSaveText("學號", txtStudentNumber.Text); tmpClassName = lblClassName.Text; } DataListener.Reset(); DataListener.ResumeListen(); this.Loading = false; }
private void item_Click(object sender, EventArgs e) { ButtonItem item = sender as ButtonItem; CardPanelEnabled = true; LabelNameText = item.Text; SelectedItem = item; DataListener.SuspendListen(); SetContent((item.Tag as ScoreCalcRuleRecord).Content); DataListener.Reset(); DataListener.ResumeListen(); }