Merged PR 16782: Added logic to display Category and Training Notification fields on PDF
Added logic to display Category and Training Notification fields on PDF Related work items: #135474, #225483
This commit is contained in:
@ -356,14 +356,17 @@ public class ECN_DMO {
|
||||
List<string> affectedAreas = multipleResultItems.Read<string>().ToList();
|
||||
List<string> affectedTechnologies = multipleResultItems.Read<string>().ToList();
|
||||
List<string> acknowledgementBy = multipleResultItems.Read<string>().ToList();
|
||||
List<string> trainingBy = multipleResultItems.Read<string>().ToList();
|
||||
List<int> trainingby = multipleResultItems.Read<int>().ToList();
|
||||
if (ecnItem != null && trainingby != null) {
|
||||
if (trainingby.Count > 0)
|
||||
ecnItem.TrainingByIDs.AddRange(trainingby);
|
||||
}
|
||||
List<string> productfamilies = multipleResultItems.Read<string>().ToList();
|
||||
|
||||
ecnItem.AffectedModules = string.Join(", ", modules);
|
||||
ecnItem.AffectedDepartments = string.Join(", ", departments);
|
||||
ecnItem.AffectedAreas = string.Join(",", affectedAreas);
|
||||
ecnItem.AffectedTechnologies = string.Join(",", affectedTechnologies);
|
||||
ecnItem.TrainingBy = string.Join(",", trainingBy);
|
||||
ecnItem.AcknowledgementBy = string.Join(",", acknowledgementBy);
|
||||
ecnItem.AffectedProductFamilies = string.Join(",", productfamilies);
|
||||
|
||||
@ -714,4 +717,26 @@ public class ECN_DMO {
|
||||
return r;
|
||||
}
|
||||
|
||||
internal string GetCategoryID(ECNPdf ecn) {
|
||||
string result;
|
||||
if (ecn.CategoryID is null) {
|
||||
result = string.Empty;
|
||||
} else {
|
||||
List<ECNCategory> categories = GetCategories();
|
||||
result = (from l in categories where l.CategoryID == ecn.CategoryID.Value select l.CategoryName).FirstOrDefault();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal string GetTrainingNotificationTo(ECNPdf ecn, TrainingDMO trainingDMO) {
|
||||
string result;
|
||||
if (ecn.TrainingByIDs is null) {
|
||||
result = string.Empty;
|
||||
} else {
|
||||
List<TrainingGroup> trainingGroups = trainingDMO.GetTrainingGroups();
|
||||
result = string.Join(", ", (from l in trainingGroups where ecn.TrainingByIDs.Contains(l.TrainingGroupID) select l.TrainingGroupName).ToArray());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user