SVN r1087
SVN-Revision: r1087
This commit is contained in:
@@ -30,12 +30,18 @@ namespace Lskj.AutoCreatWord
|
|||||||
Document saveDocument = new Document();
|
Document saveDocument = new Document();
|
||||||
foreach (DataSet dataSet in dataSets)
|
foreach (DataSet dataSet in dataSets)
|
||||||
{
|
{
|
||||||
CreateWordUtil.InitTempDocuemnt(saveDocument, mainTempPath, menuTempPath, menuTempArray, dataSet);
|
Section firstSection = null;
|
||||||
|
bool hasMainTemp = false;
|
||||||
|
CreateWordUtil.InitTempDocuemnt(saveDocument, mainTempPath, menuTempPath, menuTempArray, dataSet, ref firstSection, ref hasMainTemp);
|
||||||
CreateWordUtil.InitCreatBaseSql(saveDocument, dataSet, OAUrl);
|
CreateWordUtil.InitCreatBaseSql(saveDocument, dataSet, OAUrl);
|
||||||
CreateWordUtil.InitCreatBaseSqlDetail(saveDocument, dataSet, OAUrl);
|
CreateWordUtil.InitCreatBaseSqlDetail(saveDocument, dataSet, OAUrl);
|
||||||
CreateWordUtil.InitCreatTabSql(saveDocument, dataSet, OAUrl);
|
CreateWordUtil.InitCreatTabSql(saveDocument, dataSet, OAUrl);
|
||||||
CreateWordUtil.InitCreatTabSqlDetail(saveDocument, dataSet, OAUrl);
|
CreateWordUtil.InitCreatTabSqlDetail(saveDocument, dataSet, OAUrl);
|
||||||
CreateWordUtil.RemoveTableRow(saveDocument);
|
CreateWordUtil.RemoveTableRow(saveDocument);
|
||||||
|
if (hasMainTemp && firstSection != null)
|
||||||
|
{
|
||||||
|
firstSection.PageSetup.DifferentFirstPageHeaderFooter = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool flag = !Directory.Exists(Path.GetDirectoryName(savePath));
|
bool flag = !Directory.Exists(Path.GetDirectoryName(savePath));
|
||||||
if (flag)
|
if (flag)
|
||||||
@@ -62,16 +68,15 @@ namespace Lskj.AutoCreatWord
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
private static Document InitTempDocuemnt(Document document, string mainTempPath, string menuTempPath, string menuTempArray, DataSet dataSet)
|
private static Document InitTempDocuemnt(Document document, string mainTempPath, string menuTempPath, string menuTempArray, DataSet dataSet, ref Section firstSection, ref bool hasMainTemp)
|
||||||
{
|
{
|
||||||
if (document == null)
|
if (document == null)
|
||||||
{
|
{
|
||||||
document = new Document();
|
document = new Document();
|
||||||
}
|
}
|
||||||
bool hasMainTemp = false;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Section firstSection = null;
|
firstSection = null;
|
||||||
if (!string.IsNullOrEmpty(mainTempPath) && File.Exists(mainTempPath))
|
if (!string.IsNullOrEmpty(mainTempPath) && File.Exists(mainTempPath))
|
||||||
{
|
{
|
||||||
Section mainSection = new Section(document);
|
Section mainSection = new Section(document);
|
||||||
@@ -219,10 +224,6 @@ namespace Lskj.AutoCreatWord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasMainTemp)
|
|
||||||
{
|
|
||||||
firstSection.PageSetup.DifferentFirstPageHeaderFooter = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user