/// <summary> /// 科室数据相关,带“全部”项的下拉选项 /// </summary> /// <param name="dataType"></param> /// <returns></returns> public DataTable GetBasicData(DeptDataSourceType dataType, bool IsAll) { DataTable dt = new DataTable(); switch (dataType) { case DeptDataSourceType.全部科室: dt = NewDao <IPublicManageDao>().GetAllDept(); break; case DeptDataSourceType.门诊临床科室: dt = NewDao <IPublicManageDao>().GetOPClinicalDept(); break; case DeptDataSourceType.住院临床科室: dt = NewDao <IPublicManageDao>().GetIPClinicalDept(); break; case DeptDataSourceType.药剂科室: dt = NewDao <IPublicManageDao>().GetDrugDept(); break; case DeptDataSourceType.药房科室: dt = NewDao <IPublicManageDao>().GetPharmacyDept(); break; case DeptDataSourceType.药库科室: dt = NewDao <IPublicManageDao>().GetDrugStorageDept(); break; case DeptDataSourceType.物资科室: dt = NewDao <IPublicManageDao>().GetMaterialsDept(); break; case DeptDataSourceType.住院病区: dt = NewDao <IPublicManageDao>().GetWardDept(); break; } if (IsAll) { DataTable _dt = dt.Clone(); DataRow _dr = _dt.NewRow(); _dr["DeptId"] = -1; _dr["Name"] = "全部"; _dr["Pym"] = ""; _dr["Wbm"] = ""; _dr["Szm"] = ""; _dr["Memo"] = ""; _dt.Rows.Add(_dr); foreach (DataRow dr in dt.Rows) { _dt.Rows.Add(dr.ItemArray); } return(_dt); } else { return(dt); } }
/// <summary> /// 科室数据相关 /// </summary> /// <param name="dataType"></param> /// <returns></returns> public DataTable GetBasicData(DeptDataSourceType dataType) { return(GetBasicData(dataType, false)); }