⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plan.cs

📁 asp.net 办公自动化系统 人事管理 公文管理 内部邮件管理以及办公自动化系统中不可或缺的模块
💻 CS
字号:

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

namespace eOA
{
	/// <summary>
	/// Plan 的摘要说明。
	/// </summary>
	public class Plan
	{
		public Plan()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}

		public SqlDataReader GetAllPlan(int EmpID,DateTime PlanDate)
		{			
			SqlParameter[] para = {
									  new SqlParameter("@EmpID", EmpID),
									  new SqlParameter("@PlanDate", PlanDate)
								  };
			return SqlAccess.ExecuteReader(SqlAccess.CONN_STRING,CommandType.StoredProcedure, "GetAllPlan", para);
		}

		public SqlDataReader GetPlanByID(int PlanID)
		{			
			SqlParameter[] para = {
									  new SqlParameter("@PlanID", PlanID)
								  };
			return SqlAccess.ExecuteReader(SqlAccess.CONN_STRING,CommandType.StoredProcedure, "GetPlanByID", para);
		}

		public void AddPlan(int EmpID,string Subject,string Content,DateTime PlanDate,DateTime CreatDate)
		{
			SqlParameter[] para = {
									  new SqlParameter("@EmpID", EmpID),
									  new SqlParameter("@Subject", Subject),
									  new SqlParameter("@Content", Content),
									  new SqlParameter("@PlanDate", PlanDate),
				                      new SqlParameter("@CreatDate", CreatDate)
								  };

			SqlAccess.ExecuteNonQuery(SqlAccess.CONN_STRING, CommandType.StoredProcedure, "AddPlan", para);
		}
		public void UpdatePlan(int PlanID,string Subject,string Content,DateTime CreatDate)
		{
			SqlParameter[] para = {
									  new SqlParameter("@PlanID", PlanID),
									  new SqlParameter("@Subject", Subject),
									  new SqlParameter("@Content", Content),
									  new SqlParameter("@CreatDate", CreatDate)
								  };

			SqlAccess.ExecuteNonQuery(SqlAccess.CONN_STRING, CommandType.StoredProcedure, "UpdatePlan", para);
		}

		public void DeletePlan(int PlanID)
		{
			SqlParameter[] para = {
									  new SqlParameter("@PlanID", PlanID)
								  };

			SqlAccess.ExecuteNonQuery(SqlAccess.CONN_STRING, CommandType.StoredProcedure, "DeletePlan", para);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -