rendered paste bodyCREATE PROCEDURE [dbo].[BillingEvent] @EventTypeID int, @UserID int, @ProjectID intASdeclare @id intbegin tran insert into [Billing] with (rowlock) ([EventTypeID], [UserID], [ProjectID])values (@EventTypeID, @UserID, @ProjectID)set @id = SCOPE_IDENTITY()commit transelect @id-- ----------------------------------------------------CREATE PROCEDURE [dbo].[BillingEventRefresh] @EventID intASbegin tran update [Billing] with (rowlock) set [EventRefreshDT] = GETDATE() where [ID] = @EventID and [PeriodDT2] is nullcommit tran-- ----------------------------------------------------CREATE PROCEDURE [dbo].[BillingEventClose] @EventID int, @RespondentID int, @RespondentCallID int, @IsSuccess bitASbegin tran update [Billing] with (rowlock) set [PeriodDT2] = GETDATE(), [PeriodDuration] = DATEDIFF(second, [PeriodDT1], GETDATE()), [iv_RespondentID] = @RespondentID, [iv_RespondentCallID] = @RespondentCallID, [iv_IsSuccess] = @IsSuccess where [ID] = @EventIDcommit tran