B2024-058-RevisionDate-field-Print-dialog

This commit is contained in:
Paul Larsen 2024-08-14 09:37:26 -04:00
parent 0eadd3fe33
commit 3f3281e2f4

View File

@ -1096,6 +1096,7 @@ 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 (txbRevDate.Visible)
{ {
if (!validateDate(txbRevDate)) if (!validateDate(txbRevDate))
@ -1201,7 +1202,7 @@ 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) private bool validateDate(TextBox txtDate)
{ {
DateTime dDate; DateTime dDate;
@ -1226,6 +1227,7 @@ namespace VEPROMS
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 dDate; DateTime dDate;
// B2024-058 Add validation for Revision Date field of the Print dialog
if (!validateDate(txbDate)) if (!validateDate(txbDate))
{ {
txbRevDate.Focus(); txbRevDate.Focus();
@ -1236,13 +1238,6 @@ namespace VEPROMS
calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate; calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate;
} }
} }
private void txbRevDate_Validating(object sender, EventArgs e)
{
string x = "";
x = "this is it";
}
private void txbRevDate_Leave(object sender, EventArgs e) private void txbRevDate_Leave(object sender, EventArgs e)
{ {
if (_Initializing) return; if (_Initializing) return;