private void button2_Click(object sender, RoutedEventArgs e) { Window taskWindow = new buy_moto(id_parsing); taskWindow.Show(); this.Hide(); }
private void button2_Click(object sender, RoutedEventArgs e) { //UPDATE moto_storage1 SET moto_storage1.moto_count = Количество WHERE(((moto_storage1.moto_id)Like "Id Мото")); OleDbConnection conn; string connectionString = @"Provider = Microsoft.JET.OLEDB.4.0; Data Source = |DataDirectory|\\MotoDB.mdb"; string query = "UPDATE moto_storage SET moto_storage.moto_count = '" + (Convert.ToInt32(textBox12.Text) + moto_count_in_DB) + "' WHERE(((moto_storage.moto_id)Like '" + moto_id + "'));"; conn = new OleDbConnection(connectionString); conn.Open(); OleDbCommand command = new OleDbCommand(query, conn); command.ExecuteNonQuery(); conn.Close(); Window tw = new buy_moto(id_parsing); tw.Show(); this.Close(); }