private static void SaveMatrix(WfProcessImporterContext context) { foreach (var part in context.MatrixParts) { WfPackageRelationMapping partMapInfo = context.MappingInfo[part.Uri.ToString()]; WfMatrixDefinition matrixDef = context.MatrixDefinitions[partMapInfo.MatrixDefID]; WfMatrix.ImportNewMatrixFromExcel2007(part.GetStream(), null, partMapInfo.ProcessDescriptionID, matrixDef); } }
private void InitMappings(IEnumerable <PackagePart> packageParts) { var mapPart = packageParts.FirstOrDefault(p => p.Uri.ToString().EndsWith(WF_MAPPING)); if (mapPart != null) { using (Stream stream = mapPart.GetStream()) { XDocument doc = XDocument.Load(stream); foreach (XElement node in doc.Root.Nodes()) { WfPackageRelationMapping mapping = new WfPackageRelationMapping(node); this.MappingInfo.Add(mapping.MatrixPath, mapping); } } } }
private void InitMappings(IEnumerable<PackagePart> packageParts) { var mapPart = packageParts.FirstOrDefault(p => p.Uri.ToString().EndsWith(WF_MAPPING)); if (mapPart != null) { using (Stream stream = mapPart.GetStream()) { XDocument doc = XDocument.Load(stream); foreach (XElement node in doc.Root.Nodes()) { WfPackageRelationMapping mapping = new WfPackageRelationMapping(node); this.MappingInfo.Add(mapping.MatrixPath, mapping); } } } }