日期:2014-05-20 浏览次数:20792 次
LinqHISDBDataContext lqDB = new LinqHISDBDataContext(ConfigurationManager.ConnectionStrings["HISLinqDB_ConnectionString"].ConnectionString.ToString());
var result001 = from bed in lqDB.zy_bed_mi
join unit in lqDB.zd_unit_code
on bed.dept_sn equals unit.code
select new
{
dept_sn = unit.name,
bed_no = bed.bed_no,
bed_status = bed.bed_status,
patient_id = bed.patient_id,
sex = bed.sex,
type = bed.type
};
GridView1.DataSource = result001;
GridView1.DataBind();