示例#1
0
        public EditStudent(string studNo)
        {
            InitializeComponent();
            Student student = studentDAL.FindStudent(studNo);

            textBox1.Text         = student.StudNo;
            textBox2.Text         = student.StudName;
            radioButton1.Checked  = student.StudSex == '男' ? true : false;
            dateTimePicker1.Value = student.StudBirthDate;
            comboBox1.Text        = student.StudMajor;
            checkBox1.Checked     = student.StudIsMember;
            if (student.StudPic != null)
            {
                MemoryStream ms = new MemoryStream(student.StudPic);
                pictureBox1.Image = Image.FromStream(ms);
            }
        }