resivemodule.cs

来自「一个采用三层架构开放的办公自动化系统」· CS 代码 · 共 33 行

CS
33
字号
using System;
using System.Data;
using System.Data.SqlClient;
namespace qminoa.DA
{
	public class ResiveModule
	{
		private SqlDataAdapter csCommand;
		private SqlConnection conn;

		public ResiveModule()
		{
			csCommand = new SqlDataAdapter();
			csCommand.SelectCommand =new SqlCommand();
			conn      = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]);
		}

		public DataSet FillPerson(int DepartID)
		{
			SqlCommand command  = csCommand.SelectCommand;
			command.CommandText = "Msg_GetEmpByDep";
			command.CommandType = CommandType.StoredProcedure;
			SqlParameter para   = new SqlParameter("@DepartID",SqlDbType.Int);
			para.Value = DepartID;
			command.Parameters.Add(para);
			command.Connection  = conn;
			DataSet data        = new DataSet();
			csCommand.Fill(data,"person");
			return data;
		}
	}
}

⌨️ 快捷键说明

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