B2024-058-RevisionDate-field-Print-dialog
This commit is contained in:
parent
d7f829737a
commit
4bf42be80a
@ -1096,6 +1096,14 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
private void btnCreatePDF_Click(object sender, EventArgs e)
|
private void btnCreatePDF_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (txbRevDate.Visible)
|
||||||
|
{
|
||||||
|
if (!validateDate(txbRevDate))
|
||||||
|
{
|
||||||
|
//txbRevDate.Focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
DoCreatePDF();
|
DoCreatePDF();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,16 +1202,16 @@ namespace VEPROMS
|
|||||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool validateDate(string txtDate)
|
private bool validateDate(TextBox txtDate)
|
||||||
{
|
{
|
||||||
DateTime dDate;
|
DateTime dDate;
|
||||||
if (DateTime.TryParse(txbDate.Text, out dDate))
|
if (DateTime.TryParse(txtDate.Text, out dDate))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string txtDate2 = txbDate.Text;
|
string txtDate2 = txtDate.Text;
|
||||||
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
||||||
string txtTitle = "Invalid Format";
|
string txtTitle = "Invalid Format";
|
||||||
MessageBox.Show(message, txtTitle);
|
MessageBox.Show(message, txtTitle);
|
||||||
@ -1231,7 +1239,7 @@ namespace VEPROMS
|
|||||||
// MessageBox.Show(message, txtTitle);
|
// MessageBox.Show(message, txtTitle);
|
||||||
// txbRevDate.Focus();
|
// txbRevDate.Focus();
|
||||||
//}
|
//}
|
||||||
if (!validateDate(txbDate.Text))
|
if (!validateDate(txbDate))
|
||||||
{
|
{
|
||||||
txbRevDate.Focus();
|
txbRevDate.Focus();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user