Compare commits

..

1 Commits

3 changed files with 16 additions and 27 deletions

Binary file not shown.

View File

@@ -1206,28 +1206,20 @@ namespace VEPROMS
private bool validateDate(TextBox txtDate) private bool validateDate(TextBox txtDate)
{ {
DateTime dDate; DateTime dDate;
if (!(txtDate.Text == "")) if (DateTime.TryParse(txtDate.Text, out dDate))
{ {
return true;
if (DateTime.TryParse(txtDate.Text, out dDate)) }
{ else
return true; {
} string txtDate2 = txtDate.Text;
else string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
{ string txtTitle = "Invalid Format";
string txtDate2 = txtDate.Text; MessageBox.Show(message, txtTitle);
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2); return false;
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;

View File

@@ -674,15 +674,12 @@ namespace Volian.Controls.Library
{ {
using (Annotation annotation = CurrentAnnotation.Get()) using (Annotation annotation = CurrentAnnotation.Get())
{ {
if (annotation != null) // B2024-061 check for null reference annotation.RtfText = rtxbComment.Rtf;
{ annotation.SearchText = rtxbComment.Text;
annotation.RtfText = rtxbComment.Rtf; annotation.MyAnnotationType = annotationType;
annotation.SearchText = rtxbComment.Text; annotation.DTS = DateTime.Now;
annotation.MyAnnotationType = annotationType; annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
annotation.DTS = DateTime.Now; annotation.Save();
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
annotation.Save();
}
} }
} }
} }