public bool isBuildTypePending(int buildconfig) { BuildQueueTableAdapter buildQueueEntriesAdapter = new BuildQueueTableAdapter(); phxbuild.BuildQueueDataTable queueTable = buildQueueEntriesAdapter.GetBuildQueueByConfig(buildconfig); bool isBuildPending = false; if (queueTable.Count > 0) { isBuildPending = true; } return(isBuildPending); }
public void updatePendingBuildUserAndComment(int buildconfig, string user, string addedComment) { BuildQueueTableAdapter buildQueueEntriesAdapter = new BuildQueueTableAdapter(); phxbuild.BuildQueueDataTable queueTable = buildQueueEntriesAdapter.GetBuildQueueByConfig(buildconfig); if (queueTable.Count > 0) { string comment = null; string originalComment = queueTable[0].comment; if (addedComment != null) { comment = addedComment.Trim(); } if (originalComment != null) { comment += "\r\n\r\n" + "From: " + queueTable[0].builduser.Trim() + "\r\n" + originalComment.Trim() + "\r\n"; } buildQueueEntriesAdapter.SetUserAndCommentByQueueNum(user, comment, queueTable[0].queuenum); } }