91 lines
2.6 KiB
C#
91 lines
2.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;
|
|
}
|
|
}
|
|
public static bool IsExit(string Name)
|
|
{
|
|
return DEvents.IsExit(Name);
|
|
}
|
|
public static void Add(Events EventsObj)
|
|
{
|
|
DEvents.Add(EventsObj);
|
|
}
|
|
|
|
public static void UpdateUseRate(int Id)
|
|
{
|
|
DEvents.UpdateUseRate(Id);
|
|
}
|
|
|
|
public static void Delete(int Id)
|
|
{
|
|
DEvents.Delete(Id);
|
|
}
|
|
|
|
public static Events GetModel(int Id)
|
|
{
|
|
return DEvents.GetModel(Id);
|
|
}
|
|
public static Events GetModelByName(string Name)
|
|
{
|
|
return DEvents.GetModelByName(Name);
|
|
}
|
|
public static DataTable GetDataTable(string HelpCode,bool IsValid)
|
|
{
|
|
return DEvents.GetDataTable(HelpCode, IsValid);
|
|
}
|
|
|
|
public static DataTable GetEventDataTable()
|
|
{
|
|
return DEvents.GetEventDataTable();
|
|
}
|
|
|
|
public static DataTable GetDataTable()
|
|
{
|
|
return DEvents.GetDataTable();
|
|
}
|
|
|
|
}
|
|
}
|