/// <summary>
 /// 透過身分證號設定學生資料
 /// </summary>
 /// <param name="SSN"></param>
 /// <returns></returns>
 public static void SetStudentBySSN(string SSN)
 {
     _Student = DALTransfer1.GetStudentRecBySSN(SSN);
     if (_Student != null)
     {
         _HasStudentData = true;
     }
     else
     {
         _HasStudentData = false;
     }
 }
        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 DALTransfer1.GetClassNameList())
            {
                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 = cboClass.Text = _student.Class.Name;
                }
                if (_student.SeatNo.HasValue)
                {
                    lblSeatNo.Text = cboSeatNo.Text = _student.SeatNo.Value.ToString();
                }
                lblStudentNum.Text = cbotStudentNumber.Text = _student.StudentNumber;
            }

            //依照status不同調整畫面大小
            if (_status == AddTransStudStatus.Added)
            {
                gpOld.Visible = false;
                this.Size     = new Size(422, 378);
                //txtNewName.Text = "";
                txtNewSSN.Text = AddTransBackgroundManager.StudentIDNumber;
            }
            else
            {
                gpOld.Visible = true;
                this.Size     = new Size(815, 378);
            }
            setClassNo();
            reLoadStudNumItems();

            AddTransBackgroundManager.AddTransStudBaseObj = this;
        }