rbaldwin
Posts: 172
|
Posted: 11/26/2013, 9:09 AM |
|
I have a rather large project (400+pages) - More of an application than a website.,
I started it about 6yrs ago in 4.3 without InMotion (before InMotion existed), it has been growing ever since. Almost every page has custom coding.
I was told by support that i could simply open the project in 5.1 and it would convert it to a 5.1 with inMotion project, but that i would have to edit every event and re code to conform with the inMotion syntax
So, i did that, but to my surprise, my site seems to all work without me having to recode my custom code.
Does anyone else have experience converting non InMotion to InMotion that they could share?
|
|
|
cvboucher
Posts: 191
|
Posted: 11/26/2013, 10:01 AM |
|
Back before InMotion I created several webapps in 4.3 and have since created several more in 5.1 with InMotion. I've found this link helpful.
http://code.google.com/p/inmotion-framework/wiki/HowTo
One bit of code I use quite a bit to get access to controls in grids, reports and records is:
GridName.GetControl<MTTextBox>("MyControlName").Value = DateTime.Now;
Replace GridName with the name of your grid, record or report.
Replace MTTextBox with the type of control you are accessing.
Replace MyControlName with the name of your control.
Replace Value with the property you are interested it.
It's a little easier to get at a control from its Before Show event.
((MTTextBox) sender).Text = "Job"
For numbers and dates I like to set the Value property because the control's format will be used on the final render.
There is a help file at the link above that I've found helpful.
I also like to create some library .dll's in Visual Studio and drop them in the bin folder of the website. This helps minimize the custom code in CCS events and with code reuse. Plus it's a lot easier to write code in Visual Studio with its IntelliSense.
HTH,
Craig
|
|
|
rbaldwin
Posts: 172
|
Posted: 11/26/2013, 12:07 PM |
|
Thanks Craig. I appreciate the help.
|
|
|
|