Modified the parameters for the stored procedure `[dbo].[PRSIG_API_ADD_DOC]` in the `DocumentCreateReadSQL` class. Replaced `@BYTE_DATA` with `@BYTE_DATA1`, repositioned `@ENV_UID`, and ensured `@OUT_DOCID` is explicitly marked as an output parameter.
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using Dapper;
|
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
|
|
namespace EnvelopeGenerator.Application.SQL;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class DocumentCreateReadSQL : ISQL<EnvelopeDocument>
|
|
{
|
|
/// <summary>
|
|
/// Base64, OUT_UID
|
|
/// </summary>
|
|
public string Raw => @"
|
|
DECLARE @BYTE_DATA1 as VARBINARY(MAX)
|
|
SET @BYTE_DATA1 = CONVERT(VARBINARY(MAX),{0})
|
|
DECLARE @OUT_DOCID int
|
|
|
|
EXEC [dbo].[PRSIG_API_ADD_DOC]
|
|
{1},
|
|
@BYTE_DATA1,
|
|
@OUT_DOCID OUTPUT
|
|
|
|
SELECT TOP(1) *
|
|
FROM [dbo].[TBSIG_ENVELOPE_DOCUMENT]
|
|
WHERE [GUID] = @OUT_DOCID
|
|
";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="base64"></param>
|
|
/// <param name="envelope_uuid"></param>
|
|
/// <returns></returns>
|
|
public static DynamicParameters CreateParmas(string base64, string envelope_uuid)
|
|
{
|
|
var parameters = new DynamicParameters();
|
|
parameters.Add("@Base64", base64);
|
|
parameters.Add("@OUT_UID", envelope_uuid);
|
|
return parameters;
|
|
}
|
|
}
|