Ejemplo n.º 1
0
        private void StudentMain_Load(object sender, EventArgs e)
        {
            //获取学生信息
            StudentInfoIBLL studentInfo = (StudentInfoIBLL)factBll.CreateUser("StudentInfoBLL");

            StudentInfoTable   = studentInfo.StudentInfo(UserLevel.UserIdall);
            lblName.Text       = StudentInfoTable.Rows[0][1].ToString(); //显示学生姓名
            OnLimeTime.Enabled = true;                                   //启用闹钟
        }
Ejemplo n.º 2
0
        private void StudentInfo_Load(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用查询学生信息业务层接口,和创建BLL层工厂创建具体的BLL层类
            StudentInfoIBLL studentIBLL = (StudentInfoIBLL)factBLL.CreateUser("StudentInfoBLL");
            //调用查询学生信息方法
            DataTable StudentTable = studentIBLL.StudentInfo(UserLevel.UserIdall);

            txtCardno.Text = StudentTable.Rows[0][0].ToString(); //显示卡号
            txtName.Text   = StudentTable.Rows[0][1].ToString(); //姓名
            cmbSex.Text    = StudentTable.Rows[0][2].ToString(); //性别
            txtAge.Text    = StudentTable.Rows[0][3].ToString(); //年龄
            txtGrade.Text  = StudentTable.Rows[0][7].ToString(); //年级
            txtAddes.Text  = StudentTable.Rows[0][6].ToString(); //地址
            txtNumber.Text = StudentTable.Rows[0][4].ToString(); //手机号
            txtWeixin.Text = StudentTable.Rows[0][5].ToString(); //微信号
        }