Ejemplo n.º 1
0
 private void cbb_Term_SelectedIndexChanged(object sender, EventArgs e)
 {
     BLL.TERM_INFO   termBll = new BLL.TERM_INFO();
     Model.TERM_INFO termMdl = new Model.TERM_INFO();
     termMdl = termBll.GetModel(this.cbb_Term.Properties.Items[this.cbb_Term.SelectedIndex].ToString());
     init_workflow(termMdl.TERMNO);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 读取数据
        /// </summary>
        private void readData()
        {
            if (this._termno > 0)
            {
                BLL.TERM_INFO   termBll = new BLL.TERM_INFO();
                Model.TERM_INFO termMdl = new Model.TERM_INFO();

                termMdl = termBll.GetModel(_termno);
                if (termMdl == null)   //新增学期功能时
                {
                    blankData();
                }
                else                   //修改学期功能时
                {
                    this.te_termname.Text  = termMdl.TERMNAME;
                    this.dt_begintime.Text = termMdl.BEGINTIME.ToString();
                    this.dt_endtime.Text   = termMdl.ENDTIME.ToString();
                    if (termMdl.FLAG == 0)
                    {
                        this.cbb_flag.Text = "非当前学期";
                    }
                    else
                    {
                        this.cbb_flag.Text = "当前学期";
                    }
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 增加数据方法
        /// </summary>
        private void Add()
        {
            int termno, teacherno, workflowno;

            if (this.cbb_teacher.SelectedIndex == -1)
            {
                MessageBox.Show("请选择指导教师!", "提示信息");
                return;
            }

            BLL.STUDENT_INFO   studentBll  = new BLL.STUDENT_INFO();
            BLL.TERM_INFO      termBll     = new BLL.TERM_INFO();
            Model.TERM_INFO    termMdl     = new Model.TERM_INFO();
            BLL.WORKFLOW       workflowBll = new BLL.WORKFLOW();
            Model.WORKFLOW     workflowMdl = new Model.WORKFLOW();
            BLL.TEACHER_INFO   teacherBll  = new BLL.TEACHER_INFO();
            Model.TEACHER_INFO teacherMdl  = new Model.TEACHER_INFO();
            BLL.TEA_STU        teastuBll   = new BLL.TEA_STU();
            Model.TEA_STU      teastuMdl   = new Model.TEA_STU();

            termMdl = termBll.GetModel(this.cbb_term.Properties.Items[this.cbb_term.SelectedIndex].ToString());
            termno  = termMdl.TERMNO;

            workflowMdl = workflowBll.GetModel(this.cbb_workflow.Properties.Items[this.cbb_workflow.SelectedIndex].ToString());
            workflowno  = workflowMdl.WORKFLOWNO;

            teacherMdl = teacherBll.GetModel(this.cbb_teacher.Properties.Items[this.cbb_teacher.SelectedIndex].ToString());
            teacherno  = teacherMdl.TEACHERNO;

            teastuMdl.TEACHERNO  = teacherno;
            teastuMdl.TERMNO     = termno;
            teastuMdl.WORKFLOWNO = workflowno;

            //获取所选学生学号列表
            this.lstCheckedStudentNo.Clear();

            if (this.tl_student.Nodes.Count > 0)
            {
                foreach (TreeListNode root in tl_student.Nodes)
                {
                    GetCheckedStudentNo(root);
                }
            }

            //将所选学生插入该教师所指导学生列表中
            string idStr = string.Empty;

            foreach (string stuno in lstCheckedStudentNo)
            {
                teastuMdl.STUNO = stuno;
                teastuBll.Add(teastuMdl);
            }
            //显示更新数据
            readData(2);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 读取数据
        /// </summary>
        private void readData(int flag)
        {
            int termno, teacherno, workflowno;

            BLL.STUDENT_INFO   studentBll  = new BLL.STUDENT_INFO();
            BLL.TERM_INFO      termBll     = new BLL.TERM_INFO();
            Model.TERM_INFO    termMdl     = new Model.TERM_INFO();
            BLL.WORKFLOW       workflowBll = new BLL.WORKFLOW();
            Model.WORKFLOW     workflowMdl = new Model.WORKFLOW();
            BLL.TEACHER_INFO   teacherBll  = new BLL.TEACHER_INFO();
            Model.TEACHER_INFO teacherMdl  = new Model.TEACHER_INFO();

            termMdl = termBll.GetModel(this.cbb_term.Properties.Items[this.cbb_term.SelectedIndex].ToString());
            termno  = termMdl.TERMNO;

            workflowMdl = workflowBll.GetModel(this.cbb_workflow.Properties.Items[this.cbb_workflow.SelectedIndex].ToString());
            workflowno  = workflowMdl.WORKFLOWNO;

            //初始化学生列表
            this.tl_student.DataSource                  = studentBll.GetStudentNodeList(termno, workflowno).Tables[0];
            this.tl_student.KeyFieldName                = "nodeid";
            this.tl_student.ParentFieldName             = "parentid";
            this.tl_student.Columns["nodename"].Caption = "学生列表";

            //初始化教师指导学生列表
            string condition = "";

            condition += " and D.TERMNO = '" + termno.ToString() + "' ";
            condition += " and E.WORKFLOWNO = '" + workflowno.ToString() + "' ";
            if (flag == 2)
            {
                teacherMdl = teacherBll.GetModel(this.cbb_teacher.Properties.Items[this.cbb_teacher.SelectedIndex].ToString());
                teacherno  = teacherMdl.TEACHERNO;
                condition += " and C.TEACHERNO = '" + teacherno.ToString() + "' ";
            }

            BLL.TEA_STU teastuBll = new BLL.TEA_STU();
            this.gridControl1.DataSource = teastuBll.GetList(condition).Tables[0];
            this.gridView1.BestFitColumns();
            DBUtility.ToolHelper.DrawRowIndicator(gridView1, 50);
            DBUtility.ToolHelper.SetLineColorofGridView(this.gridView1);
        }