Exemplo n.º 1
0
        private void FillData()
        {
            listener.SuspendListen();

            txtSchool.Text         = _BeforeEnrollmentRecord.School;
            txtSchoolLocation.Text = _BeforeEnrollmentRecord.SchoolLocation;
            txtClass.Text          = _BeforeEnrollmentRecord.ClassName;
            if (_BeforeEnrollmentRecord.SeatNo.HasValue)
            {
                txtSeatNo.Text = _BeforeEnrollmentRecord.SeatNo.Value + "";
            }
            else
            {
                txtSeatNo.Text = "";
            }
            txtMemo.Text = _BeforeEnrollmentRecord.Memo;
            epSeatNo.Clear();
            listener.ResumeListen();
            listener.Reset();

            prlp.SetBeforeSaveText("學校名稱", txtSchool.Text);
            prlp.SetBeforeSaveText("所在地", txtSchoolLocation.Text);
            prlp.SetBeforeSaveText("班級", txtClass.Text);
            prlp.SetBeforeSaveText("座號", txtSeatNo.Text);
            prlp.SetBeforeSaveText("備註", txtMemo.Text);
        }
Exemplo n.º 2
0
        // 載入 Log
        private void SetLoadDataToLog()
        {
            try
            {
                prlp.ClearCache();

                string sy = "", ss = "", key = "";
                if (_course.SchoolYear.HasValue)
                {
                    sy = _course.SchoolYear.Value.ToString();
                }
                if (_course.Semester.HasValue)
                {
                    ss = _course.Semester.Value.ToString();
                }

                key = sy + "學年度第" + ss + "學期" + "學號:" + _student.StudentNumber + " 姓名:" + _student.Name + " " + _course.Name;


                foreach (DataGridViewRow dgvr in dgv.Rows)
                {
                    if (dgvr.IsNewRow)
                    {
                        continue;
                    }

                    string strExamName = "", strScore = "", strEffort = "", strText = "";

                    if (dgvr.Cells[chExamName.Index].Value == null)
                    {
                        continue;
                    }

                    strExamName = dgvr.Cells[chExamName.Index].Value.ToString();

                    if (dgvr.Cells[chScore.Index].Value != null)
                    {
                        strScore = dgvr.Cells[chScore.Index].Value.ToString();
                    }

                    if (dgvr.Cells[chEffort.Index].Value != null)
                    {
                        strEffort = dgvr.Cells[chEffort.Index].Value.ToString();
                    }

                    if (dgvr.Cells[chText.Index].Value != null)
                    {
                        strText = dgvr.Cells[chText.Index].Value.ToString();
                    }

                    prlp.SetBeforeSaveText(key + strExamName + "分數評量", strScore);
                    prlp.SetBeforeSaveText(key + strExamName + "努力程度", strEffort);
                    prlp.SetBeforeSaveText(key + strExamName + "文字描述", strText);
                }
            }
            catch (Exception ex)
            {
                FISCA.Presentation.Controls.MsgBox.Show("Log發生錯誤.");
            }
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        private void BindDataToForm()
        {
            SaveButtonVisible   = false;
            CancelButtonVisible = false;

            this._DefaultSchoolYear = "";
            this._DefaultGDNumber   = "";
            this._DefaultMemo       = "";
            this._DefaultReason     = "";
            this._DefaultClass      = "";

            DataListener.SuspendListen();
            txtSchoolYear.Text = "";
            txtGDNumber.Text   = "";
            txtMemo.Text       = "";
            cboReason.Text     = "";
            txtClass.Text      = "";
            cboReason.Items.Clear();
            cboReason.Items.Add("畢業");
            cboReason.Items.Add("修業");
            cboReason.Items.Add("");
            cboReason.DropDownStyle = ComboBoxStyle.DropDownList;


            if (LeaveInfoRec.SchoolYear.HasValue)
            {
                txtSchoolYear.Text = this._DefaultSchoolYear = "" + LeaveInfoRec.SchoolYear.Value;
            }
            if (!string.IsNullOrEmpty(LeaveInfoRec.DiplomaNumber))
            {
                txtGDNumber.Text = this._DefaultGDNumber = LeaveInfoRec.DiplomaNumber;
            }

            if (!string.IsNullOrEmpty(LeaveInfoRec.Memo))
            {
                txtMemo.Text = this._DefaultMemo = LeaveInfoRec.Memo;
            }

            if (!string.IsNullOrEmpty(LeaveInfoRec.Reason))
            {
                cboReason.Text = this._DefaultReason = LeaveInfoRec.Reason;
            }

            //if (!string.IsNullOrEmpty(LeaveInfoRec.ClassName))
            //    txtClass.Text = this._DefaultClass = LeaveInfoRec.ClassName;
            epSchoolYear.Clear();
            prlp.SetBeforeSaveText("畢業學年度", this._DefaultSchoolYear);
            prlp.SetBeforeSaveText("畢業資格", this._DefaultReason);
            prlp.SetBeforeSaveText("畢業證書字號", this._DefaultGDNumber);
            prlp.SetBeforeSaveText("畢業相關訊息", this._DefaultMemo);

            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;
        }
Exemplo n.º 6
0
 private void SetBeforeEditLog()
 {
     prlp.SetBeforeSaveText("姓名", txtName.Text);
     prlp.SetBeforeSaveText("身分證號", txtSSN.Text);
     prlp.SetBeforeSaveText("生日", txtBirthDate.Text);
     prlp.SetBeforeSaveText("性別", cboGender.Text);
     prlp.SetBeforeSaveText("國籍", cboNationality.Text);
     prlp.SetBeforeSaveText("出生地", txtBirthPlace.Text);
     prlp.SetBeforeSaveText("英文姓名", txtEngName.Text);
     prlp.SetBeforeSaveText("登入帳號", txtLoginID.Text);
     prlp.SetBeforeSaveText("帳號類型", cboAccountType.Text);
     prlp.SetBeforeSaveText("電子信箱", txtEmail.Text);
 }
Exemplo n.º 7
0
        // 載入資料到畫面
        private void DataBindToForm()
        {
            if (_TeacherRec == null)
            {
                _TeacherRec = new JHTeacherRecord();
            }

            _DataListener.SuspendListen();

            txtName.Text           = _TeacherRec.Name;
            txtIDNumber.Text       = _TeacherRec.IDNumber;
            cboGender.Text         = _TeacherRec.Gender;
            txtNickname.Text       = _TeacherRec.Nickname;
            txtPhone.Text          = _TeacherRec.ContactPhone;
            txtEmail.Text          = _TeacherRec.Email;
            txtCategory.Text       = _TeacherRec.Category;
            txtSTLoginAccount.Text = _TeacherRec.TALoginName;
            txtSTLoginPwd.Text     = _TeacherRec.TAPassword;
            cboAccountType.Text    = _TeacherRec.AccountType;

            try
            {
                pic1.Image = Photo.ConvertFromBase64Encoding(_TeacherRec.Photo, pic1.Width, pic1.Height);
            }
            catch (Exception)
            {
                pic1.Image = pic1.InitialImage;
            }



            // Log
            prlp.SetBeforeSaveText("姓名", txtName.Text);
            prlp.SetBeforeSaveText("身分證號", txtIDNumber.Text);
            prlp.SetBeforeSaveText("性別", cboGender.Text);
            prlp.SetBeforeSaveText("暱稱", txtNickname.Text);
            prlp.SetBeforeSaveText("聯絡電話", txtPhone.Text);
            prlp.SetBeforeSaveText("電子信箱", txtEmail.Text);
            prlp.SetBeforeSaveText("教師類別", txtCategory.Text);
            prlp.SetBeforeSaveText("登入帳號", txtSTLoginAccount.Text);
            prlp.SetBeforeSaveText("登入密碼", txtSTLoginPwd.Text);
            prlp.SetBeforeSaveText("帳號類型", cboAccountType.Text);
            this.Loading        = false;
            SaveButtonVisible   = false;
            CancelButtonVisible = false;
            _DataListener.Reset();
            _DataListener.ResumeListen();
        }
Exemplo n.º 8
0
        private void BindDataToForm()
        {
            _DataListener.SuspendListen();
            // 預設值
            LoadDefaultDataToForm();
            LoadDALDefaultDataToForm();

            // Before log
            prlp.SetBeforeSaveText("班級名稱", txtClassName.Text);
            prlp.SetBeforeSaveText("年級", cboGradeYear.Text);
            prlp.SetBeforeSaveText("班導師", cboTeacher.Text);
            prlp.SetBeforeSaveText("排列序號", txtSortOrder.Text);
            if (_ClassRecord != null)
            {
                prlp.SetBeforeSaveText("班級命名規則", _ClassRecord.NamingRule);
            }
            _DataListener.Reset();
            _DataListener.ResumeListen();
            this.Loading        = false;
            SaveButtonVisible   = false;
            CancelButtonVisible = false;
        }
Exemplo n.º 9
0
        void bkWorkUpgrd_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            PermRecLogProcess prlp = new PermRecLogProcess();

            foreach (DataGridViewRow dgv in dgClassUpgrade.Rows)
            {
                if (dgv.Cells[5].Value != null)
                {
                    prlp.SetBeforeSaveText(dgv.Cells[2].Value.ToString() + "班級名稱", dgv.Cells[2].Value.ToString());
                    prlp.SetAfterSaveText(dgv.Cells[2].Value.ToString() + "班級名稱", dgv.Cells[4].Value.ToString());
                    prlp.SetBeforeSaveText(dgv.Cells[2].Value.ToString() + "班級年級", dgv.Cells[1].Value.ToString());
                    prlp.SetAfterSaveText(dgv.Cells[2].Value.ToString() + "班級年級", dgv.Cells[3].Value.ToString());
                }
            }
            prlp.SetAction("學籍.班級升級");
            prlp.SetActionBy("學籍系統", "班級升級或畢業");
            prlp.SetDescTitle("班級調整:");
            prlp.SaveLog("", "", "", "");

            MessageBox.Show("完成");
            this.Close();
        }
Exemplo n.º 10
0
        private void BindDataToDataGridView()
        {
            try
            {
                ChangeManager.SuspendListen();
                dataGridViewX1.Rows.Clear();
                foreach (K12.Data.SemesterHistoryItem shi in _SemesterHistoryRec.SemesterHistoryItems)
                {
                    string SchoolDayCount = "", seatNo = "";
                    if (shi.SeatNo.HasValue)
                    {
                        seatNo = shi.SeatNo.Value + "";
                    }
                    if (shi.SchoolDayCount.HasValue)
                    {
                        SchoolDayCount = shi.SchoolDayCount.Value + "";
                    }

                    dataGridViewX1.Rows.Add(shi.SchoolYear, shi.Semester, shi.GradeYear, shi.ClassName, seatNo, shi.Teacher, SchoolDayCount);

                    // 這段在記log
                    string logIdxStr = shi.SchoolYear + "" + shi.Semester + "_";
                    prlp.SetBeforeSaveText(logIdxStr + "學年度", shi.SchoolYear + "");
                    prlp.SetBeforeSaveText(logIdxStr + "學期", shi.Semester + "");
                    prlp.SetBeforeSaveText(logIdxStr + "年級", shi.GradeYear + "");
                    prlp.SetBeforeSaveText(logIdxStr + "班級", shi.ClassName);
                    prlp.SetBeforeSaveText(logIdxStr + "座號", seatNo);
                    prlp.SetBeforeSaveText(logIdxStr + "班導師", shi.Teacher);
                    prlp.SetBeforeSaveText(logIdxStr + "上課天數", SchoolDayCount);
                }


                this.CancelButtonVisible = false;
                this.SaveButtonVisible   = false;
                this.ContentValidated    = true;

                ChangeManager.Reset();
                ChangeManager.ResumeListen();
                this.Loading = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// ComboBox 用
        /// </summary>
        /// <param name="strValue"></param>
        /// <param name="obj"></param>
        /// <param name="logObjName"></param>
        /// <returns></returns>
        public ComboBoxEx SetFormData(string strValue, ComboBoxEx obj, string logObjName)
        {
            if (string.IsNullOrEmpty(strValue))
            {
                obj.Text = "";
                _prlp.SetBeforeSaveText(logObjName, "");
            }
            else
            {
                obj.Text = strValue;
                _prlp.SetBeforeSaveText(logObjName, strValue);
            }

            return(obj);
        }
Exemplo n.º 12
0
        // 填入地址資訊到畫面
        public void BindDataToForm()
        {
            DataListenerPause();

            prlp.SetBeforeSaveText("戶籍郵遞區號", _StudAddressRec.Permanent.ZipCode);
            prlp.SetBeforeSaveText("戶籍縣市", _StudAddressRec.Permanent.County);
            prlp.SetBeforeSaveText("戶籍鄉鎮市區", _StudAddressRec.Permanent.Town);
            prlp.SetBeforeSaveText("戶籍村里", _StudAddressRec.Permanent.District);
            prlp.SetBeforeSaveText("戶籍鄰", _StudAddressRec.Permanent.Area);
            prlp.SetBeforeSaveText("戶籍其它地址", _StudAddressRec.Permanent.Detail);
            prlp.SetBeforeSaveText("戶籍經度", _StudAddressRec.Permanent.Longitude);
            prlp.SetBeforeSaveText("戶籍緯度", _StudAddressRec.Permanent.Latitude);
            prlp.SetBeforeSaveText("聯絡郵遞區號", _StudAddressRec.Mailing.ZipCode);
            prlp.SetBeforeSaveText("聯絡縣市", _StudAddressRec.Mailing.County);
            prlp.SetBeforeSaveText("聯絡鄉鎮市區", _StudAddressRec.Mailing.Town);
            prlp.SetBeforeSaveText("聯絡村里", _StudAddressRec.Mailing.District);
            prlp.SetBeforeSaveText("聯絡鄰", _StudAddressRec.Mailing.Area);
            prlp.SetBeforeSaveText("聯絡其它地址", _StudAddressRec.Mailing.Detail);
            prlp.SetBeforeSaveText("聯絡經度", _StudAddressRec.Mailing.Longitude);
            prlp.SetBeforeSaveText("聯絡緯度", _StudAddressRec.Mailing.Latitude);
            prlp.SetBeforeSaveText("其它郵遞區號", _StudAddressRec.Address1.ZipCode);
            prlp.SetBeforeSaveText("其它縣市", _StudAddressRec.Address1.County);
            prlp.SetBeforeSaveText("其它鄉鎮市區", _StudAddressRec.Address1.Town);
            prlp.SetBeforeSaveText("其它村里", _StudAddressRec.Address1.District);
            prlp.SetBeforeSaveText("其它鄰", _StudAddressRec.Address1.Area);
            prlp.SetBeforeSaveText("其它其它地址", _StudAddressRec.Address1.Detail);
            prlp.SetBeforeSaveText("其它經度", _StudAddressRec.Address1.Longitude);
            prlp.SetBeforeSaveText("其它緯度", _StudAddressRec.Address1.Latitude);

            this.Loading        = false;
            SaveButtonVisible   = false;
            CancelButtonVisible = false;

            // 判斷不同 Bind 到相對應
            if (_address_type == AddressType.Permanent)
            {
                txtZipcode.Text    = _StudAddressRec.Permanent.ZipCode;
                cboCounty.Text     = _StudAddressRec.Permanent.County;
                cboTown.Text       = _StudAddressRec.Permanent.Town;
                txtDistrict.Text   = _StudAddressRec.Permanent.District;
                txtArea.Text       = _StudAddressRec.Permanent.Area;
                txtDetail.Text     = _StudAddressRec.Permanent.Detail;
                txtLongtitude.Text = _StudAddressRec.Permanent.Longitude;
                txtLatitude.Text   = _StudAddressRec.Permanent.Latitude;
                _DataListener_Permanent.Reset();
                _DataListener_Permanent.ResumeListen();
            }

            if (_address_type == AddressType.Mailing)
            {
                txtZipcode.Text    = _StudAddressRec.Mailing.ZipCode;
                cboCounty.Text     = _StudAddressRec.Mailing.County;
                cboTown.Text       = _StudAddressRec.Mailing.Town;
                txtDistrict.Text   = _StudAddressRec.Mailing.District;
                txtArea.Text       = _StudAddressRec.Mailing.Area;
                txtDetail.Text     = _StudAddressRec.Mailing.Detail;
                txtLongtitude.Text = _StudAddressRec.Mailing.Longitude;
                txtLatitude.Text   = _StudAddressRec.Mailing.Latitude;
                _DataListener_Mailing.Reset();
                _DataListener_Mailing.ResumeListen();
            }

            if (_address_type == AddressType.Other)
            {
                txtZipcode.Text    = _StudAddressRec.Address1.ZipCode;
                cboCounty.Text     = _StudAddressRec.Address1.County;
                cboTown.Text       = _StudAddressRec.Address1.Town;
                txtDistrict.Text   = _StudAddressRec.Address1.District;
                txtArea.Text       = _StudAddressRec.Address1.Area;
                txtDetail.Text     = _StudAddressRec.Address1.Detail;
                txtLongtitude.Text = _StudAddressRec.Address1.Longitude;
                txtLatitude.Text   = _StudAddressRec.Address1.Latitude;
                _DataListener_Other.Reset();
                _DataListener_Other.ResumeListen();
            }
        }
Exemplo n.º 13
0
        private void buttonItem2_CheckedChanged(object sender, EventArgs e)
        {
            var button = (DevComponents.DotNetBar.ButtonItem)sender;

            if (button.Checked)
            {
                var studentRec = Student.Instance.Items[PrimaryKey];
                if (studentRec != null)
                {
                    if (button.Text != studentRec.Status)
                    {
                        //if (button.Text == "刪除")
                        //    throw new ArgumentException();

                        try
                        {
                            PermRecLogProcess prlp = new PermRecLogProcess();

                            JHSchool.Data.JHStudentRecord stu = JHSchool.Data.JHStudent.SelectByID(PrimaryKey);
                            prlp.SetBeforeSaveText("學生狀態", stu.Status.ToString());


                            if (K12.Data.StudentRecord.StudentStatus.一般.ToString() == button.Text)
                            {
                                stu.Status = K12.Data.StudentRecord.StudentStatus.一般;
                            }

                            if (K12.Data.StudentRecord.StudentStatus.休學.ToString() == button.Text)
                            {
                                stu.Status = K12.Data.StudentRecord.StudentStatus.休學;
                            }

                            if (K12.Data.StudentRecord.StudentStatus.畢業或離校.ToString() == button.Text)
                            {
                                stu.Status = K12.Data.StudentRecord.StudentStatus.畢業或離校;
                            }

                            if (K12.Data.StudentRecord.StudentStatus.輟學.ToString() == button.Text)
                            {
                                stu.Status = K12.Data.StudentRecord.StudentStatus.輟學;
                            }

                            if (K12.Data.StudentRecord.StudentStatus.刪除.ToString() == button.Text)
                            {
                                stu.Status = K12.Data.StudentRecord.StudentStatus.刪除;
                            }

                            // 檢查同狀態要身分證或學號相同時,無法變更

                            List <string> checkIDNumber = new List <string>();
                            List <string> checkSnum     = new List <string>();

                            foreach (JHSchool.Data.JHStudentRecord studRec in JHSchool.Data.JHStudent.SelectAll())
                            {
                                if (studRec.Status == stu.Status)
                                {
                                    if (!string.IsNullOrEmpty(studRec.StudentNumber))
                                    {
                                        checkSnum.Add(studRec.StudentNumber.Trim());
                                    }
                                    if (!string.IsNullOrEmpty(studRec.IDNumber))
                                    {
                                        checkIDNumber.Add(studRec.IDNumber.Trim());
                                    }
                                }
                            }

                            if (checkSnum.Contains(stu.StudentNumber.Trim()))
                            {
                                MsgBox.Show("在" + stu.Status.ToString() + "狀態學號有重複無法變更.");
                                return;
                            }

                            if (checkIDNumber.Contains(stu.IDNumber.Trim()))
                            {
                                MsgBox.Show("在" + stu.Status.ToString() + "狀態身分證號有重複無法變更.");
                                return;
                            }

                            JHSchool.Data.JHStudent.Update(stu);
                            prlp.SetAfterSaveText("學生狀態", stu.Status.ToString());
                            prlp.SetActionBy("學籍", "學生學生狀態");
                            prlp.SetAction("修改學生學生狀態");
                            prlp.SaveLog("", "", "student", PrimaryKey);


                            //Feature.Legacy.EditStudent.ChangeStudentStatus(studentRec.ID, button.Text);
                        }
                        catch (ArgumentException aa)
                        {
                            MessageBox.Show("目前無法移到刪除");
                        }

                        catch
                        {
                            OnPrimaryKeyChanged(new EventArgs());
                            FISCA.Presentation.MotherForm.SetStatusBarMessage("變更狀態失敗,可能發生原因為學號或身分證號在" + button.Text + "學生中已經存在,請檢查學生資料。");
                            return;
                        }
                        Student.Instance.SyncDataBackground(studentRec.ID);
                        FISCA.Presentation.MotherForm.SetStatusBarMessage("已變更學生狀態。" + DescriptionLabel.Text);
                    }
                }
            }
        }
Exemplo n.º 14
0
        //private void Initialize()
        //{
        //    if (_isInitialized) return;
        //    _isInitialized = true;
        //}


        // 載入資料
        private void BindDataToForm()
        {
            SaveButtonVisible   = false;
            CancelButtonVisible = false;
            DataListener.SuspendListen();

            _PermanentPhone      = _ContactPhone = _SMS = _OtherPhone1 = _OtherPhone2 = _OtherPhone3 = "";
            txtEverPhone.Text    = "";
            txtContactPhone.Text = "";
            txtOtherPhone.Text   = "";
            txtSMS.Text          = "";

            if (!string.IsNullOrEmpty(_PhoneRecord.Permanent))
            {
                txtEverPhone.Text = _PermanentPhone = _PhoneRecord.Permanent;
            }
            if (!string.IsNullOrEmpty(_PhoneRecord.Contact))
            {
                txtContactPhone.Text = _ContactPhone = _PhoneRecord.Contact;
            }
            if (!string.IsNullOrEmpty(_PhoneRecord.Cell))
            {
                txtSMS.Text = _SMS = _PhoneRecord.Cell;
            }
            if (!string.IsNullOrEmpty(_PhoneRecord.Phone1))
            {
                _OtherPhone1 = _PhoneRecord.Phone1;
            }
            if (!string.IsNullOrEmpty(_PhoneRecord.Phone2))
            {
                _OtherPhone2 = _PhoneRecord.Phone2;
            }
            if (!string.IsNullOrEmpty(_PhoneRecord.Phone3))
            {
                _OtherPhone3 = _PhoneRecord.Phone3;
            }

            if (btnOthers.Text.EndsWith("1"))
            {
                txtOtherPhone.Text = _OtherPhone1;
            }

            if (btnOthers.Text.EndsWith("2"))
            {
                txtOtherPhone.Text = _OtherPhone2;
            }

            if (btnOthers.Text.EndsWith("3"))
            {
                txtOtherPhone.Text = _OtherPhone3;
            }

            prlp.SetBeforeSaveText("戶籍電話", _PermanentPhone);
            prlp.SetBeforeSaveText("聯絡電話", _ContactPhone);
            prlp.SetBeforeSaveText("行動電話", _SMS);
            prlp.SetBeforeSaveText("其他電話1", _OtherPhone1);
            prlp.SetBeforeSaveText("其他電話2", _OtherPhone2);
            prlp.SetBeforeSaveText("其他電話3", _OtherPhone3);
            LoadOtherPhone1();
            DataListener.Reset();
            DataListener.ResumeListen();
            this.Loading = false;
        }
Exemplo n.º 15
0
        private void BindDataToForm()
        {
            // Log
            prlp.SetBeforeSaveText("父親姓名", _StudParentRec.Father.Name);
            prlp.SetBeforeSaveText("父親身分證號", _StudParentRec.Father.IDNumber);
            prlp.SetBeforeSaveText("父親電話", _StudParentRec.Father.Phone);
            prlp.SetBeforeSaveText("父親存歿", _StudParentRec.Father.Living);
            prlp.SetBeforeSaveText("父親國籍", _StudParentRec.Father.Nationality);
            prlp.SetBeforeSaveText("父親職業", _StudParentRec.Father.Job);
            prlp.SetBeforeSaveText("父親最高學歷", _StudParentRec.Father.EducationDegree);
            prlp.SetBeforeSaveText("父親電子郵件", _StudParentRec.Father.EMail);
            prlp.SetBeforeSaveText("母親姓名", _StudParentRec.Mother.Name);
            prlp.SetBeforeSaveText("母親身分證號", _StudParentRec.Mother.IDNumber);
            prlp.SetBeforeSaveText("母親電話", _StudParentRec.Mother.Phone);
            prlp.SetBeforeSaveText("母親存歿", _StudParentRec.Mother.Living);
            prlp.SetBeforeSaveText("母親國籍", _StudParentRec.Mother.Nationality);
            prlp.SetBeforeSaveText("母親職業", _StudParentRec.Mother.Job);
            prlp.SetBeforeSaveText("母親最高學歷", _StudParentRec.Mother.EducationDegree);
            prlp.SetBeforeSaveText("母親電子郵件", _StudParentRec.Mother.EMail);
            prlp.SetBeforeSaveText("監護人姓名", _StudParentRec.Custodian.Name);
            prlp.SetBeforeSaveText("監護人身分證號", _StudParentRec.Custodian.IDNumber);
            prlp.SetBeforeSaveText("監護人電話", _StudParentRec.Custodian.Phone);
            prlp.SetBeforeSaveText("監護人關係", _StudParentRec.Custodian.Relationship);
            prlp.SetBeforeSaveText("監護人國籍", _StudParentRec.Custodian.Nationality);
            prlp.SetBeforeSaveText("監護人職業", _StudParentRec.Custodian.Job);
            prlp.SetBeforeSaveText("監護人最高學歷", _StudParentRec.Custodian.EducationDegree);
            prlp.SetBeforeSaveText("監護人電子郵件", _StudParentRec.Custodian.EMail);


            this.Loading        = false;
            SaveButtonVisible   = false;
            CancelButtonVisible = false;
            LoadDALDefaultData();
        }