private static StudentAssignmentM PopulateNewAssignment(System.Data.DataSet ds) { StudentAssignmentM retVal = new StudentAssignmentM(); // Populate the return value. retVal._userID = Convert.ToInt32(ds.Tables[0].Rows[0]["UserID"]); retVal._assignmentID = Convert.ToInt32(ds.Tables[0].Rows[0]["AssignmentID"]); retVal._userAssignmentID = Convert.ToInt32(ds.Tables[0].Rows[0]["UserAssignmentID"]); retVal._lastSubmitDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["LastSubmitDate"]); retVal._lastUpdatedDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["LastUpdatedDate"]); retVal._overallGrade = ds.Tables[0].Rows[0]["OverallGrade"].ToString(); retVal._gradeComments = ds.Tables[0].Rows[0]["GradeComments"].ToString(); retVal._autoCompileStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["AutoCompileStatus"]); retVal._autoGradeStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["AutoGradeStatus"]); retVal._userLastName = ds.Tables[0].Rows[0]["LastName"].ToString(); retVal._userFirstName = ds.Tables[0].Rows[0]["FirstName"].ToString(); retVal._assignmentName = ds.Tables[0].Rows[0]["ShortName"].ToString(); retVal._userUniversityIdentifier = ds.Tables[0].Rows[0]["UniversityIdentifier"].ToString(); retVal._buildDetails = ds.Tables[0].Rows[0]["BuildDetails"].ToString(); retVal._checkDetails = ds.Tables[0].Rows[0]["CheckDetails"].ToString(); retVal._buildResultCode = ds.Tables[0].Rows[0]["BuildResultCode"].ToString(); retVal._checkResultCode = ds.Tables[0].Rows[0]["CheckResultCode"].ToString(); return(retVal); }
internal static void SendActionToQueue(int userAssignmentID, bool build, bool check) { StudentAssignmentM student = StudentAssignmentM.Load(userAssignmentID); student.SendActionToQueue(build, check); }