• 大小: 1.89MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-01
  • 语言: C#
  • 标签: C#  BS  在线考试  源码  

资源简介

解压后即可直接使用的BS架构在线考试系统,用C#编写,使用ASP技术与SQL2005数据库,适合学生水平的人员进行研究修改

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using OnLineDAL;
using OnLineModels;

namespace OnLineBLL
{
    public static partial class AdminManager
    {

        //添加信息
        public static examAdmin AddAdmin(string admin_name string admin_pass int mgquestions int mgStudents int mgSystem)
        {
            if (mgquestions.ToString() == null)
            {
                mgquestions = 0;
            }
            if (mgStudents.ToString() == null)
            {
                mgStudents = 0;
            }
            if (mgSystem.ToString() == null)
            {
                mgSystem = 0;
            }
            examAdmin admin = new examAdmin();
            admin.Admin_name = admin_name;
            admin.Admin_pass = admin_pass;
            admin.Mgquestions = mgquestions;
            admin.MgStudents = mgStudents;
            admin.MgSystem = mgSystem;

            return AdminService.AddAdmin(admin);
        }

        //获取所有信息
       public static IList GetAllAdmin()
       {
            return AdminService.GetAllAdmin();
       }
       
       //根据ID获取信息
        public static examAdmin GetAdminById(int Admin_id)
        {
            return AdminService.GetAdminById(Admin_id);
        }

        //删除信息
        public static void DeleteExamAdminById(int Admin_id)
        {
            AdminService.DeleteExamAdminById(Admin_id);
        }

         //修改信息
        public static void ModifyExamAdmin(examAdmin exam_Admin)
        {
            AdminService.ModifyExamAdmin(exam_Admin);
        }

        //修改信息
        public static void ModifyExamAdmin(string admin_name string admin_pass int mgquestions int mgStudents int mgSystem int admin_id)
        {
            if (mgquestions.ToString() ==null)
            {
                mgquestions = 0;
            }
            if (mgStudents.ToString() == null)
            {
                mgStudents = 0;
            }
            if (mgSystem.ToString() == null)
            {
                mgSystem = 0;
            }
            examAdmin admin = AdminService.GetAdminById(admin_id);
            admin.Admin_name = admin_name;
            admin.Admin_pass = admin_pass;
            admin.Mgquestions = mgquestions;
            admin.MgStudents = mgStudents;
            admin.MgSystem = mgSystem;

            AdminService.ModifyExamAdmin(admin);
        }

        
        //管理员登录
        public static bool AdminLogin(string adminName string adminPwd)
        {
            examAdmin admin = AdminService.GetAdminByName(adminName);

            //用户名不存在 
            if (admin == null)
            {
               return false;
            }

            if (admin.Admin_pass == adminPwd)
            {
                return true;
            }
            else
            {
                //密码错误
                return false;
            }
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5841  2010-04-04 15:22  Online1\OnLineWeb.sln

     文件      10040  2009-09-05 10:28  Online1\OnLineDAL\AllQuestionsService.cs

     文件       6486  2009-07-25 18:02  Online1\OnLineDAL\QuestionTypeService.cs

     文件       3512  2009-09-04 10:02  Online1\OnLineDAL\ExamPaperService.cs

     文件       6141  2009-07-26 17:11  Online1\OnLineDAL\StuClassService.cs

     文件       6721  2009-07-26 16:59  Online1\OnLineDAL\StudentService.cs

     文件       6706  2009-09-03 19:55  Online1\OnLineDAL\StuScoreService.cs

     文件       6172  2009-07-26 21:42  Online1\OnLineDAL\AllSubjectService.cs

     文件       7888  2009-07-27 14:07  Online1\OnLineDAL\AdminService.cs

     文件       3491  2009-08-18 20:11  Online1\OnLineDAL\ConnDBHelper.cs

     文件       2655  2009-08-18 03:49  Online1\OnLineDAL\OnLineDAL.csproj

     文件      12259  2009-09-03 22:27  Online1\OnLineDAL\PapermgService.cs

     文件       1337  2009-06-17 10:01  Online1\OnLineDAL\Properties\AssemblyInfo.cs

     文件    1048576  2010-04-04 15:24  Online1\DB\onlineExam1_Log.LDF

     文件    1441792  2010-04-04 15:24  Online1\DB\onlineExam1_Data.MDF

     文件       4332  2009-09-05 10:33  Online1\OnLineBLL\AllQuestionsManager.cs

     文件       1397  2009-07-26 20:50  Online1\OnLineBLL\QuestionTypeManager.cs

     文件       2856  2009-07-29 22:42  Online1\OnLineBLL\StudentManager.cs

     文件       1362  2009-09-03 22:27  Online1\OnLineBLL\PapermgManager.cs

     文件       2015  2009-08-19 00:02  Online1\OnLineBLL\ExamPaperManager.cs

     文件       3110  2009-08-02 17:25  Online1\OnLineBLL\AdminManager.cs

     文件       2746  2009-08-18 04:02  Online1\OnLineBLL\OnLineBLL.csproj

     文件       1289  2009-07-26 17:13  Online1\OnLineBLL\StuClassManager.cs

     文件        620  2009-09-03 16:31  Online1\OnLineBLL\StuScoreManager.cs

     文件       1320  2009-08-02 18:45  Online1\OnLineBLL\AllSubjectManager.cs

     文件       1337  2009-06-17 10:01  Online1\OnLineBLL\Properties\AssemblyInfo.cs

     文件       1754  2009-09-11 22:08  Online1\OnLineWeb\index.aspx

     文件        417  2009-07-27 10:09  Online1\OnLineWeb\MasterPage.master.cs

     文件        383  2005-09-07 09:40  Online1\OnLineWeb\Default.aspx.cs

     文件       1919  2009-08-02 16:27  Online1\OnLineWeb\Web.Config

............此处省略101个文件信息

评论

共有 条评论