SmartDate and ISmartFieldSmartDate and ISmartField
Old forum URL: forums.lhotka.net/forums/t/5509.aspx
drozd posted on Thursday, October 02, 2008
Hi,
When generating some BOs from templates I found that the SmartDate class is missing. I've merged the class and the required interface (ISmartField) from the full CSLA project, removed the non-existing attribute from SmartDate and substituted the DateTime.TryParse with a call to a newly implemented:
private static bool TryParseDateTime(string s, out DateTime result)
{
result = DateTime.MinValue;
try
{
result = DateTime.Parse(s);
return true;
}
catch (ArgumentNullException)
{
return false;
}
catch (FormatException)
{
return false;
}
}
I haven't yet tested it thoroughly but I think it should work.
Are there any other reasons why the SmartDate class has been removed from the CSLA CE project?
Thanks,
MichaĆ
Copyright (c) Marimer LLC