Exemplo n.º 1
0
        private async void giveButton_Click(object sender, EventArgs e)
        {
            ComboboxValue asd = (ComboboxValue)deliveryComboBox.SelectedItem;
            string        id  = asd.CourierID;

            //Courier courier = PossibleToDeliveryCouriers.Find(courier => courier.CourierID == id);
            foreach (Order order in Orders)
            {
                order.CourierID = id;
                order.Status    = Status.ReadyToDeliver;
                await db.AddOrder(order);
            }
            this.Close();
        }
Exemplo n.º 2
0
        private void reportReview_Click(object sender, EventArgs e)
        {
            ComboboxValue tmpComboboxValue = (ComboboxValue)choseDoctor.SelectedItem;
            var           queryDelete      = new Neo4jClient.Cypher.CypherQuery("MATCH(n { id: '" + tmpComboboxValue.doc.id + "' })-[r:Ima]->(p {id: '" + this.patients.id + "' }) DELETE r return p",
                                                                                new Dictionary <string, object>(), CypherResultMode.Set);

            ((IRawGraphClient)client).ExecuteGetCypherResults <Patients>(queryDelete).ToList();


            client.Cypher
            .Match("(d:Doctors)", "(p:Patients)")
            .Where((Doctors d) => d.id == tmpComboboxValue.doc.id)
            .AndWhere((Patients p) => p.id == this.patients.id)
            .Create("(d)-[r:Ima]->(p)")
            .ExecuteWithoutResults();
            MessageBox.Show("Pregled Prijavljen");
        }