Ejemplo n.º 1
0
        /// <summary>
        /// 插入班级
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public int InsertClasses(Classes c)
        {
            string sql = "insert into Classes values (@0,@1,@2,@3,@4)";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, c.Classes_ID, c.Classes_Name, c.Classes_Speciality, c.ClassHeadTeacher, c.Classes_PS));
        }
Ejemplo n.º 2
0
        public object GetMinPunishment()
        {
            string sql = "select MIN(PunshmentAwardsRecode_ID) from PunshmentAwardsRecode";

            return(DataBaseHelper.cmdExecuteScalar(sql));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据班级id获取学生信息
        /// </summary>
        /// <param name="Classid"></param>
        /// <returns></returns>
        public DataTable GetStudentByClassid(string Classid)
        {
            string sql = "select * from Students where Student_Class=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, Classid));
        }
Ejemplo n.º 4
0
        //学制
        public string GetSpeYearsName(string SpecialityID)
        {
            string sql = "select sy.SpeYears_Name from SpeYears as sy join Speciality as sp on sp.Speciality_Years=sy.SpeYears_ID where sp.Speciality_ID=@0";

            return(DataBaseHelper.cmdExecuteScalar(sql, SpecialityID).ToString());
        }
Ejemplo n.º 5
0
        public int InsertPunishment(int Recode_ID, string Type_ID, string StudentID, string Content, string Reason, string date)
        {
            string sql = "insert into PunshmentAwardsRecode values(@0,@1,@2,@3,@4,@5)";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, Recode_ID, Type_ID, StudentID, Content, Reason, date));
        }
Ejemplo n.º 6
0
        public DataTable GetStudentByClassid(string classid)
        {
            string sql = "select s.Student_ID,s.Student_Name,c.Classes_Name from Students s join Classes c on s.Student_Class=c.Classes_ID where s.Student_Class=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, classid));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 根据学生id删除学生信息
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public int DeleteStudent(string studentid)
        {
            string sql = "delete from Students where Student_ID=@0";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, studentid));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据专业id获取科目
        /// </summary>
        /// <param name="specid"></param>
        /// <returns></returns>
        public DataTable GetSubjectToSpecID(string specid)
        {
            string sql = "select s.Subjects_Name,s.Subjects_ID from Subject s join Sect_Subjects ss on s.Subjects_ID=ss.Subjects_ID where ss.Sepc_ID=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, specid));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获取班级
        /// </summary>
        /// <returns></returns>
        public DataTable GetClasses()
        {
            string sql = "select * from Classes";

            return(DataBaseHelper.cmbSqlDataAdapter(sql));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 根据学生id查询成绩
        /// </summary>
        /// <param name="studentid">学生id</param>
        /// <returns></returns>
        public DataTable GetScoreByStudentid(string studentid)
        {
            string sql = "select * from Examination where StudentID=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, studentid));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 根据学生id,科目id修改成绩
        /// </summary>
        /// <param name="score">成绩</param>
        /// <param name="studentid">学生id</param>
        /// <param name="subjectid">科目id</param>
        /// <returns></returns>
        public int UpdateExamInation(string score, string studentid, string subjectid)
        {
            string sql = "update ExamInation set ExamScore=@0 where StudentID=@1 and SubjectsID=@2";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, score, studentid, subjectid));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 插入成绩
        /// </summary>
        /// <param name="studentid">学生id</param>
        /// <param name="subjectsid">科目id</param>
        /// <param name="score">成绩</param>
        /// <returns></returns>

        public int InsertExamInation(string studentid, string subjectid, string score)
        {
            string sql = "insert into Examination values(@0,@1,@2)";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, studentid, subjectid, score));
        }
Ejemplo n.º 13
0
        public DataTable GetTeacher()
        {
            string sql = "select * from Teacher";

            return(DataBaseHelper.cmbSqlDataAdapter(sql));
        }
Ejemplo n.º 14
0
        public DataTable GetExamInationByClassid(string classid)
        {
            string sql = "select * from Examination e  join Students s on e.StudentID=s.Student_ID where s.Student_Class=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, classid));
        }
Ejemplo n.º 15
0
        public int DeleteTreeViewByClassid(string classid)
        {
            string sql = "delete  from Classes where Classes_ID=@0";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, classid));
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 删除处分记录
        /// </summary>
        /// <param name="punishmentid"></param>
        /// <returns></returns>
        public int DelectPunishment(string punishmentid)
        {
            string sql = "delete from PunshmentAwardsRecode where PunshmentAwardsRecode_ID=@0";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, punishmentid));
        }
Ejemplo n.º 17
0
        public int UpdateClass(Classes c)
        {
            string sql = "update Classes set Classes_Name=@0,ClassHeadTeacher=@1,Classes_PS=@2 where Classes_ID=@3";

            return(DataBaseHelper.cmdExecuteNonQuery(sql, c.Classes_Name, c.ClassHeadTeacher, c.Classes_PS, c.Classes_ID));
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 根据专业id获取成绩
        /// </summary>
        /// <param name="specid"></param>
        /// <returns></returns>
        public DataTable GetExamInationBySpecid(string specid)
        {
            string sql = "select * from Examination e join Sect_Subjects ss on e.SubjectsID=ss.Subjects_ID where ss.Sepc_ID=@0";

            return(DataBaseHelper.cmbSqlDataAdapter(sql, specid));
        }