Updated IEnvelopeReceiverExecutor with XML comments for AddEnvelopeReceiverAsync method and added necessary using directives. Introduced XML documentation for CreateParameters in EnvelopeReceiverAddReadSQL. Modified AddEnvelopeReceiverAsync in EnvelopeReceiverExecutor to accept individual parameters, improving clarity and usability.
53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using Dapper;
|
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
|
|
namespace EnvelopeGenerator.Application.SQL;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class EnvelopeReceiverAddReadSQL : ISQL<Envelope>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Raw => @"
|
|
USE [DD_ECM]
|
|
GO
|
|
|
|
DECLARE @OUT_RECEIVER_ID int
|
|
|
|
DECLARE @ENV_UID varchar(36) = @ENV_UID
|
|
|
|
EXEC [dbo].[PRSIG_API_CREATE_RECEIVER]
|
|
@ENV_UID = @ENV_UID,
|
|
@EMAIL_ADRESS = @EMAIL_ADRESS ,
|
|
@SALUTATION = @SALUTATION,
|
|
@PHONE = @PHONE,
|
|
@OUT_RECEIVER_ID = @OUT_RECEIVER_ID OUTPUT
|
|
|
|
SELECT TOP(1) *
|
|
FROM TBSIG_ENVELOPE_RECEIVER
|
|
WHERE [GUID] = @OUT_RECEIVER_ID;
|
|
";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="envelope_uuid"></param>
|
|
/// <param name="emailAddress"></param>
|
|
/// <param name="salutation"></param>
|
|
/// <param name="phone"></param>
|
|
/// <returns></returns>
|
|
public static DynamicParameters CreateParameters(string envelope_uuid, string emailAddress, string salutation, string? phone = null)
|
|
{
|
|
var parameters = new DynamicParameters();
|
|
parameters.Add("@ENV_UID", envelope_uuid);
|
|
parameters.Add("@EMAIL_ADRESS", emailAddress);
|
|
parameters.Add("@SALUTATION", salutation);
|
|
parameters.Add("@PHONE", phone);
|
|
return parameters;
|
|
}
|
|
}
|