Пример #1
0
        public FrmEditStudent(StudentExt studentext)
        {
            InitializeComponent();
            //初始化变量
            txtStudentId.Text = studentext.StudentId.ToString();
            txtAddress.Text   = studentext.StudentAddress;
            dtpBirthday.Text  = studentext.Birthday.ToShortDateString();
            txtCardNo.Text    = studentext.CardNo;
            cboClassName.Text = studentext.ClassName;

            txtPhoneNumber.Text = studentext.PhoneNumber;
            txtStudentIdNo.Text = studentext.StudentIdNo;
            txtStudentName.Text = studentext.StudentName;
            pbStu.Image         = studentext.StuImage.Length == 0 ? Image.FromFile("default.png") : (Image) new SerializeObjectToString().DeserializeObject(studentext.StuImage);

            if (studentext.Gender == "男")
            {
                this.rdoMale.Checked = true;
            }
            else
            {
                rdoFemale.Checked = true;
            }
            //初始化班级下拉框
            cboClassName.DataSource    = objClassservice.GetClasses();
            cboClassName.DisplayMember = "ClassName";
            cboClassName.ValueMember   = "ClassID";
            cboClassName.Text          = studentext.ClassName;
        }
Пример #2
0
 public FrmScoreManage()
 {
     InitializeComponent();
     cboClass.DataSource    = objClass.GetClasses();
     cboClass.DisplayMember = "ClassName";
     cboClass.ValueMember   = "ClassID";
     cboClass.SelectedIndex = -1;
 }
 public FrmStudentManage()
 {
     InitializeComponent();
     //初始化班级
     cboClass.DataSource    = ojbStudentClass.GetClasses();
     cboClass.DisplayMember = "ClassName";
     cboClass.ValueMember   = "ClassId";
     cboClass.SelectedIndex = -1;
 }
Пример #4
0
 public FrmScoreQuery()
 {
     InitializeComponent();
     cboClass.DataSource    = objClass.GetClasses();
     cboClass.DisplayMember = "ClassName";
     cboClass.ValueMember   = "ClassID";
     cboClass.SelectedIndex = -1;
     dt = objScore.GetScoreByClassName();
 }