ZUGFeRDRESTService: Fix procedure call
This commit is contained in:
parent
f04e1b4c85
commit
33ae746399
@ -192,13 +192,16 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
_logger.Debug("Calling validation prodecure.");
|
_logger.Debug("Calling validation prodecure.");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using SqlCommand oCommand = new SqlCommand("EXEC PRCUST_INV_CHECK_FROM_PORTAL @REF_GUID, @MSG_OUTPUT");
|
using SqlCommand oCommand = new SqlCommand("PRCUST_INV_CHECK_FROM_PORTAL");
|
||||||
oCommand.Parameters.Add("REF_GUID", System.Data.SqlDbType.VarChar, 250).Value = oMessageId;
|
oCommand.CommandType = System.Data.CommandType.StoredProcedure;
|
||||||
oCommand.Parameters.Add("MSG_OUTPUT", System.Data.SqlDbType.VarChar, 500).Direction = System.Data.ParameterDirection.Output;
|
|
||||||
|
oCommand.Parameters.Clear();
|
||||||
|
oCommand.Parameters.Add("@REF_GUID", System.Data.SqlDbType.VarChar, 250).Value = oMessageId;
|
||||||
|
oCommand.Parameters.Add("@MSG_OUTPUT", System.Data.SqlDbType.VarChar, 500).Direction = System.Data.ParameterDirection.Output;
|
||||||
|
|
||||||
if (_database.MSSQL.ExecuteNonQuery(oCommand))
|
if (_database.MSSQL.ExecuteNonQuery(oCommand))
|
||||||
{
|
{
|
||||||
string oReturnValue = (string)oCommand.Parameters["MSG_OUTPUT"].Value;
|
string oReturnValue = (string)oCommand.Parameters["@MSG_OUTPUT"].Value;
|
||||||
return new Tuple<bool, string>(true, oReturnValue);
|
return new Tuple<bool, string>(true, oReturnValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user