Filling BO


Author
Message
Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
So in the light of day I modified the code to be

private string getTrk_lic()

{

//-- Only show one panel, and put the browse results in the visible panel

this.browseDialogtruck.AdvancedOptions = false;

this.browseDialogtruck.AllowHideResults = false;

this.browseDialogtruck.AllowSearchFieldsButton = false;

this.browseDialogtruck.SearchFields["FK_customer"].InitialValue = certificateBO1.FK_Customer2.ToString();

// '-- Show the browse dialog  From the lookup control sample by Ivan

// If CustomersBrowseDialog1.ShowDialog() = DialogResult.OK Then

// Me.txtCode.Text = CustomersBO1.cust_pk.ToString

// End If

if (this.browseDialogtruck.ShowDialog(true).Equals(DialogResult.OK))

{

return truckBO2.truck_license;

}

else

{

return "";

}

}

this now works and returns the value but the form still wants to start over, how do I get the focus back to the forms main BO (certificateBO1) and back to the textbox that calls this browsedialog?


Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
OK the fog is clearing. I had the tab control that textbox is on disabled in the FormEditingStaeChanged event - Don't know why but at some point it must have been a good idea! Code is now working great if there is only one value to assign it is assigned, if there are more than one value the BrowseDialog appears popualted with valid choices and choice selected is entered in the textbox or if there is no selection textbox is blank and allows entry as this may be a one time transaction using this license number.
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Ian Johnston (08/30/2010)
OK the fog is clearing.


Pretty good Ian, congratulations!!!

Edhy Rijo

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad you are getting it going. While programming can be frustrating, I love those "fog is clearing" moments. BigGrin
Jimmy D Cook
Jimmy D Cook
StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)
Group: Forum Members
Posts: 1, Visits: 3
I was in search for this coding since long time back but you have cleared my doubts. You are too good.

Tampa Florida 3PL
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Jimmy,

Glad you found it useful.  Fell free to keep searching the forums, there are a lot of good samples here for every level and if you can't find it, well, post it again here Smile

Edhy Rijo

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