Compare commits
7 Commits
B2024-062_
...
B2024-063-
Author | SHA1 | Date | |
---|---|---|---|
6128632186 | |||
5db6a984f3 | |||
a43e059733 | |||
0ac79f4e46 | |||
218a2c17a2 | |||
a629f6834b | |||
bf5337cf63 |
Binary file not shown.
@@ -1206,20 +1206,28 @@ namespace VEPROMS
|
||||
private bool validateDate(TextBox txtDate)
|
||||
{
|
||||
DateTime dDate;
|
||||
if (DateTime.TryParse(txtDate.Text, out dDate))
|
||||
if (!(txtDate.Text == ""))
|
||||
{
|
||||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
txbDate = txbRevDate;
|
||||
|
@@ -674,12 +674,15 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
using (Annotation annotation = CurrentAnnotation.Get())
|
||||
{
|
||||
annotation.RtfText = rtxbComment.Rtf;
|
||||
annotation.SearchText = rtxbComment.Text;
|
||||
annotation.MyAnnotationType = annotationType;
|
||||
annotation.DTS = DateTime.Now;
|
||||
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||
annotation.Save();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user