share a query result between 2 c# forms
Posted: Sat 26 Jul 2014 09:18
Hi all,
I have a problem that seems to be over my skills.
As part of an application that i am creating in c#, i want to present the contact information of the selected customer. The thing is that i want to have multiple search criteria, resulting the possibility of returning more than one customers. So i was thinking to open a new form only if the query returns more than 1 rows. If it only returns 1 row the data will be printed on the main form, so there is nothing to do there.
My problem is how to transfer the query result to the second form. I was thinking that the easiest thing is to send the query to be re executed on the secondary form, but that would be a wast of time/network traffic.
Alternative i was thinking to use an array list to store the query result and pass that to the secondary form. But i am not sure how to do that.
All ideas are welcomed and highly appreciated.
Thanos in advance,
Ilias
I have a problem that seems to be over my skills.
As part of an application that i am creating in c#, i want to present the contact information of the selected customer. The thing is that i want to have multiple search criteria, resulting the possibility of returning more than one customers. So i was thinking to open a new form only if the query returns more than 1 rows. If it only returns 1 row the data will be printed on the main form, so there is nothing to do there.
My problem is how to transfer the query result to the second form. I was thinking that the easiest thing is to send the query to be re executed on the secondary form, but that would be a wast of time/network traffic.
Alternative i was thinking to use an array list to store the query result and pass that to the secondary form. But i am not sure how to do that.
All ideas are welcomed and highly appreciated.
Thanos in advance,
Ilias