Compare commits
2 Commits
master
...
B2024-063-
Author | SHA1 | Date | |
---|---|---|---|
6128632186 | |||
5db6a984f3 |
@ -1206,20 +1206,28 @@ namespace VEPROMS
|
|||||||
private bool validateDate(TextBox txtDate)
|
private bool validateDate(TextBox txtDate)
|
||||||
{
|
{
|
||||||
DateTime dDate;
|
DateTime dDate;
|
||||||
if (DateTime.TryParse(txtDate.Text, out dDate))
|
if (!(txtDate.Text == ""))
|
||||||
{
|
{
|
||||||
return true;
|
|
||||||
}
|
if (DateTime.TryParse(txtDate.Text, out dDate))
|
||||||
else
|
{
|
||||||
{
|
return true;
|
||||||
string txtDate2 = txtDate.Text;
|
}
|
||||||
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
else
|
||||||
string txtTitle = "Invalid Format";
|
{
|
||||||
MessageBox.Show(message, txtTitle);
|
string txtDate2 = txtDate.Text;
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
txbDate = txbRevDate;
|
txbDate = txbRevDate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user