using System.Data; using System.Data.SqlClient SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[SiteClass.dbname].ToString()); SqlCommand cmd = new SqlCommand("dbo.Backorder", conn); conn.Open(); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@orderid", SqlDbType.BigInt); cmd.Parameters.Add("@userid", SqlDbType.Int); cmd.Parameters.Add("@alert", SqlDbType.NVarChar, 100); cmd.Parameters.Add("@success", SqlDbType.Bit); cmd.Parameters.Add("@eval", SqlDbType.NVarChar, 100); cmd.Parameters[0].Value = orderid; cmd.Parameters[1].Value = SiteClass.CurrentUserId; cmd.Parameters["@alert"].Direction = ParameterDirection.Output; cmd.Parameters["@success"].Direction = ParameterDirection.Output; cmd.Parameters["@eval"].Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); string alert = cmd.Parameters["@alert"].Value.ToString(); bool success = cmd.Parameters["@success"].Value.ToString().AsBool(); string eval = cmd.Parameters["@eval"].Value.ToString();搜索 Response.Write(SiteClass.writejson(true,true,alert,"",eval)); Response.End();
时间: 2024-11-09 22:14:28