?? getemployeeinformation.cs
字號:
using System;
using System.Data ;
using System.Data .SqlClient ;
namespace BlueHill.BlueHillWindows.SalaryManagement
{
/// GetEmployeeInformation 的摘要說明。
// 連接數(shù)據(jù)庫并為FormDepartmentSum創(chuàng)建資源
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;
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -