Exemplo n.º 1
0
        /// <summary>
        /// 绑定学生信息
        /// </summary>
        void BindStudent()
        {
            stumodel.Student_ID = sid;
            DataRow row = student.GetStudentsByID(stumodel).Rows[0];

            this.txtHome.Text       = row["StudentAddress"].ToString();
            this.dtpBirth.Value     = Convert.ToDateTime(row["StudentBirthDay"]);
            this.txtCard.Text       = row["StudentCard"].ToString();
            this.cmbClass.Text      = row["Classes_Name"].ToString();
            this.cmbCollege.Text    = row["College_Name"].ToString();
            this.dtpEnterYear.Value = Convert.ToDateTime(row["StudentEnterYear"]);
            this.txtHomeTel.Text    = row["FamilyTel"].ToString();
            this.txtEmail.Text      = row["Email"].ToString();
            this.txtMobile.Text     = row["Mobile"].ToString();
            this.txtDormTel.Text    = row["DormTel"].ToString();
            this.txtNum.Text        = row["StudentNum"].ToString().Substring(8, 4);
            this.cmbSpeciality.Text = row["Speciality_Name"].ToString();
            this.txtName.Text       = row["Student_Name"].ToString();
            if (row["Student_Sex"].ToString() == "男")
            {
                this.radioButton1.Checked = true;
            }
            else
            {
                this.radioButton2.Checked = true;
            }
            this.txtOrigin.Text  = row["StudentOrigin"].ToString();
            this.labSpeYear.Text = row["SpeYears_Name"].ToString();
        }
Exemplo n.º 2
0
        void BindStudent()
        {
            stumodel.Student_ID = sid;
            DataRow row = student.GetStudentsByID(stumodel).Rows[0];

            this.labAddress.Text   = row["StudentAddress"].ToString();
            this.labBirth.Text     = row["StudentBirthDay"].ToString();
            this.labCard.Text      = row["StudentCard"].ToString();
            this.labClass.Text     = row["Classes_Name"].ToString();
            this.labCollege.Text   = row["College_Name"].ToString();
            this.labEnterYear.Text = row["StudentEnterYear"].ToString();
            this.labHomeTel.Text   = row["FamilyTel"].ToString();
            this.labEmail.Text     = row["Email"].ToString();
            this.labMobile.Text    = row["Mobile"].ToString();
            this.labDormTel.Text   = row["DormTel"].ToString();
            this.labNum.Text       = row["StudentNum"].ToString();
            this.labSpec.Text      = row["Speciality_Name"].ToString();
            this.labName.Text      = row["Student_Name"].ToString();
            this.labSex.Text       = row["Student_Sex"].ToString();
            this.labOrigin.Text    = row["StudentOrigin"].ToString();
            this.labSpeYear.Text   = row["SpeYears_Name"].ToString();
        }