plan.cs
来自「asp.net 办公自动化系统 人事管理 公文管理 内部邮件管理以及办公自动化系」· CS 代码 · 共 71 行
CS
71 行
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 + =
减小字号Ctrl + -
显示快捷键?