ResiveModule.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:1k
- 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;
- }
- }
- }