Exemple #1
0
        private void btn_Bestelling_Click(object sender, EventArgs e)
        {
            ListViewItem item  = listView_Register.SelectedItems[0];
            Drink        Drink = (Drink)item.Tag;

            ListViewItem item2   = listView_Register2.SelectedItems[0];
            Student      Student = (Student)item2.Tag;

            new Order()
            {
                Id      = orderService.OrderCount(),
                Drink   = Drink,
                Student = Student,
                Date    = DateTime.Now,
                Number  = int.Parse(txtbox_Aantal.Text)
            };
            orderService.Db_Update_Order(orderService.OrderCount(), Drink, Student, DateTime.Now, int.Parse(txtbox_Aantal.Text));
            MessageBox.Show("Order Placed");
            txtbox_Aantal.Text = "1";
        }