public static XElement CreateModelFromFile(XElement model, HtmlFilePath chartOutputPath)
        {
            XElement html = CreateOrganizationalChart(model);

            using (Stream stream = new FileStream(chartOutputPath, FileMode.OpenOrCreate))
            {
                using (StreamWriter writer = new StreamWriter(stream))
                {
                    writer.WriteLine(html.ToString());
                }
            }

            return(model);
        }
示例#2
0
        protected override void Execute(CodeActivityContext context)
        {
            var htmlFilePath = HtmlFilePath.Get(context);
            var dataTable    = DataTable.Get(context);

            if (!(String.IsNullOrEmpty(htmlFilePath)) & (dataTable) == null)
            {
                XmlString.Set(context, GetValueFromHTMLTags(htmlFilePath));
            }
            //throw new NotImplementedException();

            if (!(String.IsNullOrEmpty(htmlFilePath)) & (dataTable) != null)
            {
                XmlString.Set(context, GetValueFromHTMLTags(dataTable, htmlFilePath));
            }
        }