private void btnKorisnikSkola_Click(object sender, EventArgs e) { string korisnik = comboBox4.Text; Dictionary <string, object> queryDict = new Dictionary <string, object>(); queryDict.Add("korisnik", korisnik); var query = new Neo4jClient.Cypher.CypherQuery("match(k:Korisnik)<-[r: POHADJA]-(n:Kurs)-[r1: ODRZAVA_SE]->(s:Skola) where k.ime = { korisnik } return s ORDER BY s.naziv", queryDict, CypherResultMode.Set); try { List <Skola> skole = ((IRawGraphClient)client).ExecuteGetCypherResults <Skola>(query).ToList(); Prikaz1 frm = new Prikaz1(); frm.Value = skole; frm.ShowDialog(); comboBox4.Text = ""; } catch (Exception exc) { MessageBox.Show(exc.Message); } }
private void btnPronadjiSkolu_Click(object sender, EventArgs e) { string skola = ".*" + txtPronadjiSkolu.Text + ".*"; Dictionary <string, object> queryDict = new Dictionary <string, object>(); queryDict.Add("naziv", skola); var query = new Neo4jClient.Cypher.CypherQuery("match (s:Skola) where s.naziv =~ {naziv} return s order by s.naziv", queryDict, CypherResultMode.Set); try { List <Skola> skole = ((IRawGraphClient)client).ExecuteGetCypherResults <Skola>(query).ToList(); Prikaz1 frm = new Prikaz1(); frm.Value = skole; frm.ShowDialog(); txtPronadjiSkolu.Text = ""; } catch (Exception exc) { MessageBox.Show(exc.Message); } }