54 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			2.1 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;
 | |
|         }
 | |
|     }
 | |
| }
 |