Exemplo n.º 1
0
        private void button_refresh_Click(object sender, RoutedEventArgs e)
        {
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("SELECT o.id, o.Status, u.address, f.name, oi.quantity, o.total FROM orders o join users u on o.user_id=u.id join order_items oi on oi.order_id=o.id join foods f on f.id = oi.food_id");
            databaseReader.Close();
        }
Exemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("update orders set Status='W realizacji' where id= " + query[comboBoxOrders.SelectedIndex][0]);
            databaseReader.Close();
        }
Exemplo n.º 3
0
        private void button_refresh_Click(object sender, RoutedEventArgs e)
        {
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("select o.id, f.name, oi.quantity, o.Status from orders o join order_items oi on o.id=oi.id join foods f on f.id=oi.food_id");
            databaseReader.Close();
        }
Exemplo n.º 4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Paragon();
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("update orders set Status='W dostawie' where id= " + query[comboBoxDelivery.SelectedIndex][0]);
            databaseReader.Close();
        }
Exemplo n.º 5
0
        public Delivery()
        {
            InitializeComponent();
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("SELECT o.id, o.Status, u.address, f.name, oi.quantity, o.total FROM orders o join users u on o.user_id=u.id join order_items oi on oi.order_id=o.id join foods f on f.id = oi.food_id");
            databaseReader.Close();
            SetOrdersId();
        }
Exemplo n.º 6
0
        public Cook()
        {
            InitializeComponent();
            DatabaseReader databaseReader = new DatabaseReader();

            databaseReader.Connect();
            query = databaseReader.Read("select o.id, f.name, oi.quantity, o.Status from orders o join order_items oi on o.id=oi.id join foods f on f.id=oi.food_id");
            databaseReader.Close();
            SetOrdersId();
        }