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

@ -66,6 +66,7 @@ namespace VEPROMS
this.lblMore = new DevComponents.DotNetBar.LabelX();
this.sttMore = new DevComponents.DotNetBar.SuperTooltip();
this.pnlRogue = new System.Windows.Forms.Panel();
this.tsslStatus = new System.Windows.Forms.ToolStripStatusLabel();
((System.ComponentModel.ISupportInitialize)(this.approvalInfoBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stageInfoBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revTypeBindingSource)).BeginInit();
@ -228,7 +229,8 @@ namespace VEPROMS
// ssMsg2
//
this.ssMsg2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsslMsg2});
this.tsslMsg2,
this.tsslStatus});
this.ssMsg2.Location = new System.Drawing.Point(0, 552);
this.ssMsg2.Name = "ssMsg2";
this.ssMsg2.Size = new System.Drawing.Size(450, 22);
@ -561,6 +563,11 @@ namespace VEPROMS
this.pnlRogue.Size = new System.Drawing.Size(72, 574);
this.pnlRogue.TabIndex = 25;
//
// tsslStatus
//
this.tsslStatus.Name = "tsslStatus";
this.tsslStatus.Size = new System.Drawing.Size(0, 17);
//
// dlgApproveProcedure
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -628,5 +635,6 @@ namespace VEPROMS
private DevComponents.DotNetBar.Controls.CheckBoxX chkSetAllDates;
private DevComponents.DotNetBar.ButtonX btnIncrement;
private C1.Win.C1FlexGrid.C1FlexGrid fgProcs;
private System.Windows.Forms.ToolStripStatusLabel tsslStatus;
}
}

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)
{