App_Code/ChapterMgr.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Data.SqlClient;

	/// <summary>
	/// 章节管理类
	/// </summary>
	public class ChapterMgr
	{
		public ChapterMgr()
		{

		}

		#region 函数UpdateChapter | 更新章节信息
		/// <summary>
		/// 更新章节类
		/// </summary>
		/// <param name="chapter">章节参数</param>
		public void UpdateChapter(Chapter chapter)
		{
			string strSQL = "";
			if (chapter.ChapterID == 0)
			{
				strSQL = "INSERT INTO Exam_Chapter (ChapterName) VALUES ('" + chapter.ChapterName + "')";
			}
			else
			{
				strSQL = "UPDATE Exam_Chapter SET ChapterName = '" + chapter.ChapterName + "' WHERE ChapterID = " + chapter.ChapterID;
			}
			CMMgr.ExecuteNonQuery(strSQL);
		}
		#endregion

		#region 函数DelChapter | 删除章节类型 | 重载3次
		/// <summary>
		/// 删除章节类型
		/// </summary>
		/// <param name="ChapterID">章节编号</param>
		public void DelChapter(string ChapterID)
		{
			string strSQL = "DELETE FROM Exam_Chapter WHERE ChapterID = " + ChapterID;
			CMMgr.ExecuteNonQuery(strSQL);
		}

		/// <summary>
		/// 删除章节类型
		/// </summary>
		/// <param name="ChapterID">章节编号</param>
		public void DelChapter(int ChapterID)
		{
			this.DelChapter(ChapterID.ToString());
		}
		
		/// <summary>
		/// 删除章节类型
		/// </summary>
		/// <param name="chapter">章节类</param>
		public void DelChapter(Chapter chapter)
		{
后面还有 51 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。