Added Status Label and detail to Message Box if Increment All fails

This commit is contained in:
Rich
2012-03-13 12:24:35 +00:00
parent 23c5e6534d
commit 41f5b634fc
2 changed files with 26 additions and 4 deletions

View File

@@ -22,6 +22,17 @@ namespace VEPROMS
if (ConsistencyPrintRequest != null)
ConsistencyPrintRequest(this, args);
}
private bool CanApprove
{
get { return btnApprove2.Enabled;}
set
{
btnApprove2.Enabled = value;
tsslStatus.ForeColor = Color.Red;
tsslStatus.BackColor = Color.Yellow;
tsslStatus.Text = value ? "" : "Need to correct the Rev Numbers marked with Question Marks";
}
}
private ApprovalInfo _MyApproval = new ApprovalInfo();
private bool _CheckForMore = false;
private DocVersionInfo _MyDocVersion;
@@ -499,7 +510,7 @@ namespace VEPROMS
{
ok = ok && !app.RevNumber.Contains(" ?");
}
btnApprove2.Enabled = ok;
CanApprove = ok;
}
if (e.Col == 2)
{ //revdate
@@ -543,11 +554,14 @@ namespace VEPROMS
approvalProcedureBindingSource.ResetBindings(false);
if (sb.Length > 0)
{
sb.AppendLine(); sb.AppendLine();
sb.AppendLine("These will be marked with a question mark.");
sb.Append("They need to be corrected before Approval can be run.");
MessageBox.Show(sb.ToString(), "Increment Failures", MessageBoxButtons.OK, MessageBoxIcon.Warning);
btnApprove2.Enabled = false;
CanApprove = false;
}
else
btnApprove2.Enabled = true;
CanApprove = true;
}
private bool IncrementRev(ApprovalProcedure ap)
{