首页 > 代码库 > 调用存储过程修改

调用存储过程修改

/// <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 = http://www.mamicode.com/inp_no;
cmdDB.Parameters.Add(dp);
DbParameter dp1 = cmdDB.CreateParameter();
dp1.ParameterName = "icd10";
dp1.DbType = DbType.String;
dp1.Value = http://www.mamicode.com/icd;
cmdDB.Parameters.Add(dp1);
//cmdDB.Parameters.Add("@INP_NO", OracleType.VarChar);
//cmdDB.Parameters.Add("@icd10", OracleType.VarChar);
//cmdDB.Parameters["@INP_NO"].Value = http://www.mamicode.com/inp_no;//list[1].ToString();
//cmdDB.Parameters["@icd10"].Value = http://www.mamicode.com/icd;//list[2].ToString();
try
{
cmdDB.ExecuteNonQuery();
}
catch (Exception ex)
{
throw;
}
connDB.Close();
}

调用存储过程修改