Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using System.Collections;
- using MySql.Data.MySqlClient;
- namespace WpfApp1
- {
- /// <summary>
- /// Logika interakcji dla klasy MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- static MySqlConnection polaczenie = new MySqlConnection("server=skydomesoftware.cba.pl; password=XXX; user=FridgeCook; database=skydome_software;charset=utf8");
- static String ConnectionString = "server=skydomesoftware.cba.pl; password=XXX; user=FridgeCook; database=skydome_software;charset=utf8";
- static MySqlCommand komenda;
- static MySqlDataReader czytnik;
- static string polecenie = "";
- public MainWindow()
- {
- InitializeComponent();
- wypis();
- }
- public void wypis()
- {
- //try
- //{
- // using (MySqlConnection polaczenie = new MySqlConnection(ConnectionString))
- // {
- // polaczenie.Open();
- // polecenie = "select * from " + "CLPKonwersacje" + " where ID = 1 ";
- // komenda = new MySqlCommand(polecenie, polaczenie);
- // komenda.ExecuteNonQuery();
- // czytnik = komenda.ExecuteReader();
- // while (czytnik.Read())
- // {
- // Tekst.Text = czytnik["ContentPL1"].ToString();
- // }
- // czytnik.Close();
- // polaczenie.Close();
- // }
- //}
- //catch (MySqlException ex)
- //{
- // Tekst.Text = ex.ToString();
- //}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement