Best practice question on Date columns


Author
Message
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)
Group: Forum Members
Posts: 153, Visits: 462
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")

Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)
Group: Forum Members
Posts: 153, Visits: 462
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

 

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)
Group: Forum Members
Posts: 153, Visits: 462
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?
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
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 Smile )

TIA

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search