Пример #1
0
        public void Listele(string komut)
        {
            try
            {
                islemler = new VeritabaniIslemler();
                if (islemler.Al(komut).Rows.Count > 0)
                {
                    MySqlConnection conn = new MySqlConnection(VeritabaniIslemler.ConnectionString());

                    da = new MySqlDataAdapter(komut, conn);
                    ds = new DataSet();

                    //Fill the DataSet.
                    da.Fill(ds, Home.donem);
                    dtSource = ds.Tables[Home.donem];
                    Fill();
                    dataGridView1.Focus();
                }
                else
                {
                    dataGridView1.DataSource = null;
                    dataGridView1.Rows.Clear();
                    dataGridView1.Refresh();
                }
            }
            catch (Exception err)
            {
                MessageBox.Show("Tablo Listelenirken Hata! \nHata Kodu:" + err, "HATA!");
            }
        }