DELETE FROM [dbo].[Resource] WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)))
INSERT INTO [dbo].[Resource] ([Name]) VALUES (@Name);
SELECT ResourceId, Name FROM Resource WHERE (ResourceId = SCOPE_IDENTITY())
SELECT ResourceId, Name FROM dbo.Resource
UPDATE [dbo].[Resource] SET [Name] = @Name WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)));
SELECT ResourceId, Name FROM Resource WHERE (ResourceId = @ResourceId)
SELECT Resource.* FROM
Resource INNER JOIN Client ON Resource.ResourceId = Client.ResourceId
WHERE Client.Status <> 'offline'
SELECT * FROM dbo.Resource WHERE ResourceId = @ID
SELECT * FROM dbo.Resource WHERE Name = @Name
DELETE FROM [dbo].[Client] WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_GUID = 1 AND [GUID] IS NULL) OR ([GUID] = @Original_GUID)) AND ((@IsNull_CPUSpeed = 1 AND [CPUSpeed] IS NULL) OR ([CPUSpeed] = @Original_CPUSpeed)) AND ((@IsNull_Memory = 1 AND [Memory] IS NULL) OR ([Memory] = @Original_Memory)) AND ((@IsNull_Login = 1 AND [Login] IS NULL) OR ([Login] = @Original_Login)) AND ((@IsNull_Status = 1 AND [Status] IS NULL) OR ([Status] = @Original_Status)) AND ((@IsNull_ClientConfigId = 1 AND [ClientConfigId] IS NULL) OR ([ClientConfigId] = @Original_ClientConfigId)) AND ((@IsNull_NumberOfCores = 1 AND [NumberOfCores] IS NULL) OR ([NumberOfCores] = @Original_NumberOfCores)))
INSERT INTO [dbo].[Client] ([ResourceId], [GUID], [CPUSpeed], [Memory], [Login], [Status], [ClientConfigId], [NumberOfCores]) VALUES (@ResourceId, @GUID, @CPUSpeed, @Memory, @Login, @Status, @ClientConfigId, @NumberOfCores);
SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)
SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM dbo.Client
UPDATE [dbo].[Client] SET [ResourceId] = @ResourceId, [GUID] = @GUID, [CPUSpeed] = @CPUSpeed, [Memory] = @Memory, [Login] = @Login, [Status] = @Status, [ClientConfigId] = @ClientConfigId, [NumberOfCores] = @NumberOfCores WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_GUID = 1 AND [GUID] IS NULL) OR ([GUID] = @Original_GUID)) AND ((@IsNull_CPUSpeed = 1 AND [CPUSpeed] IS NULL) OR ([CPUSpeed] = @Original_CPUSpeed)) AND ((@IsNull_Memory = 1 AND [Memory] IS NULL) OR ([Memory] = @Original_Memory)) AND ((@IsNull_Login = 1 AND [Login] IS NULL) OR ([Login] = @Original_Login)) AND ((@IsNull_Status = 1 AND [Status] IS NULL) OR ([Status] = @Original_Status)) AND ((@IsNull_ClientConfigId = 1 AND [ClientConfigId] IS NULL) OR ([ClientConfigId] = @Original_ClientConfigId)) AND ((@IsNull_NumberOfCores = 1 AND [NumberOfCores] IS NULL) OR ([NumberOfCores] = @Original_NumberOfCores)));
SELECT ResourceId, GUID, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)
SELECT * FROM dbo.Client WHERE Status <> 'offline'
SELECT * FROM dbo.Client WHERE GUID = @ID
SELECT * FROM dbo.Client WHERE ResourceId = @Id
DELETE FROM [dbo].[ClientGroup] WHERE (([ResourceId] = @Original_ResourceId))
INSERT INTO [dbo].[ClientGroup] ([ResourceId]) VALUES (@ResourceId);
SELECT ResourceId FROM ClientGroup WHERE (ResourceId = @ResourceId)
SELECT ResourceId FROM dbo.ClientGroup
UPDATE [dbo].[ClientGroup] SET [ResourceId] = @ResourceId WHERE (([ResourceId] = @Original_ResourceId));
SELECT ResourceId FROM ClientGroup WHERE (ResourceId = @ResourceId)
SELECT * FROM dbo.ClientGroup WHERE ResourceId = @Id
DELETE FROM [Job] WHERE (([JobId] = @Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([ParentJobId] = @Original_ParentJobId)) AND ((@IsNull_JobState = 1 AND [JobState] IS NULL) OR ([JobState] = @Original_JobState)) AND ((@IsNull_PermissionOwnerId = 1 AND [PermissionOwnerId] IS NULL) OR ([PermissionOwnerId] = @Original_PermissionOwnerId)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Original_DateCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NULL) OR ([DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1 AND [Priority] IS NULL) OR ([Priority] = @Original_Priority)))
INSERT INTO [Job] ([ParentJobId], [JobState], [PermissionOwnerId], [ResourceId], [SerializedJob], [Percentage], [DateCreated], [DateCalculated], [Priority]) VALUES (@ParentJobId, @JobState, @PermissionOwnerId, @ResourceId, @SerializedJob, @Percentage, @DateCreated, @DateCalculated, @Priority);
SELECT JobId, ParentJobId, JobState, PermissionOwnerId, ResourceId, SerializedJob, Percentage, DateCreated, DateCalculated, Priority FROM Job WHERE (JobId = SCOPE_IDENTITY())
SELECT JobId, ParentJobId, JobState, PermissionOwnerId, ResourceId, SerializedJob, Percentage, DateCreated, DateCalculated, Priority
FROM Job
UPDATE [Job] SET [ParentJobId] = @ParentJobId, [JobState] = @JobState, [PermissionOwnerId] = @PermissionOwnerId, [ResourceId] = @ResourceId, [SerializedJob] = @SerializedJob, [Percentage] = @Percentage, [DateCreated] = @DateCreated, [DateCalculated] = @DateCalculated, [Priority] = @Priority WHERE (([JobId] = @Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([ParentJobId] = @Original_ParentJobId)) AND ((@IsNull_JobState = 1 AND [JobState] IS NULL) OR ([JobState] = @Original_JobState)) AND ((@IsNull_PermissionOwnerId = 1 AND [PermissionOwnerId] IS NULL) OR ([PermissionOwnerId] = @Original_PermissionOwnerId)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Original_DateCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NULL) OR ([DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1 AND [Priority] IS NULL) OR ([Priority] = @Original_Priority)));
SELECT JobId, ParentJobId, JobState, PermissionOwnerId, ResourceId, SerializedJob, Percentage, DateCreated, DateCalculated, Priority FROM Job WHERE (JobId = @JobId)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob FROM Job WHERE (JobState = 'calculating') OR (JobState = 'idle')
SELECT JobId, JobState, ParentJobId, PermissionOwnerId, ResourceId, SerializedJob, Percentage, DateCreated, DateCalculated, Priority
FROM Job
WHERE (JobState = 'calculating') AND (ResourceId = @ResourceId)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob FROM Job WHERE (ResourceId = @ResourceId)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob
FROM Job
WHERE (JobId = @Id)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob FROM Job WHERE (JobState = @State)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob FROM Job WHERE (ParentJobId = @Id)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, PermissionOwnerId, Priority, ResourceId, SerializedJob FROM Job WHERE (PermissionOwnerId = @PermissionOwnerId)
DELETE FROM [dbo].[ClientGroup_Resource] WHERE (([ClientGroupId] = @Original_ClientGroupId) AND ([ResourceId] = @Original_ResourceId))
INSERT INTO [dbo].[ClientGroup_Resource] ([ClientGroupId], [ResourceId]) VALUES (@ClientGroupId, @ResourceId);
SELECT ClientGroupId, ResourceId FROM ClientGroup_Resource WHERE (ClientGroupId = @ClientGroupId) AND (ResourceId = @ResourceId)
SELECT ClientGroupId, ResourceId FROM dbo.ClientGroup_Resource
UPDATE [dbo].[ClientGroup_Resource] SET [ClientGroupId] = @ClientGroupId, [ResourceId] = @ResourceId WHERE (([ClientGroupId] = @Original_ClientGroupId) AND ([ResourceId] = @Original_ResourceId));
SELECT ClientGroupId, ResourceId FROM ClientGroup_Resource WHERE (ClientGroupId = @ClientGroupId) AND (ResourceId = @ResourceId)
SELECT * FROM dbo.ClientGroup_Resource WHERE ClientGroupId = @Id
SELECT * FROM dbo.ClientGroup_Resource WHERE ClientGroupId = @ClientGroupId AND ResourceId = @ResourceId
SELECT * FROM dbo.ClientGroup_Resource WHERE ResourceId = @Id
DELETE FROM [JobResult] WHERE (([JobResultId] = @Original_JobResultId) AND ((@IsNull_JobId = 1 AND [JobId] IS NULL) OR ([JobId] = @Original_JobId)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateFinished = 1 AND [DateFinished] IS NULL) OR ([DateFinished] = @Original_DateFinished)))
INSERT INTO [JobResult] ([JobId], [JobResult], [ResourceId], [Message], [Percentage], [DateFinished]) VALUES (@JobId, @JobResult, @ResourceId, @Message, @Percentage, @DateFinished);
SELECT JobResultId, JobId, JobResult, ResourceId, Message, Percentage, DateFinished FROM JobResult WHERE (JobResultId = SCOPE_IDENTITY())
SELECT JobResultId, JobId, JobResult, ResourceId, Message, Percentage, DateFinished
FROM JobResult
UPDATE [JobResult] SET [JobId] = @JobId, [JobResult] = @JobResult, [ResourceId] = @ResourceId, [Message] = @Message, [Percentage] = @Percentage, [DateFinished] = @DateFinished WHERE (([JobResultId] = @Original_JobResultId) AND ((@IsNull_JobId = 1 AND [JobId] IS NULL) OR ([JobId] = @Original_JobId)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateFinished = 1 AND [DateFinished] IS NULL) OR ([DateFinished] = @Original_DateFinished)));
SELECT JobResultId, JobId, JobResult, ResourceId, Message, Percentage, DateFinished FROM JobResult WHERE (JobResultId = @JobResultId)
SELECT JobId, JobResult, JobResultId, Message, ResourceId, Percentage, DateFinished
FROM JobResult
WHERE (JobResultId = @Id)
SELECT JobId, JobResult, JobResultId, Message, ResourceId, Percentage, DateFinished
FROM JobResult
WHERE (JobId = @JobId)