StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Passing a Parameter to the LaunchDialog Method
Passing a Parameter to the LaunchDialog Method
Post Reply
Like
0
Passing a Parameter to the LaunchDialog Method
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Bill Cunnien
Bill Cunnien
posted 14 Years Ago
ANSWER
HOT
Topic Details
Share Topic
Group: Forum Members
Posts: 785,
Visits: 3.6K
I would like to present a list of orders to the user. If the user double-click an order in the list, the order maintenance window will open and the BO will be populated with the primary key being passed to it. I have done this in a number of situations outside of the StratFlix-like application. Now, I would like to do the same but take advantage of the code already existing. The LaunchDialog looks like this:
private void LaunchDialog(Type dialogType)
{
//-- Establish Locals
Form f = (Form)(Activator.CreateInstance(dialogType));
//-- Add the handlers to the form
AddFormHandlers(f);
//-- Set the parent MDI
f.MdiParent = this;
//-- Show the dialog
f.Show();
}
How would I pass the primary key via the Activator.CreateInstance method? I'll start researching it and testing. Hopefully, someone here will be able to shave off some of my R&D time (so I can get to R&R quicker!).
Thanks!!
Bill
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Passing a Parameter to the LaunchDialog Method
Bill Cunnien
-
14 Years Ago
Bill,
One of the overloads of the CreateInstance accepts an...
Greg McGuffey
-
14 Years Ago
I was just wrapping up my testing and thought I would check back on...
Bill Cunnien
-
14 Years Ago
I like the params approach. This means you don't have to have [i]n[/i]...
Greg McGuffey
-
14 Years Ago
I made one more tweak to my code to handle the launching of various...
Bill Cunnien
-
14 Years Ago
Nice Bill!
Another way this could be handled would be to...
Greg McGuffey
-
14 Years Ago
Thanks Bill.
[quote][b]Greg McGuffey (05/21/2010)[/b][hr]If...
Edhy Rijo
-
14 Years Ago
OK, here's the sample. Notice that there is almost no code in the...
Greg McGuffey
-
14 Years Ago
Edhy, you might have missed this with the servers being down....
Greg McGuffey
-
14 Years Ago
[quote][b]Greg McGuffey (05/24/2010)[/b][hr]Edhy, you might have...
Edhy Rijo
-
14 Years Ago
Hmmmm, this is C# :w00t:, are you sending me some hidden message so I...
Edhy Rijo
-
14 Years Ago
The message was hidden! I didn't mean for it to hidden. :P
...
Greg McGuffey
-
14 Years Ago
I wish everyone would just switch to C# and forget about it! :D It...
Russell Scott Brown
-
14 Years Ago
[quote][b]Russell Scott Brown (05/24/2010)[/b][hr]I wish everyone...
Edhy Rijo
-
14 Years Ago
I usually try to post examples in the preferred language of the...
Greg McGuffey
-
14 Years Ago
Actually it hasn't been too much of a problem. I was really just...
Russell Scott Brown
-
14 Years Ago
[quote][b]Russell Scott Brown (05/24/2010)[/b][hr]Actually it hasn't...
Edhy Rijo
-
14 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search