public void RemoveDetail(SalesOrderDetail detailToRemove) { if (Details.Contains(detailToRemove)) { Details.Remove(detailToRemove); } }
public void RemoveDetails(IEnumerable <SalesOrderDetail> detailsToRemove) { foreach (SalesOrderDetail salesOrderDetail in detailsToRemove) { if (Details.Contains(salesOrderDetail)) { Details.Remove(salesOrderDetail); } } }
public void RemoveDetails([ContributedAction] IEnumerable <SalesOrderDetail> details) { foreach (SalesOrderDetail detail in details) { if (Details.Contains(detail)) { Details.Remove(detail); } } }
public void AddGraph(SingleCompromiseGraphData graphData) { if (!ImpactedGraph.ContainsKey(graphData.Name)) { var detail = new CompromiseGraphRuleDetail(); detail.Details = new List <string>(); ImpactedGraph.Add(graphData.Name, detail); } string ruleDetail = String.Format("{1} ({0})", graphData.Name, graphData.Description); if (!Details.Contains(ruleDetail)) { Details.Add(ruleDetail); } }
public void addDetail(Detail param) { if (Details.Contains(param)) { throw new Exception("Media.addDetail: Detail bereits in Media enthalten."); } if (param.isRepeat && hasRepeat) { throw new Exception("Media.addDetail: Media enthält bereits ein Wiederholungs-Detail."); } hasRepeat = param.isRepeat; Details.Add(param); Details.Sort(); }