I have a form where the user selects an item from the ListBox. It polls the database based on the ID and returns the correct values to the textboxes on the form.
I've tried a few different ways, all of which returns a null value except the ID.
Microsoft is reportedly seeking help from its biggest cloud rival, Amazon Web Services, to address mounting capacity issues of GitHub. According to a report by Business Insider, this move of the company comes after a series of AI-driven outages on the coding platform, which Microsoft acquired in 2018. Despites its plans to migrate GitHub completely to Azure by 2027, increasing demand from AI coding tools has forced Microsoft to adopt a multi-cloud strategy...............
https://cio.economictimes.indiatimes.com/news/corporate-news/microsoft-taps-aws-for-github-capacity-amid-ai-driven-outages-and-multi-cloud-strategy/131761981
Question
Kalint
Trying something new here.
I have a form where the user selects an item from the ListBox. It polls the database based on the ID and returns the correct values to the textboxes on the form.
I've tried a few different ways, all of which returns a null value except the ID.
Accessor.cs
// Selected Builder
public static void SelectedBuilder (int mId, string mBuilder, string mAddress, string mCity, string mState, string mPhoneNumber, string mFaxNumber, string mEmailAddress)
{
var dataConnect = new PxLinqSqlDataContext();
return (from b in dataConnect.GetTable<TblBuilders>()
where (b.IdBuilder == mId)
select // SOMETHING HERE TO MAKE THIS MAGIC WORK
mBuilder = b.BName,
mAddress = b.BAddress,
mCity = b.BCity,
mState = b.BState,
mPhoneNumber = b.BPhoneNumber,
mFaxNumber = b.BFaxNumber,
mEmailAddress = b.BEmailAddress)
)
}
[/CODE]
Link to comment
https://www.neowin.net/forum/topic/1118457-c-listbox-to-linq-method-help/Share on other sites
3 answers to this question
Recommended Posts