Added new settings to control conversion of approved data
Added event handler for viewing version pdfs and summary reports added constructor to lookup based on file added method to get library document by original file name fixed ConvertToDisplayText to support RO tables in approved folder added vlnTreeViewPdfEvent delegate added vlnTreeViewPdfArgs class added ViewPDF event only display menu item if pdf or summary pdf exists determined if pdf should have superceded watermark added added sorting of consistency check report by procedure number added method to add superceded watermark to old version pdf files commented out approved folders
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -110,6 +111,18 @@ namespace VEPROMS.CSLA.Library
|
||||
_DocVersionInfo = _ROFstInfo.docVer==null?null: DocVersionInfo.Get(_ROFstInfo.docVer.VersionID);
|
||||
ParseIntoDictionary(rofstinfo.ROLookup);
|
||||
}
|
||||
public ROFSTLookup(string filePath)
|
||||
{
|
||||
_ROFstInfo = null;
|
||||
_ROFst = null;
|
||||
_DocVersionInfo = null;
|
||||
FileInfo rofstFile = new FileInfo(filePath);
|
||||
FileStream fs = rofstFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
byte[] buf = new byte[rofstFile.Length];
|
||||
fs.Read(buf, 0, buf.Length);
|
||||
fs.Close();
|
||||
ParseIntoDictionary(buf);
|
||||
}
|
||||
#endregion
|
||||
#region PropertiesAndData
|
||||
public roHdr myHdr;
|
||||
|
@@ -130,6 +130,64 @@ namespace VEPROMS.CSLA.Library
|
||||
_DocumentConfig = null;
|
||||
}
|
||||
#endregion
|
||||
public static DocumentInfo GetByLibDocName(string libdoc, int versionID)
|
||||
{
|
||||
try
|
||||
{
|
||||
DocumentInfo tmp = DataPortal.Fetch<DocumentInfo>(new LibDocCriteria(libdoc, versionID));
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error on DocumentInfo.GetByLibDocName", ex);
|
||||
}
|
||||
}
|
||||
[Serializable()]
|
||||
protected class LibDocCriteria
|
||||
{
|
||||
private string _LibDoc;
|
||||
public string LibDoc
|
||||
{ get { return _LibDoc; } }
|
||||
private int _VersionID;
|
||||
public int VersionID
|
||||
{ get { return _VersionID; } }
|
||||
public LibDocCriteria(string libdoc, int versionid)
|
||||
{
|
||||
_LibDoc = libdoc;
|
||||
_VersionID = versionid;
|
||||
}
|
||||
}
|
||||
private void DataPortal_Fetch(LibDocCriteria criteria)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] DocumentInfo.DataPortal_Fetch", GetHashCode());
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "getDocumentByLibDoc";
|
||||
cm.Parameters.AddWithValue("@LibDoc", criteria.LibDoc);
|
||||
cm.Parameters.AddWithValue("@VersionID", criteria.VersionID);
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
if (!dr.Read())
|
||||
{
|
||||
_ErrorMessage = "No Record Found";
|
||||
return;
|
||||
}
|
||||
ReadData(dr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("DocumentInfo.DataPortal_Fetch", ex);
|
||||
throw new DbCslaException("DocumentInfo.DataPortal_Fetch", ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public partial class DocumentInfoList
|
||||
|
@@ -1302,6 +1302,7 @@ namespace VEPROMS.CSLA.Library
|
||||
retval = ReplaceSpecialCharacters(retval);
|
||||
retval = retval.Replace("\u2011","-");
|
||||
retval = retval.Replace("\r\n", ";");
|
||||
retval = retval.Replace("\n", ";"); //added for consistency checking with approved version
|
||||
return retval;
|
||||
}
|
||||
public static string StripRtfFormatting(string rtf)
|
||||
|
Reference in New Issue
Block a user