This commit is contained in:
parent
7ae193db00
commit
047909f8fe
@ -310,12 +310,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
doc.Config = cfg.ToString();
|
doc.Config = cfg.ToString();
|
||||||
doc.UserID = Environment.UserName;
|
doc.UserID = Environment.UserName;
|
||||||
doc.DTS = _MyFile.LastWriteTime;
|
doc.DTS = _MyFile.LastWriteTime;
|
||||||
|
doc.Save();
|
||||||
string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument);
|
string pdfTmp = MSWordToPDF.ToPDFReplaceROs(_MyDocument);
|
||||||
FileInfo pdfFile = new FileInfo(pdfTmp);
|
FileInfo pdfFile = new FileInfo(pdfTmp);
|
||||||
fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||||
buf = new byte[pdfFile.Length];
|
buf = new byte[pdfFile.Length];
|
||||||
fs.Read(buf, 0, buf.Length);
|
fs.Read(buf, 0, buf.Length);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
|
pdfFile.Delete();
|
||||||
doc.DocPdf = buf;
|
doc.DocPdf = buf;
|
||||||
doc.Save();
|
doc.Save();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user