public static SuperTask GetSuperTask(TaskMainDTO task) { GetTrackerServicesSoapClient service = new GetTrackerServicesSoapClient(); ICollection <TaskMainDTO> matchedTasks = service.GetMatchedTasks(task.TaskID, task.Source, task.TokenID); return(new SuperTask(matchedTasks)); }
private static ITask TaskMainDtoToTaskMain(TaskMainDTO taskMainDTO) { TaskMain taskMain = new TaskMain(); taskMain.TaskID = taskMainDTO.TaskID; taskMain.TargetVersion = taskMainDTO.TargetVersion; taskMain.Summary = taskMainDTO.Summary; taskMain.SubtaskType = taskMainDTO.SubtaskType; taskMain.Status = taskMainDTO.Status; taskMain.Project = taskMainDTO.Project; taskMain.Product = taskMainDTO.Product; taskMain.Priority = taskMainDTO.Priority; taskMain.Source = taskMainDTO.Source; taskMain.LinkToTracker = taskMainDTO.LinkToTracker; taskMain.Estimation = taskMainDTO.Estimation; taskMain.Description = taskMainDTO.Description; taskMain.CreatedDate = taskMainDTO.CreatedDate; taskMain.CreatedBy = taskMainDTO.CreatedBy; taskMain.Comments = taskMainDTO.Comments; taskMain.TokenID = taskMainDTO.TokenID; if (taskMainDTO.TaskParent != null) { taskMain.TaskParent = TaskMainDtoToTaskMain(taskMainDTO.TaskParent); } if (taskMainDTO.Assigned != null) { taskMain.Assigned = UserDtoToUser(taskMainDTO.Assigned); } return(taskMain); }
private static ITask TaskMainDtoToTaskMain(TaskMainDTO taskMainDTO) { TaskMain taskMain = new TaskMain(); taskMain.TaskID = taskMainDTO.TaskID; taskMain.TargetVersion = taskMainDTO.TargetVersion; taskMain.Summary = taskMainDTO.Summary; taskMain.SubtaskType = taskMainDTO.SubtaskType; taskMain.Status = taskMainDTO.Status; taskMain.Project = taskMainDTO.Project; taskMain.Product = taskMainDTO.Product; taskMain.Priority = taskMainDTO.Priority; taskMain.Source = taskMainDTO.Source; taskMain.LinkToTracker = taskMainDTO.LinkToTracker; taskMain.Estimation = taskMainDTO.Estimation; taskMain.Description = taskMainDTO.Description; taskMain.CreatedDate = taskMainDTO.CreatedDate; taskMain.CreatedBy = taskMainDTO.CreatedBy; taskMain.Comments = taskMainDTO.Comments; taskMain.TokenID = taskMainDTO.TokenID; if (taskMainDTO.TaskParent != null) { taskMain.TaskParent = TaskMainDtoToTaskMain(taskMainDTO.TaskParent); } if (taskMainDTO.Assigned != null) { taskMain.Assigned = UserDtoToUser(taskMainDTO.Assigned); } return taskMain; }
private static bool ValuesAreTheSame(TaskMainDTO[] values) { int indexFirstVal = 0; while (values[indexFirstVal] == null && indexFirstVal < values.Length - 2) { indexFirstVal++; } TaskMainDTO firstVal = values[indexFirstVal]; for (int indexSecondVal = indexFirstVal + 1; indexSecondVal < values.Length; indexSecondVal++) { TaskMainDTO secondVal = values[indexSecondVal]; if (firstVal != null && secondVal != null && !string.Equals(firstVal.TaskID, secondVal.TaskID, StringComparison.CurrentCultureIgnoreCase)) { return(false); } } return(true); }
private static bool ValuesAreTheSame(TaskMainDTO[] values) { int indexFirstVal = 0; while (values[indexFirstVal] == null && indexFirstVal < values.Length - 2) { indexFirstVal++; } TaskMainDTO firstVal = values[indexFirstVal]; for (int indexSecondVal = indexFirstVal + 1; indexSecondVal < values.Length; indexSecondVal++) { TaskMainDTO secondVal = values[indexSecondVal]; if (firstVal != null && secondVal != null && !string.Equals(firstVal.TaskID, secondVal.TaskID, StringComparison.CurrentCultureIgnoreCase)) { return false; } } return true; }
private static string GetSingleValue(TaskMainDTO[] values) { string singleValue = new SuperTask().multipleValuesMessage; if (ValuesAreTheSame(values)) { singleValue = null; foreach (TaskMainDTO task in values) { if (task != null) { singleValue = task.TaskID; break; } } } return singleValue; }
public static SuperTask GetSuperTask(TaskMainDTO task) { GetTrackerServicesSoapClient service = new GetTrackerServicesSoapClient(); ICollection<TaskMainDTO> matchedTasks = service.GetMatchedTasks(task.TaskID, task.Source, task.TokenID); return new SuperTask(matchedTasks); }