Beispiel #1
0
        // 查看作业公告详情点击跳转事件
        private void btnCheckDetail_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Controls.Button sonBtn = (System.Windows.Controls.Button)sender;  //获取当前点击的那个按钮
                                                                                             //获取父级元素,找到要进入的公告
            Grid sonGrid = (Grid)sonBtn.Parent;

            BreifHomework clickTeachClass = (BreifHomework)sonGrid.Parent;
            //获得当前点击按钮对应的作业标题和作业描述
            string homeworkTitle = clickTeachClass.title.Content.ToString();
            //string homeworkDescription = clickTeachClass.description.Content.ToString();
            string teacherSpecId = lbTeacherInfo.Text.ToString();
            string teacherName   = lbTeacherInfo1.Text.ToString();
            string classSpecId   = labelCourseNumber.Content.ToString();
            string className     = labelCourseName.Content.ToString();
            //从数据库中查找作业描述
            DataTable tbClassId           = ts.getClassId(classSpecId);
            String    NotDesp             = ts.getNotDespByClassIdAndNotTitle(tbClassId.Rows[0][0].ToString(), homeworkTitle);
            string    homeworkDescription = NotDesp;
            //生成新界面
            CheckingClassHomework newCheckingClassHomework = new CheckingClassHomework(homeworkTitle, homeworkDescription, teacherSpecId, teacherName, classSpecId, className, this.pngfile);

            newCheckingClassHomework.pngfile = this.pngfile;
            newCheckingClassHomework.Show();
            this.Visibility = System.Windows.Visibility.Hidden;
        }
        //返回按钮
        private void btnReturn_Click(object sender, RoutedEventArgs e)
        {
            CheckingClassHomework cch = new CheckingClassHomework(tbNotTitle.Text, description, tSpecId, tName, classSpecId, className, this.pngfile);

            cch.pngfile = this.pngfile;
            cch.Show();
            this.Visibility = System.Windows.Visibility.Hidden;
        }
Beispiel #3
0
        private void btnReturn_Click(object sender, RoutedEventArgs e)
        {
            string homeworkTitle = lbNotTitle.Content.ToString();
            string description   = this.description;
            string classSpecId   = this.classSpecId;
            string teacherSpecId = tbTeacherSpecId.Text;
            string teacherName   = tbTeacherName.Text;     //可能有问题
            string className     = this.className;

            CheckingClassHomework newCheckingClassHomework = new CheckingClassHomework(homeworkTitle, description, teacherSpecId, teacherName, classSpecId, className, this.pngfile);

            newCheckingClassHomework.pngfile = this.pngfile;
            newCheckingClassHomework.Show();
            this.Visibility = System.Windows.Visibility.Hidden;
        }
Beispiel #4
0
        //点击近期作业公告事件
        private void btnRecntNo1_Click(object sender, RoutedEventArgs e)
        {
            //有一个按钮还是有问题,就一个
            Button sonBtn = (Button)sender;  //获取当前点击的那个button
            RecentNoticeControll clickRectNotice = (RecentNoticeControll)sonBtn.Parent;
            string homeworkTitle = clickRectNotice.labelNotName.Content.ToString();
            string description   = clickRectNotice.desrciption;
            string teacherSpecId = tbTeacherInfo.Text;
            string teacherName   = tbTeacherInfo1.Text;
            string classSpecId   = clickRectNotice.classSpecId;
            string className     = clickRectNotice.className;
            CheckingClassHomework newCheckingClassHomework = new CheckingClassHomework(homeworkTitle, description, teacherSpecId, teacherName, classSpecId, className, this.pngfile);

            newCheckingClassHomework.pngfile = this.pngfile;
            newCheckingClassHomework.Show();
            this.Visibility = System.Windows.Visibility.Hidden;
        }