AIMS/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs
leomon 82591fb825 器械清点生命体征不显示
数千访视添加了Ada分级,术中麻醉记录单应该同步过来
4间9:54血压显示的不对
点击获取数据的时候才会把有创血压加载出来 不自动画点血压
2022-11-09 20:32:37 +08:00

71 lines
2.9 KiB
C#

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Generic;
using AIMSModel;
using AIMSObjectQuery;
using System.Reflection;
using System.Text;
namespace AIMSDAL
{
internal partial class DApplyAnaesthesiaMethod
{
public static void Add(ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into [ApplyAnaesthesiaMethod](");
strSql.Append("OperationApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate");
strSql.Append(")");
strSql.Append(" values (");
strSql.Append("" + ApplyAnaesthesiaMethodObj.OperationApplyId + ",");
strSql.Append("" + ApplyAnaesthesiaMethodObj.AnaesthesiaMethodId + ",");
strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperatorNo + "',");
strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperatorName + "',");
strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperateDate + "'");
strSql.Append(")");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static void Delete(int OperationApplyId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("delete ApplyAnaesthesiaMethod ");
strSql.Append(" where OperationApplyId=" + OperationApplyId + "");
HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
}
public static List<int> GetApplyAnaesthesiaMethodList(int OperationApplyId)
{
List<int> ApplyAnaesthesiaMethodIdList = new List<int>();
string strSql = "SELECT AnaesthesiaMethodId FROM ApplyAnaesthesiaMethod WHERE OperationApplyId='" + OperationApplyId + "'";
DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
for (int i = 0; i < dt.Rows.Count; i++)
{
ApplyAnaesthesiaMethodIdList.Add(int.Parse(dt.Rows[i]["AnaesthesiaMethodId"].ToString()));
}
return ApplyAnaesthesiaMethodIdList;
}
public static string GetApplyAnaesthesiaMethod(int OperationApplyId)
{
string ApplyAnaesthesiaMethodIdList = "";
StringBuilder sb = new StringBuilder();
string strSql = "SELECT AnaesthesiaMethodId FROM ApplyAnaesthesiaMethod WHERE OperationApplyId='" + OperationApplyId + "'";
DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
for (int i = 0; i < dt.Rows.Count; i++)
{
sb.Append(dt.Rows[i]["AnaesthesiaMethodId"].ToString() + ",");
}
if (sb.ToString().Length > 1)
{
ApplyAnaesthesiaMethodIdList = sb.ToString().Substring(0, sb.ToString().Length - 1);
}
return ApplyAnaesthesiaMethodIdList;
}
}
}