void _bwWork_DoWork(object sender, DoWorkEventArgs e) { //load phone information _PhoneRecord = Phone.SelectByStudentID(PrimaryKey); //load student remark List<UDT.StudentRemark> remarks = (new AccessHelper()).Select<UDT.StudentRemark>("ref_student_id=" + this.PrimaryKey); if (remarks.Count > 0) _remark = remarks[0]; }
// �x�s��� protected override void OnSaveButtonClick(EventArgs e) { //Update Phone Information _PermanentPhone = txtEverPhone.Text; _ContactPhone = txtContactPhone.Text; _SMS = txtMobile1.Text; _OtherPhone1 = txtCompanyPhone.Text; _OtherPhone2 = txtMobile2.Text; _OtherPhone3 = txtOtherPhone.Text; _PhoneRecord.Permanent = _PermanentPhone ; _PhoneRecord.Contact = _ContactPhone ; _PhoneRecord.Cell = _SMS ; _PhoneRecord.Phone1 = _OtherPhone1; _PhoneRecord.Phone2 = _OtherPhone2; _PhoneRecord.Phone3 = _OtherPhone3; Phone.Update(_PhoneRecord); this.addLog(); //Update Remark Information if (this._remark == null) { this._remark = new UDT.StudentRemark(); this._remark.StudentID = int.Parse(PrimaryKey); } this._remark.Remark = this.txtContactRemark.Text; List<ActiveRecord> recs = new List<ActiveRecord>(); recs.Add(this._remark); (new AccessHelper()).SaveAll(recs); this.logAgent.Save("�q�T���.�ǥ�", "", "", Log.LogTargetCategory.Student, this.PrimaryKey); BindDataToForm(); }