Added Status Label and detail to Message Box if Increment All fails
This commit is contained in:
		@@ -66,6 +66,7 @@ namespace VEPROMS
 | 
				
			|||||||
			this.lblMore = new DevComponents.DotNetBar.LabelX();
 | 
								this.lblMore = new DevComponents.DotNetBar.LabelX();
 | 
				
			||||||
			this.sttMore = new DevComponents.DotNetBar.SuperTooltip();
 | 
								this.sttMore = new DevComponents.DotNetBar.SuperTooltip();
 | 
				
			||||||
			this.pnlRogue = new System.Windows.Forms.Panel();
 | 
								this.pnlRogue = new System.Windows.Forms.Panel();
 | 
				
			||||||
 | 
								this.tsslStatus = new System.Windows.Forms.ToolStripStatusLabel();
 | 
				
			||||||
			((System.ComponentModel.ISupportInitialize)(this.approvalInfoBindingSource)).BeginInit();
 | 
								((System.ComponentModel.ISupportInitialize)(this.approvalInfoBindingSource)).BeginInit();
 | 
				
			||||||
			((System.ComponentModel.ISupportInitialize)(this.stageInfoBindingSource)).BeginInit();
 | 
								((System.ComponentModel.ISupportInitialize)(this.stageInfoBindingSource)).BeginInit();
 | 
				
			||||||
			((System.ComponentModel.ISupportInitialize)(this.revTypeBindingSource)).BeginInit();
 | 
								((System.ComponentModel.ISupportInitialize)(this.revTypeBindingSource)).BeginInit();
 | 
				
			||||||
@@ -228,7 +229,8 @@ namespace VEPROMS
 | 
				
			|||||||
			// ssMsg2
 | 
								// ssMsg2
 | 
				
			||||||
			// 
 | 
								// 
 | 
				
			||||||
			this.ssMsg2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
 | 
								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.Location = new System.Drawing.Point(0, 552);
 | 
				
			||||||
			this.ssMsg2.Name = "ssMsg2";
 | 
								this.ssMsg2.Name = "ssMsg2";
 | 
				
			||||||
			this.ssMsg2.Size = new System.Drawing.Size(450, 22);
 | 
								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.Size = new System.Drawing.Size(72, 574);
 | 
				
			||||||
			this.pnlRogue.TabIndex = 25;
 | 
								this.pnlRogue.TabIndex = 25;
 | 
				
			||||||
			// 
 | 
								// 
 | 
				
			||||||
 | 
								// tsslStatus
 | 
				
			||||||
 | 
								// 
 | 
				
			||||||
 | 
								this.tsslStatus.Name = "tsslStatus";
 | 
				
			||||||
 | 
								this.tsslStatus.Size = new System.Drawing.Size(0, 17);
 | 
				
			||||||
 | 
								// 
 | 
				
			||||||
			// dlgApproveProcedure
 | 
								// dlgApproveProcedure
 | 
				
			||||||
			// 
 | 
								// 
 | 
				
			||||||
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 | 
								this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 | 
				
			||||||
@@ -628,5 +635,6 @@ namespace VEPROMS
 | 
				
			|||||||
		private DevComponents.DotNetBar.Controls.CheckBoxX chkSetAllDates;
 | 
							private DevComponents.DotNetBar.Controls.CheckBoxX chkSetAllDates;
 | 
				
			||||||
		private DevComponents.DotNetBar.ButtonX btnIncrement;
 | 
							private DevComponents.DotNetBar.ButtonX btnIncrement;
 | 
				
			||||||
		private C1.Win.C1FlexGrid.C1FlexGrid fgProcs;
 | 
							private C1.Win.C1FlexGrid.C1FlexGrid fgProcs;
 | 
				
			||||||
 | 
							private System.Windows.Forms.ToolStripStatusLabel tsslStatus;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -22,6 +22,17 @@ namespace VEPROMS
 | 
				
			|||||||
			if (ConsistencyPrintRequest != null)
 | 
								if (ConsistencyPrintRequest != null)
 | 
				
			||||||
				ConsistencyPrintRequest(this, args);
 | 
									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 ApprovalInfo _MyApproval = new ApprovalInfo();
 | 
				
			||||||
		private bool _CheckForMore = false;
 | 
							private bool _CheckForMore = false;
 | 
				
			||||||
		private DocVersionInfo _MyDocVersion;
 | 
							private DocVersionInfo _MyDocVersion;
 | 
				
			||||||
@@ -499,7 +510,7 @@ namespace VEPROMS
 | 
				
			|||||||
				{
 | 
									{
 | 
				
			||||||
					ok = ok && !app.RevNumber.Contains(" ?");
 | 
										ok = ok && !app.RevNumber.Contains(" ?");
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				btnApprove2.Enabled = ok;
 | 
									CanApprove = ok;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (e.Col == 2)
 | 
								if (e.Col == 2)
 | 
				
			||||||
			{	//revdate
 | 
								{	//revdate
 | 
				
			||||||
@@ -543,11 +554,14 @@ namespace VEPROMS
 | 
				
			|||||||
			approvalProcedureBindingSource.ResetBindings(false);
 | 
								approvalProcedureBindingSource.ResetBindings(false);
 | 
				
			||||||
			if (sb.Length > 0)
 | 
								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);
 | 
									MessageBox.Show(sb.ToString(), "Increment Failures", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 | 
				
			||||||
				btnApprove2.Enabled = false;
 | 
									CanApprove = false;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				btnApprove2.Enabled = true;
 | 
									CanApprove = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		private bool IncrementRev(ApprovalProcedure ap)
 | 
							private bool IncrementRev(ApprovalProcedure ap)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user