DELETE FROM [dbo].[Client] WHERE (([ResourceId] = @Original_ResourceId) 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], [CPUSpeed], [Memory], [Login], [Status], [ClientConfigId], [NumberOfCores]) VALUES (@ResourceId, @CPUSpeed, @Memory, @Login, @Status, @ClientConfigId, @NumberOfCores);
SELECT ResourceId, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)
SELECT * FROM dbo.Client
UPDATE [dbo].[Client] SET [ResourceId] = @ResourceId, [CPUSpeed] = @CPUSpeed, [Memory] = @Memory, [Login] = @Login, [Status] = @Status, [ClientConfigId] = @ClientConfigId, [NumberOfCores] = @NumberOfCores WHERE (([ResourceId] = @Original_ResourceId) 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, CPUSpeed, Memory, Login, Status, ClientConfigId, NumberOfCores FROM Client WHERE (ResourceId = @ResourceId)
SELECT CPUSpeed, ClientConfigId, Login, Memory, NumberOfCores, ResourceId, Status FROM Client WHERE (Status <> 'offline')
SELECT CPUSpeed, ClientConfigId, Login, Memory, NumberOfCores, ResourceId, Status FROM Client WHERE (ResourceId = @Id)
DELETE FROM [dbo].[Resource] WHERE (([ResourceId] = @Original_ResourceId) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)))
INSERT INTO [dbo].[Resource] ([ResourceId], [Name]) VALUES (@ResourceId, @Name);
SELECT ResourceId, Name FROM Resource WHERE (ResourceId = @ResourceId)
SELECT * FROM dbo.Resource
UPDATE [dbo].[Resource] SET [ResourceId] = @ResourceId, [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].[ClientGroup] WHERE (([ResourceId] = @Original_ResourceId))
INSERT INTO [dbo].[ClientGroup] ([ResourceId]) VALUES (@ResourceId);
SELECT ResourceId FROM ClientGroup WHERE (ResourceId = @ResourceId)
SELECT * 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 [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 * 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 = @ResourceId
DELETE FROM [dbo].[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_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)) AND ((@IsNull_ProjectId = 1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND ((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)))
INSERT INTO [dbo].[Job] ([JobId], [ParentJobId], [JobState], [ResourceId], [Percentage], [SerializedJob], [DateCreated], [DateCalculated], [Priority], [ProjectId], [UserId]) VALUES (@JobId, @ParentJobId, @JobState, @ResourceId, @Percentage, @SerializedJob, @DateCreated, @DateCalculated, @Priority, @ProjectId, @UserId);
SELECT JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId FROM Job WHERE (JobId = @JobId)
SELECT * FROM dbo.Job
UPDATE [dbo].[Job] SET [JobId] = @JobId, [ParentJobId] = @ParentJobId, [JobState] = @JobState, [ResourceId] = @ResourceId, [Percentage] = @Percentage, [SerializedJob] = @SerializedJob, [DateCreated] = @DateCreated, [DateCalculated] = @DateCalculated, [Priority] = @Priority, [ProjectId] = @ProjectId, [UserId] = @UserId 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_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)) AND ((@IsNull_ProjectId = 1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND ((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)));
SELECT JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId FROM Job WHERE (JobId = @JobId)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (JobState = 'calculating') OR (JobState = 'idle')
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (JobState = 'calculating') AND (ResourceId = @ResourceId)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (ResourceId = @ResourceId)
SELECT * FROM dbo.Job WHERE JobId = @Id
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (JobId = @Id)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (ParentJobId = @Id)
SELECT DateCalculated, DateCreated, JobId, JobState, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (JobState = @State)
SELECT * FROM dbo.Job WHERE UserId = @UserId
DELETE FROM [dbo].[JobResult] WHERE (([JobResultId] = @Original_JobResultId) AND ((@IsNull_JobId = 1 AND [JobId] IS NULL) OR ([JobId] = @Original_JobId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_DateFinished = 1 AND [DateFinished] IS NULL) OR ([DateFinished] = @Original_DateFinished)))
INSERT INTO [dbo].[JobResult] ([JobResultId], [JobId], [JobResult], [Message], [Percentage], [ResourceId], [DateFinished]) VALUES (@JobResultId, @JobId, @JobResult, @Message, @Percentage, @ResourceId, @DateFinished);
SELECT JobResultId, JobId, JobResult, Message, Percentage, ResourceId, DateFinished FROM JobResult WHERE (JobResultId = @JobResultId)
SELECT * FROM dbo.JobResult
UPDATE [dbo].[JobResult] SET [JobResultId] = @JobResultId, [JobId] = @JobId, [JobResult] = @JobResult, [Message] = @Message, [Percentage] = @Percentage, [ResourceId] = @ResourceId, [DateFinished] = @DateFinished WHERE (([JobResultId] = @Original_JobResultId) AND ((@IsNull_JobId = 1 AND [JobId] IS NULL) OR ([JobId] = @Original_JobId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_DateFinished = 1 AND [DateFinished] IS NULL) OR ([DateFinished] = @Original_DateFinished)));
SELECT JobResultId, JobId, JobResult, Message, Percentage, ResourceId, DateFinished FROM JobResult WHERE (JobResultId = @JobResultId)
SELECT * FROM dbo.JobResult WHERE JobResultId = @Id
SELECT * FROM dbo.JobResult WHERE JobId = @JobId