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

50 lines
1.6 KiB
C#

using System;
using AIMSDAL;
using AIMSModel;
using AIMSObjectQuery;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using HelperDB;
namespace AIMSBLL
{
public partial class BEvents
{
public static DataTable GetCommonlyEvents()
{
return DEvents.GetCommonlyEvents();
}
public static DataTable GetEventsByIds(string ids)
{
return DEvents.GetEventsByIds(ids);
}
public static DataTable SelectIdNameCode(string str)
{
return DEvents.SelectIdNameCode(str);
}
public static DataTable SelectIdName(string str)
{
string sql = string.Empty;
if (str == "")
{
sql = string.Format("select Id,HelpCode,Name from Events where IsValid=1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉结束' and UseRate>50 Order By UseRate desc");
}
else
{
sql = string.Format("SELECT Top 28 e.Id,e.Name FROM Events e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉结束' Order By UseRate desc", str);
}
try
{
return DBHelper.GetDataTable(sql);
}
catch (Exception ex)
{
throw ex;
}
}
}
}