示例#1
0
        private void btnPredavacUSkoli_Click(object sender, EventArgs e)
        {
            string skola = comboBox1.Text;
            Dictionary <string, object> queryDict = new Dictionary <string, object>();

            queryDict.Add("skola", skola);


            var query = new Neo4jClient.Cypher.CypherQuery("match(s:Skola)<-[r: ODRZAVA_SE]-(k:Kurs)-[r1:PREDAJE]->(p:Predavac) where s.naziv = { skola } return p ORDER BY p.ime",
                                                           queryDict, CypherResultMode.Set);

            try
            {
                List <Predavac> predavaci = ((IRawGraphClient)client).ExecuteGetCypherResults <Predavac>(query).ToList();

                Prikaz2 frm = new Prikaz2();
                frm.Value = predavaci;
                frm.ShowDialog();

                comboBox1.Text = "";
            }

            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }
示例#2
0
        private void btnPrikaziPredavaca_Click(object sender, EventArgs e)
        {
            string predavac = ".*" + txtTraziPredavaca.Text + ".*";

            Dictionary <string, object> queryDict = new Dictionary <string, object>();

            queryDict.Add("ime", predavac);

            var query = new Neo4jClient.Cypher.CypherQuery("match (p:Predavac)  where p.ime =~ {ime} return p order by p.ime",
                                                           queryDict, CypherResultMode.Set);

            try
            {
                List <Predavac> predavaci = ((IRawGraphClient)client).ExecuteGetCypherResults <Predavac>(query).ToList();

                Prikaz2 frm = new Prikaz2();
                frm.Value = predavaci;
                frm.ShowDialog();

                txtTraziPredavaca.Text = "";
            }

            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }