标签:
/// <summary>
/// 2014-12-09 吴海龙
/// 测试调用pacs存储过程
/// </summary>
/// <param name="inp_no">住院号</param>
/// <param name="icd">icd编码</param>
[WebMethod]
public void TestHISCONFIRMICD(String inp_no, string icd)
{
DataSet dsOrder = new DataSet();
ConnectionStringSettings sDB = ConfigurationManager.ConnectionStrings["PacsConnectionString"];
DbProviderFactory fDB = DbProviderFactories.GetFactory(sDB.ProviderName);
using (DbConnection connDB = fDB.CreateConnection())
{
connDB.ConnectionString = sDB.ConnectionString;
try
{
connDB.Open();
}
catch (Exception ex)
{
throw;
}
DbCommand cmdDB = connDB.CreateCommand();
cmdDB.CommandType = CommandType.StoredProcedure;
DbDataAdapter daDB = fDB.CreateDataAdapter();
cmdDB.CommandText = "HisConfirmID";
DbParameter dp = cmdDB.CreateParameter();
dp.ParameterName = "INP_NO";
dp.DbType = DbType.String;
dp.Value = inp_no;
cmdDB.Parameters.Add(dp);
DbParameter dp1 = cmdDB.CreateParameter();
dp1.ParameterName = "icd10";
dp1.DbType = DbType.String;
dp1.Value = icd;
cmdDB.Parameters.Add(dp1);
//cmdDB.Parameters.Add("@INP_NO", OracleType.VarChar);
//cmdDB.Parameters.Add("@icd10", OracleType.VarChar);
//cmdDB.Parameters["@INP_NO"].Value = inp_no;//list[1].ToString();
//cmdDB.Parameters["@icd10"].Value = icd;//list[2].ToString();
try
{
cmdDB.ExecuteNonQuery();
}
catch (Exception ex)
{
throw;
}
connDB.Close();
}
标签:
原文地址:http://www.cnblogs.com/wuhailong/p/4262506.html