Beispiel #1
0
        private void AddTeacherCourseForm_Load(object sender, EventArgs e)
        {
            CourseSearchForm    csf      = new CourseSearchForm();
            string              courseNo = b;
            Course              c        = new Course(courseNo, "");
            CourseManagerAction cma      = new CourseManagerAction();

            cma.setCourse(c);
            cma.loadOpenedCourseDetail(lv);
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string courseNo         = b;
            CourseManagerAction cma = new CourseManagerAction();

            cma.openCourse(courseNo, tb1.Text, tb2.Text, tb3.Text);
            Course c = new Course(courseNo, "");

            cma.setCourse(c);
            cma.loadOpenedCourseDetail(lv);
        }
Beispiel #3
0
        private void bt5_Click(object sender, EventArgs e)
        {
            if (tb4.Text == "")
            {
                MessageBox.Show("请输入修改信息", "Error", MessageBoxButtons.OK);
                return;
            }
            CourseManagerAction cma = new CourseManagerAction();

            cma.OpenedCourseUpdate(tb4.Text, tb5.Text, tb6.Text, tb7.Text);
        }
Beispiel #4
0
        private void StudentListForm_Load(object sender, EventArgs e)
        {
            string teacherCourseNo = a;
            string courseName      = c;

            tb1.Text = teacherCourseNo;
            tb2.Text = courseName;
            CourseManagerAction cma = new CourseManagerAction();

            cma.loadOpenedCourseStudent(lv, teacherCourseNo);
        }
Beispiel #5
0
        private void bt4_Click(object sender, EventArgs e)
        {
            Course c = new Course(tb3.Text, tb4.Text);
            CourseManagerAction cma = new CourseManagerAction();

            cma.setCourse(c);
            if (cma.CourseUpdate())
            {
                MessageBox.Show("修改成功!", "提示信息", MessageBoxButtons.OK);
            }
            else
            {
                MessageBox.Show("修改失败!", "提示信息", MessageBoxButtons.OK);
            }
        }
Beispiel #6
0
 private void bt3_Click(object sender, EventArgs e)
 {
     if (lv.SelectedItems.Count == 0)
     {
         MessageBox.Show("请选择一条信息", "Error", MessageBoxButtons.OK);
         return;
     }
     else
     {
         this.ClientSize = new System.Drawing.Size(458, 464);
         courseNo        = lv.SelectedItems[0].SubItems[0].Text;
         Course c = new Course(courseNo, "");
         CourseManagerAction cma = new CourseManagerAction();
         cma.setCourse(c);
         cma.loadOpenedCourse(lv1);
     }
 }
Beispiel #7
0
        private void bt2_Click(object sender, EventArgs e)
        {
            if (lv.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择一条信息", "Error", MessageBoxButtons.OK);
                return;
            }
            string teacherCourseNo  = lv.SelectedItems[0].Text.ToString();
            CourseManagerAction cma = new CourseManagerAction();

            if (cma.OpenedCourseDelete(teacherCourseNo))
            {
                MessageBox.Show("该学生记录已删除!", "提示信息", MessageBoxButtons.OK);
            }
            else
            {
                MessageBox.Show("删除失败!", "提示信息", MessageBoxButtons.OK);
            }
        }
Beispiel #8
0
 private void bt_Click(object sender, EventArgs e)
 {
     if (tbcno.Text == "")
     {
         MessageBox.Show("课号不能为空!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         CourseManagerAction cma = new CourseManagerAction();
         Course course           = new Course(tbcno.Text, tbcna.Text);
         cma.setCourse(course);
         if (cma.CourseInsert())
         {
             ListViewItem lvi = new ListViewItem();
             lvi.SubItems[0].Text = tbcno.Text;
             lvi.SubItems.Add(tbcna.Text);
             lv.Items.Add(lvi);
             MessageBox.Show("添加成功!", "提示信息", MessageBoxButtons.OK);
         }
     }
     tbcno.Clear();
     tbcna.Clear();
 }
Beispiel #9
0
 private void bt1_Click(object sender, EventArgs e)
 {
     lv.Items.Clear();
     CourseManagerAction.loadAllOpenedCourse(lv, tb1.Text, tb3.Text, tb2.Text);
 }