B2024-058-RevisionDate-field-Print-dialog #390
@ -97,12 +97,12 @@ namespace VEPROMS
|
|||||||
this.expandableSplitter1 = new DevComponents.DotNetBar.ExpandableSplitter();
|
this.expandableSplitter1 = new DevComponents.DotNetBar.ExpandableSplitter();
|
||||||
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
|
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
|
||||||
this.groupPag = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.groupPag = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
|
this.cbxGenerateTimeCritActSum = new System.Windows.Forms.CheckBox();
|
||||||
this.expPrnSetting = new DevComponents.DotNetBar.ExpandablePanel();
|
this.expPrnSetting = new DevComponents.DotNetBar.ExpandablePanel();
|
||||||
this.ppGpDuplex = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.ppGpDuplex = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.tbBlankPage = new DevComponents.DotNetBar.Controls.TextBoxX();
|
this.tbBlankPage = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||||
this.lblBlPg = new DevComponents.DotNetBar.LabelX();
|
this.lblBlPg = new DevComponents.DotNetBar.LabelX();
|
||||||
this.swtbtnPDFdtPrefixSuffix = new DevComponents.DotNetBar.Controls.SwitchButton();
|
this.swtbtnPDFdtPrefixSuffix = new DevComponents.DotNetBar.Controls.SwitchButton();
|
||||||
this.cbxGenerateTimeCritActSum = new System.Windows.Forms.CheckBox();
|
|
||||||
this.gpnlDebug.SuspendLayout();
|
this.gpnlDebug.SuspendLayout();
|
||||||
this.grpDateSelector.SuspendLayout();
|
this.grpDateSelector.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).BeginInit();
|
||||||
@ -1285,6 +1285,23 @@ namespace VEPROMS
|
|||||||
this.groupPag.TabIndex = 111;
|
this.groupPag.TabIndex = 111;
|
||||||
this.groupPag.Text = "Print using standard PROMS pagination rules by:";
|
this.groupPag.Text = "Print using standard PROMS pagination rules by:";
|
||||||
//
|
//
|
||||||
|
// cbxGenerateTimeCritActSum
|
||||||
|
//
|
||||||
|
this.cbxGenerateTimeCritActSum.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.cbxGenerateTimeCritActSum.AutoSize = true;
|
||||||
|
this.cbxGenerateTimeCritActSum.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.cbxGenerateTimeCritActSum.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.cbxGenerateTimeCritActSum.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.cbxGenerateTimeCritActSum.Location = new System.Drawing.Point(240, 273);
|
||||||
|
this.cbxGenerateTimeCritActSum.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.cbxGenerateTimeCritActSum.Name = "cbxGenerateTimeCritActSum";
|
||||||
|
this.cbxGenerateTimeCritActSum.Size = new System.Drawing.Size(294, 17);
|
||||||
|
this.cbxGenerateTimeCritActSum.TabIndex = 102;
|
||||||
|
this.cbxGenerateTimeCritActSum.Text = "Generate Time Critical Action Summary (hidden but used)";
|
||||||
|
this.cbxGenerateTimeCritActSum.UseVisualStyleBackColor = false;
|
||||||
|
this.cbxGenerateTimeCritActSum.Visible = false;
|
||||||
|
//
|
||||||
// expPrnSetting
|
// expPrnSetting
|
||||||
//
|
//
|
||||||
this.expPrnSetting.CanvasColor = System.Drawing.SystemColors.Control;
|
this.expPrnSetting.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
@ -1421,23 +1438,6 @@ namespace VEPROMS
|
|||||||
this.swtbtnPDFdtPrefixSuffix.TabIndex = 111;
|
this.swtbtnPDFdtPrefixSuffix.TabIndex = 111;
|
||||||
this.swtbtnPDFdtPrefixSuffix.ValueChanged += new System.EventHandler(this.swtbtnPDFdtPrefixSuffix_ValueChanged);
|
this.swtbtnPDFdtPrefixSuffix.ValueChanged += new System.EventHandler(this.swtbtnPDFdtPrefixSuffix_ValueChanged);
|
||||||
//
|
//
|
||||||
// cbxGenerateTimeCritActSum
|
|
||||||
//
|
|
||||||
this.cbxGenerateTimeCritActSum.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.cbxGenerateTimeCritActSum.AutoSize = true;
|
|
||||||
this.cbxGenerateTimeCritActSum.BackColor = System.Drawing.Color.Transparent;
|
|
||||||
this.cbxGenerateTimeCritActSum.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.cbxGenerateTimeCritActSum.ForeColor = System.Drawing.SystemColors.ControlText;
|
|
||||||
this.cbxGenerateTimeCritActSum.Location = new System.Drawing.Point(240, 273);
|
|
||||||
this.cbxGenerateTimeCritActSum.Margin = new System.Windows.Forms.Padding(2);
|
|
||||||
this.cbxGenerateTimeCritActSum.Name = "cbxGenerateTimeCritActSum";
|
|
||||||
this.cbxGenerateTimeCritActSum.Size = new System.Drawing.Size(294, 17);
|
|
||||||
this.cbxGenerateTimeCritActSum.TabIndex = 102;
|
|
||||||
this.cbxGenerateTimeCritActSum.Text = "Generate Time Critical Action Summary (hidden but used)";
|
|
||||||
this.cbxGenerateTimeCritActSum.UseVisualStyleBackColor = false;
|
|
||||||
this.cbxGenerateTimeCritActSum.Visible = false;
|
|
||||||
//
|
|
||||||
// DlgPrintProcedure
|
// DlgPrintProcedure
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -1096,6 +1096,15 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
private void btnCreatePDF_Click(object sender, EventArgs e)
|
private void btnCreatePDF_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// B2024-058 Add validation for Revision Date field of the Print dialog
|
||||||
|
if (txbRevDate.Visible)
|
||||||
|
{
|
||||||
|
if (!validateDate(txbRevDate))
|
||||||
|
{
|
||||||
|
//txbRevDate.Focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
DoCreatePDF();
|
DoCreatePDF();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1193,16 +1202,42 @@ namespace VEPROMS
|
|||||||
if (_Initializing) return;
|
if (_Initializing) return;
|
||||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||||
}
|
}
|
||||||
|
// B2024-058 Add validation for Revision Date field of the Print dialog
|
||||||
|
private bool validateDate(TextBox txtDate)
|
||||||
|
{
|
||||||
|
DateTime dDate;
|
||||||
|
if (DateTime.TryParse(txtDate.Text, out dDate))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string txtDate2 = txtDate.Text;
|
||||||
|
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
||||||
|
string txtTitle = "Invalid Format";
|
||||||
|
MessageBox.Show(message, txtTitle);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
txbDate = txbRevDate;
|
txbDate = txbRevDate;
|
||||||
grpDateSelector.Text = "Select Revision Date";
|
grpDateSelector.Text = "Select Revision Date";
|
||||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||||
//C2021-007 position the calendar to the current RevDate or if no RevDate, position to today's date
|
//C2021-007 position the calendar to the current RevDate or if no RevDate, position to today's date
|
||||||
DateTime initSelDate =(txbDate.Text != null && txbDate.Text.Length != 0)? Convert.ToDateTime(txbDate.Text) : DateTime.Today;
|
DateTime dDate;
|
||||||
|
// B2024-058 Add validation for Revision Date field of the Print dialog
|
||||||
|
if (!validateDate(txbDate))
|
||||||
|
{
|
||||||
|
txbRevDate.Focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DateTime initSelDate = (txbDate.Text != null && txbDate.Text.Length != 0) ? Convert.ToDateTime(txbDate.Text) : DateTime.Today;
|
||||||
calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate;
|
calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void txbRevDate_Leave(object sender, EventArgs e)
|
private void txbRevDate_Leave(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_Initializing) return;
|
if (_Initializing) return;
|
||||||
@ -1375,6 +1410,7 @@ namespace VEPROMS
|
|||||||
_NewRevForAllProcs = null;
|
_NewRevForAllProcs = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//private void cbxDebug_CheckedChanged(object sender, EventArgs e)
|
//private void cbxDebug_CheckedChanged(object sender, EventArgs e)
|
||||||
//{
|
//{
|
||||||
// cbxCmpPRMSpfd.Visible = cbxDebug.Checked;
|
// cbxCmpPRMSpfd.Visible = cbxDebug.Checked;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user