Exemple #1
0
        //发布作业按钮点击跳转事件
        private void btnDeliverHomework_Click(object sender, RoutedEventArgs e)
        {
            // 打开子窗体
            AnnounceNotice newAnnounceNotice = new AnnounceNotice(lbTeacherInfo.Text.ToString(), lbTeacherInfo1.Text.ToString(), labelCourseNumber.Content.ToString()
                                                                  , labelCourseName.Content.ToString(), this.pngfile);

            newAnnounceNotice.pngfile = this.pngfile;
            newAnnounceNotice.Show();
            // 隐藏自己(父窗体)
            this.Visibility = System.Windows.Visibility.Hidden;
        }
Exemple #2
0
        //修改作业公告按钮点击事件
        private void btnModify_Click(object sender, RoutedEventArgs e)
        {
            TeacherService.TService        ts     = new TeacherService.TService();
            System.Windows.Controls.Button sonBtn = (System.Windows.Controls.Button)sender;  //获取当前点击的那个
            Grid          sonGrid         = (Grid)sonBtn.Parent;
            BreifHomework clickTeachClass = (BreifHomework)sonGrid.Parent;


            //获取父级元素
            DateTime dt = ts.getPreviousDateTime(labelCourseNumber.Content.ToString(), clickTeachClass.title.Content.ToString());
            //获取当前作业的作业截止时间
            // 打开子窗体
            AnnounceNotice newAnnounceNotice = new AnnounceNotice(lbTeacherInfo.Text.ToString(), lbTeacherInfo1.Text.ToString(), labelCourseNumber.Content.ToString()
                                                                  , labelCourseName.Content.ToString(), clickTeachClass.title.Content.ToString(), clickTeachClass.description.Content.ToString(), dt, this.pngfile);

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