StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Best practice question on Date columnsExpand / Collapse
Author
Message
Posted 02/08/2010 9:13:18 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/09/2010 10:20:19 AM
Posts: 85, Visits: 213
If we have a BO that has a datetime column that we may at times want to use the date picker against in Strataframe what is the best method of setting the default in the BO Mapper and what is the difference between each method? IE... advantages, etc: FYI I mainly have used the first method which seems to work for SQL and Oracle.

First Setting: NULL VALUE OPTION = Return Alternate on Null / Set Null on Alternate (Value Type) and the NULL REPLACEMENT VALUE = new DateTime(1800, 1, 1)

Second setting:  NULL VALUE OPTION = Return Alernate on Null and the NULL REPLACEMENT VALUE = Convert.ToDateTime("1800-01-01 00:00:00.000")

Post #25847
Posted 02/08/2010 9:48:09 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/09/2010 10:20:19 AM
Posts: 85, Visits: 213
As an FYI, I did post this question back in 2008 that Ben Chase and Trent responded on: http://forum.strataframe.net/Topic15245-6-1.aspx

 

Post #25848
Posted 02/09/2010 6:56:14 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
I am not entirely sure what you are looking for here different than what you are doing or what was mentioned in the other post.  However, I recommedn using the DateBox now instead of the DateTimePicker (unless you need time entry) as the DateBox was written from the ground up whereas the DateTimePicker inherits from the DateTimePicker from .NET and enhances it.  The DateBox also fully supports the StrataFrame themes, etc and entry on the control is far more flexible and easier to use by end-users.  When we released the DateBox 18 months ago in our medical application, we received a lot of kudos from the end-users as they far preferred the date entry on the DateBox versus the DateTimePicker which is more restrictive and doesn't flow quite as well.
Post #25851
Posted 02/09/2010 7:52:05 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/09/2010 10:20:19 AM
Posts: 85, Visits: 213
My question was not so much on the date picker control but the 2 methods od setting the default in the BO. Is there any difference in the 2 methods illiustrated first above?
Post #25857
Posted 02/09/2010 7:59:09 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
The first option works two-way meaning that if you set the BO to the default value of 1-1-1800 then a NULL will be set out on disk. Whereas, the second option is one-way meaning that it is a return value only so if it see a value of NULL, it will return the alternate value which in your example would be 1-1-1800. So if you want two way, then you are better off with option 1.
Post #25859
Posted 02/09/2010 11:12:56 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 10:14:22 PM
Posts: 464, Visits: 18,997
Regarding the Datebox :

Just substituting them for three dtPickers on a form and found that the TOController setting may not work the same way

Tabbing from the Day column takes one to the day column of the next datebox rather than out of the control and to the next control in the TOController sequence. Is there something I should be setting to change this behavior.

2nd question - I like the keys for first day of month etc. Is there fairly straightforward way - either by using subclasses or extension methods - to add the Quicken-like ability to increment and decrement the date by using the shifted or unshifterd plus and minus keys?

If it is more complicated I would suggest it as an ER.

(and yes, I will be looking closely at the source code to see if I can figure it out on my own, but thought there might be quick answer like availble )
TIA
Post #25865
Posted 02/09/2010 1:56:13 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
Tab order should work the same. We use it on a daily basis and so it should work fine. I never say never as there could be something not taking into account, but it is based off of a control. So it should follow the same logic. Also, we use it in our medical app in a vast number of locations and have not had any issues. So you might need to give me a sample so I can see what you are running into.

Is there fairly straightforward way - either by using subclasses or extension methods - to add the Quicken-like ability to increment and decrement the date by using the shifted or unshifterd plus and minus keys?


At the moment, no. Plus and minus just move forward and backward on the date. Will take this into consideration.
Post #25872
Posted 02/09/2010 2:12:03 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 10:14:22 PM
Posts: 464, Visits: 18,997
Thanks Trent. I'll see if I can duplicate the tab thing.

Not sure what you mean about the + and - . They don't seem to do anything on mine but I'm new to the databox so I'll take another look at it.
Post #25874
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trent L. Taylor, Steve L. Taylor, Dustin Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:42am

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.141. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.