Пример #1
0
        private void Ara_Click(object sender, EventArgs e)
        {
            string Ad = txtAd.Text;

            if (Ad == "")
            {
                MessageBox.Show("Hata! Ad alanı boş geçilemez", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            DataTable dt = MamiKatmanı.Search(Ad);

            if (Ad != null)
            {
                dtgSearchResult.DataSource = dt;
            }
            else
            {
                MessageBox.Show("Kayıt bulunamadı", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }