Allow approval to work if no existing approved versions
Try too set margins if bottom margin is undefined for MSWord section Corrected comment
This commit is contained in:
parent
0927762693
commit
25db26519e
@ -925,10 +925,13 @@ namespace VEPROMS
|
||||
foreach (ApprovalProcedure ap in MyProcedures) //spin thru looking for updating current revision
|
||||
{
|
||||
RevisionInfo ric = RevisionInfo.GetCurrentByItemID(ap.ProcInfo.ItemID);
|
||||
if (ric != null)
|
||||
{
|
||||
VersionInfo vi = ric.LatestVersion;
|
||||
if (ap.RevNumber == ric.RevisionNumber && nsi.IsApproved == 0 && vi.MyStage.IsApproved == 1)
|
||||
sb.AppendLine(string.Format("{0} - '{1}'", ap.ProcInfo.DisplayNumber, vi.MyStage.Name));
|
||||
}
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
sb.Insert(0, string.Format("The following procedures will be reverted to '{0}'\r\n\r\n", nsi.Name));
|
||||
|
@ -784,6 +784,20 @@ namespace VEPROMS.CSLA.Library
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
myDoc.PageSetup.BottomMargin = 0; // 11 * 72 - (newTop + newLength);
|
||||
myDoc.PageSetup.RightMargin = newRight;
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.Error("Could not set margins", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// SqlDataAdapter da = new SqlDataAdapter("select name from sysdatabases where name like 'VEP%' order by name", cn);
|
||||
//SqlDataAdapter da = new SqlDataAdapter("select name, case when object_id('[' + name + ']..Items') is null then 'Not PROMS' when object_id('[' + name + ']..Revisions') is not null then 'Approval' when object_id('[' + name + ']..ContentAudits') is not null then 'Change Manager' else 'Original' end functionality from sysdatabases where name not in ('master','model','msdb','tempdb') order by name", cn);
|
||||
SqlDataAdapter da = new SqlDataAdapter("select name, 'Approval' functionality from sysdatabases where name not in ('master','model','msdb','tempdb') order by name", cn);
|
||||
da.SelectCommand.CommandTimeout = 300; // 30 sec timeout
|
||||
da.SelectCommand.CommandTimeout = 300; // 300 sec timeout
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user