/// <summary> /// Chekc fil must exist in Wrok directory /// </summary> /// <param name="workDirectory"></param> /// <param name="WorksTodo"></param> private void CheckFileMustExist(Work workDirectory, List <WorkToDo> WorksTodo) { if (workDirectory != null) { foreach (var workToDo in WorksTodo) { if (workToDo.Title.Contains("TD 7")) { int i = 1; } Work ValideWork = workDirectory.WorksChilds .Where(w => isWrokValide(w, workToDo)) .FirstOrDefault(); if (ValideWork == null) { string msg = string.Format("Le travail : {0} n'existe pas", workToDo); ValidateErrorMessage errorMessage = new ValidateErrorMessage(msg); workDirectory.AddErrorMessage(errorMessage); } else { ValideWork.WorkToDo = workToDo; ValideWork.Validation = Enumerations.ValisationStat.Valid; } } } }