📄 getemployeeinformation.cs
字号:
using System;
using System.Data ;
using System.Data .SqlClient ;
namespace BlueHill.BlueHillWindows.SalaryManagement
{
/// GetEmployeeInformation 的摘要说明。
// 连接数据库并为FormDepartmentSum创建资源
public class GetEmployeeInformation
{
public SqlConnection conn=null;
public SqlDataAdapter adp=null;
public DataSet ds=null;
public string deptname;
public DataSet displayEmployee()
{
conn=new SqlConnection ("integrated security=SSPI;data source=(local);initial catalog=BlueHill");
adp=new SqlDataAdapter ("select *from tblEmployee where DeptID=(select DeptID from tblDepartment where DeptName='"+deptname+"')",conn);
ds=new DataSet ();
adp.Fill (ds,"tblEmployee");
return ds;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -