2022-08-23 21:12:59 +08:00

59 lines
2.6 KiB
C#

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<string> GetruleAnesthesiaDoctor(string IDS)
{
List<string> ruleAnesthesiaDoctors = new List<string>();
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<string> GetruleNurse(string IDS)
{
List<string> ruleNurses = new List<string>();
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<string> Getexperts(string IDS)
{
List<string> expertss = new List<string>();
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;
}
}
}