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)
{
DateTime dDate;
if (!(txtDate.Text == ""))
if (DateTime.TryParse(txtDate.Text, out 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;
}
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;
}
return true;
}
private void txbRevDate_Enter(object sender, EventArgs e)
{
txbDate = txbRevDate;

View File

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