using System; using System.Data; using System.Data.SqlClient; using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; using HelperDB; namespace AIMSDAL { internal partial class DPerson { public static List GetruleAnesthesiaDoctor(string IDS) { List ruleAnesthesiaDoctors = new List(); ruleAnesthesiaDoctors.Add(""); string sql = string.Format("select top 15 RuleAnesthesiaDoctor from [dbo].[OperationRecordInfo] where RuleAnesthesiaDoctor is not null and RuleAnesthesiaDoctor<>'' {0} group by RuleAnesthesiaDoctor order by count(RuleAnesthesiaDoctor) desc ", (IDS == "" ? "" : (" and RuleAnesthesiaDoctor Like '%" + IDS + "%' "))); DataTable obj = DBHelper.GetDataTable(sql); if (obj != null && obj.Rows.Count > 0) foreach (DataRow item in obj.Rows) { if (item[0].ToString().Trim() != "") ruleAnesthesiaDoctors.Add(item[0].ToString()); } return ruleAnesthesiaDoctors; } public static List GetruleNurse(string IDS) { List ruleNurses = new List(); ruleNurses.Add(""); string sql = string.Format("select top 15 ruleNurse from [dbo].[OperationRecordInfo] where ruleNurse is not null and ruleNurse<>'' {0} group by ruleNurse order by count(ruleNurse) desc ", (IDS == "" ? "" : (" and ruleNurse Like '%" + IDS + "%' "))); DataTable obj = DBHelper.GetDataTable(sql); if (obj != null && obj.Rows.Count > 0) foreach (DataRow item in obj.Rows) { if (item[0].ToString().Trim() != "") ruleNurses.Add(item[0].ToString()); } return ruleNurses; } public static List Getexperts(string IDS) { List expertss = new List(); expertss.Add(""); string sql = string.Format("select top 15 experts from [dbo].[OperationRecordInfo] where experts is not null and experts<>'' {0} group by experts order by count(experts) desc ", (IDS == "" ? "" : (" and experts Like '%" + IDS + "%' "))); DataTable obj = DBHelper.GetDataTable(sql); if (obj != null && obj.Rows.Count > 0) foreach (DataRow item in obj.Rows) { if (item[0].ToString().Trim() != "") expertss.Add(item[0].ToString()); } return expertss; } } }