Hi,
I've got a problem.
I have a combobox named
cb_Klient, which I want to bind a results to.
I use IMultiQuery interface and CreateMultiQuery() method. Here's its code:
Code:
IMultiQuery zbior = _session.CreateMultiQuery()
.Add(_session.CreateQuery("SELECT k.Id_klienta FROM klient as k"))
.Add(_session.CreateQuery("SELECT o.Id_oferty FROM oferta as o"))
.Add(_session.CreateQuery("SELECT a.Id_agenta FROM agent as a"));
Everything's fine, but want I want to do are properties of combobox:
- this.cb_Klient.DisplayMember
- this.cb_Klient.ValueMember
How to do, that results from queries like:
Code:
IMultiQuery zbior = _session.CreateMultiQuery()
.Add(_session.CreateQuery("SELECT k.Id_klienta, k.Nazwisko FROM klient as k"))
.Add(_session.CreateQuery("SELECT o.Id_oferty, o.Opis_oferty FROM oferta as o"))
.Add(_session.CreateQuery("SELECT a.Id_agenta, a.Nazwisko FROM agent as a"));
were binded to combobox's mentioned properties properly ??
I can also add, that when I execute it, in the combobox I've got a returned (ie. 5 rows) of the same string "Array of object[]". Sth like that.
Any ideas?
Best wishes,
Greg