using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AccountsDAL.Query.Narration { public class NarrationQB { public const string GET_SELECTLIST_NARRATION = @"SELECT N.NARRATIONID AS Id, N.NARRATIONNAME AS Name, N.NARRATION AS Narrations, N.NARRATIONTYPE AS Type FROM MNARRATION N;"; public const string GET_NARRATION = @"SELECT N.NARRATIONID AS NarrationId, N.NARRATIONNAME AS NarrationName, N.PARAMETERSETID AS ParameterSetId, PS.PARAMETERSETCODE AS ParameterSetCode, PS.PARAMETERSETNAME AS ParameterSetName, N.NARRATIONTYPE AS NarrationType, N.NARRATION AS NarrationNarrations, N.CREATEDBYID AS NarrationCreatedById, N.CREATEDON AS NarrationCreatedOn, N.MODIFIEDBYID AS NarrationModifiedById, N.MODIFIEDON AS NarrationModifiedOn, N.SORTORDER AS NarrationSortOrder, N.STATUS AS NarrationStatus, N.VERSION AS NarrationVersion FROM MNARRATION N INNER JOIN MPARAMETERSET PS ON PS.PARAMETERSETID = N.PARAMETERSETID WHERE N.NARRATIONID = @narrationid;"; public const string SAVE_NARRATION = @"INSERT INTO MNARRATION ( NARRATIONID, NARRATIONNAME, NARRATIONTYPE, PARAMETERSETID, NARRATION, SORTORDER, STATUS, VERSION, CREATEDBYID, CREATEDON, MODIFIEDBYID, MODIFIEDON, SOURCETYPE, TENANTID ) VALUES ( @NarrationId, @NarrationName, @NarrationType, @ParameterSetId, @NarrationNarrations, @NarrationSortOrder, @NarrationStatus, @NarrationVersion, @NarrationCreatedById, @NarrationCreatedOn, @NarrationModifiedById, @NarrationModifiedOn, @SourceType, @TenantId ); "; public const string UPDATE_NARRATION = @"UPDATE MNARRATION SET NARRATIONNAME = @NarrationName, NARRATIONTYPE = @NarrationType, PARAMETERSETID = @ParameterSetId, NARRATION = @NarrationNarrations, SORTORDER = @NarrationSortOrder, STATUS = @NarrationStatus, VERSION = VERSION + 1, MODIFIEDBYID = @NarrationModifiedById, MODIFIEDON = GETDATE(), SOURCETYPE = @SourceType, TENANTID = @TenantId WHERE NARRATIONID = @NarrationId;"; public const string DELETE_NARRATION = @"DELETE FROM MNARRATION WHERE NARRATIONID = @narrationid"; } }