コード例 #1
0
        public static DataTable GetDataYears()
        {
            string SqlStr = "";

            SqlStr = "SELECT DISTINCT  years FROM  Term ";
            return(Sql_Class.GetDataTable(SqlStr, SqlStr));
        }
コード例 #2
0
        public static DataTable GetDataYeargrade()
        {
            string SqlStr = "";

            SqlStr = "SELECT DISTINCT  yeargrade FROM  ClassStudent ";
            return(Sql_Class.GetDataTable(SqlStr, SqlStr));
        }
コード例 #3
0
        public static DataTable GetDataByYears(string p_years)
        {
            string           SqlStr = "";
            List <Parameter> d_list = new List <Parameter>();

            SqlStr = "select * from Term where years=@years ";
            d_list.Add(new Parameter("@years", p_years));
            return(Sql_Class.GetDataTable(SqlStr, d_list));
        }
コード例 #4
0
        public Student_Class(string p_id)
        {
            DataTable        dt     = new DataTable();
            string           str    = "select * from student where studentNo =@studentNo";
            List <Parameter> d_list = new List <Parameter>();

            d_list.Add(new Parameter("studentNo", p_id.ToString()));
            dt = Sql_Class.GetDataTable(str, d_list);
            SetPropertyByDt(dt);
        }
コード例 #5
0
        public ScoreRecord_Class(int p_id)
        {
            DataTable        dt     = new DataTable();
            string           str    = "select * from ScoreRecord where id =@id";
            List <Parameter> d_list = new List <Parameter>();

            d_list.Add(new Parameter("id", p_id.ToString()));
            dt = Sql_Class.GetDataTable(str, d_list);
            SetPropertyByDt(dt);
        }
コード例 #6
0
        public static DataTable GetDataByStudentAndTerm(string p_studentNo, string p_termNo)
        {
            string           SqlStr = "";
            List <Parameter> d_list = new List <Parameter>();

            SqlStr = "select * from ScoreGrade where studentNo=@studentNo and  termno=@termno ";
            d_list.Add(new Parameter("@studentNo", p_studentNo));
            d_list.Add(new Parameter("@termno", p_termNo));
            return(Sql_Class.GetDataTable(SqlStr, d_list));
        }
コード例 #7
0
        public static DataTable GetDataByStudentAndTerm(string p_studentNo, string p_termNo, string pitemtype)
        {
            string           SqlStr = "";
            List <Parameter> d_list = new List <Parameter>();

            SqlStr = "select * from Evaluation where studentNo=@studentNo and  termno=@termno and itemtype=@itemtype ";
            d_list.Add(new Parameter("@studentNo", p_studentNo));
            d_list.Add(new Parameter("@termno", p_termNo));
            d_list.Add(new Parameter("@itemtype", pitemtype));
            return(Sql_Class.GetDataTable(SqlStr, d_list));
        }
コード例 #8
0
        public static DataTable GetRecordList(string p_classtudentno, string p_termno, string p_studentName, string p_studentno, string p_Printstatus, string p_Recordstatus, string p_yeargrade)
        {
            List <Parameter> d_list = new List <Parameter>();
            string           str    = "SELECT r.*,t.termname,t.years,s.studentName,s.sex,c.classtudentName,c.yeargrade FROM ScoreRecord r,Student s ,ClassStudent c,Term t ";

            str += " WHERE r.studentNo= s.studentNo AND s.classtudentNo = c.classtudentNo AND r.termno = t.termNo ";

            if (p_classtudentno != "")
            {
                str += " AND r.termno = @termno  ";
                d_list.Add(new Parameter("@termno", p_termno));
            }
            if (p_classtudentno != "")
            {
                str += " AND s.studentName  like @studentName ";
                d_list.Add(new Parameter("@studentName", "%" + p_studentName + "%"));
            }
            if (p_classtudentno != "")
            {
                str += " AND r.studentNo LIKE @studentno  ";
                d_list.Add(new Parameter("@studentno", "%" + p_studentno + "%"));
            }
            if (p_classtudentno != "")
            {
                str += " AND c.classtudentNo =@classtudentno";
                d_list.Add(new Parameter("@classtudentno", p_classtudentno));
            }
            if (p_classtudentno != "")
            {
                str += " AND r.Printstatus =@Printstatus  ";
                d_list.Add(new Parameter("@Printstatus", p_Printstatus));
            }
            if (p_classtudentno != "")
            {
                str += " AND r.Recordstatus =@Recordstatus";
                d_list.Add(new Parameter("@Recordstatus", p_Recordstatus));
            }
            if (p_yeargrade != "")
            {
                str += " AND c.yeargrade =@yeargrade";
                d_list.Add(new Parameter("@yeargrade", p_yeargrade));
            }
            str += "    ORDER BY t.years , r.termno ,C.yeargrade ,C.classtudentNo ,s.studentNo ";
            return(Sql_Class.GetDataTable(str, d_list));
        }
コード例 #9
0
ファイル: Course_Class.cs プロジェクト: wzcb2009/Educational
        public static DataTable GetALL()
        {
            string str = "select * from Course order by CourseNo ";

            return(Sql_Class.GetDataTable(str, str));
        }
コード例 #10
0
        public static DataTable GetALL()
        {
            string str = "select * from ClassStudent order by classtudentNo ";

            return(Sql_Class.GetDataTable(str, str));
        }