C# Access Veritabanı ile Emlakcı Programı - Bilişim Konuları

C# Access Veritabanı ile Emlakcı Programı

C# Access veritabanı kullanılarak yapılmış olan Emlak Takip Sistemi Programı. Bu program Visual C# Programında yapılmış güzel bir veri tabanı uygulama programıdır. Bu program ile İstediğiniz mahalle ve ildeki kiralık veya satılık evleri bulabilir ve kiralayabilirsiniz. Program ile tüm veritabanı işlemlerini yapabilirsiniz. Kayıtları Access veritabanında tutan bir program.

Bu programla:
– Kayıt Listeleme
– Kayıt Arama
– Kayıt Silme
– Kayıt Ekleme
– Kayıt Güncelleme

işlemlerinin tamamı yapılmaktadır.

Programın çalışır hali aşağıdaki resimde görülmektedir.

Programın C# Kodları:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb; //Access bağlantı dosyaları

namespace emlak
{
    public partial class Form1 : Form
    {
        OleDbConnection baglanti = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=emlak.accdb");
        OleDbCommand komut = new OleDbCommand();
        OleDbDataAdapter adtr = new OleDbDataAdapter();
        DataSet ds = new DataSet();

        public Form1()
        {
            InitializeComponent();
        }
        
        //DataGrid üzerinde kayıtları listeleme bölümü
        void listele()
        {
            baglanti.Open();
            OleDbDataAdapter adtr = new OleDbDataAdapter("Select * from emlak", baglanti);
            adtr.Fill(ds, "emlak");
            dataGridView1.DataSource = ds.Tables["emlak"];
            adtr.Dispose();
            baglanti.Close();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            listele();

        }
        //Kayıt silme bölümü
        private void button1_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            komut.Connection = baglanti;
            komut.CommandText = "Delete from emlak where s_no=" + tb1.Text + "";
            komut.ExecuteNonQuery();
            komut.Dispose();
            baglanti.Close();
            ds.Clear();
            listele();
        }
        //Kayıt arama bölümü
        private void button2_Click(object sender, EventArgs e)
        {
            baglanti = new OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=emlak.accdb");
            adtr = new OleDbDataAdapter("Select * from emlak where s_no like '" + tb1.Text + "%'", baglanti);
            ds = new DataSet();
            baglanti.Open();
            adtr.Fill(ds, "emlak");
            dataGridView1.DataSource = ds.Tables["emlak"];
            baglanti.Close();
        }
        //Kayıt ekleme bölümü
        private void button3_Click(object sender, EventArgs e)
        {
            label14.Text = pictureBox1.ImageLocation;
            if (tb1.Text != "" && tb2.Text != "" && tb3.Text != "" && tb4.Text != "" && tb5.Text != "" && tb6.Text != "" && tb7.Text != "" && tb8.Text != "" && tb9.Text != "" && tb10.Text != "" && tb11.Text != "" && label14.Text != "")
            {
                komut.Connection = baglanti;
                komut.CommandText = "Insert Into emlak(s_no,il_ilce,adres,kat_sayisi,b_kat,daire_no,isitma,alani,oda_sayisi,bina_yasi,fiyat,resim) Values ('" + tb1.Text + "','" + tb2.Text + "','" + tb3.Text + "','" + tb4.Text + "','" + tb5.Text + "','" + tb6.Text + "','" + tb7.Text + "','" + tb8.Text + "','" + tb9.Text + "','" + tb10.Text + "','" + tb11.Text + "','" + tb12.Text + "')";
                baglanti.Open();
                komut.ExecuteNonQuery();
                komut.Dispose();
                baglanti.Close();
                MessageBox.Show("Kayıt Tamamlandı!");
                ds.Clear();
                listele();
            }
            else
            {
                MessageBox.Show("Kayıt Yapılamadı!");
            }
        }
        //Kayıt güncelleme bölümü
        private void button4_Click(object sender, EventArgs e)
        {
            komut = new OleDbCommand();
            baglanti.Open();
            komut.Connection = baglanti;
            komut.CommandText = "update emlak set il_ilce ='" + tb2.Text + "',adres='" + tb3.Text + "',kat_sayisi='" + tb4.Text + "',b_kat='" + tb5.Text + "',daire_no='" + tb6.Text + "',isitma='" + tb7.Text + "',alani='" + tb8.Text + "',oda_sayisi='" + tb9.Text + "',bina_yasi='" + tb10.Text + "',fiyat='" + tb11.Text + "',resim='" + pictureBox1.ImageLocation + "'where s_no=" + tb1.Text + "";
            komut.ExecuteNonQuery();

            komut.ExecuteNonQuery();
            baglanti.Close();
            ds.Clear();
            listele();
        }
        //Resim seçme bölümü
        private void button5_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                pictureBox1.ImageLocation = openFileDialog1.FileName;
                tb12.Text = openFileDialog1.FileName;
            }
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
        //DataGrid'e Tıklayınca kayıtları Textbox'lara yazdırma bölümü
        private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            
            
        }

        private void dataGridView1_CellEnter_1(object sender, DataGridViewCellEventArgs e)
        {
            tb1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            tb2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            tb3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            tb4.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            tb5.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            tb6.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            tb7.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
            tb8.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString();
            tb9.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
            tb10.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString();
            tb11.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString();
            pictureBox1.ImageLocation = dataGridView1.CurrentRow.Cells[11].Value.ToString();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void tb7_TextChanged(object sender, EventArgs e)
        {

        }
    }
}

Programı indirmek için Tıklayınız

C# Access Veri Tabanı İle Yapılmış Diğer Proje Örnekleri



C# access veri tabanı ile araba kiralama programı

C# access veri tabanı ile demirbaş takip programı

C# access veri tabanı ile eczane programı

C# access veri tabanı ile emlakçı programı

C# access veri tabanı ile hal takip programı

C# access veri tabanı ile kullanıcı girişi programı

C# access veri tabanı ile kütüphane programı

C# access veri tabanı ile otel oda programı

C# access veri tabanı ile oto galeri programı

C# access veri tabanı ile otopark programı

C# access veri tabanı ile veresiye takip programı

C# access veri tabanı ile araç kiralama programı

C# access veri tabanı ile demirbaş takip programı

C# access veri tabanı ile eczane takip programı

C# access veri tabanı ile emlakçı programı

C# access veri tabanı ile futbolcu kayıt programı

C# access veri tabanı ile hasta takip programı

C# access veri tabanı ile işçi takip programı

C# access veri tabanı ile kitap kayıt programı

C# access veri tabanı ile kütüphane programı

C# access veri tabanı ile otel müşteri programı

C# access veri tabanı ile otel takip programı

C# access veri tabanı ile otopark programı

C# access veri tabanı ile telefon satış programı

C# access veri tabanı ile muhtar takip programı

C# access veri tabanı ile veresiye takip programı

C# access veri tabanı ile kayıt ekleme, silme, listeleme, arama, güncelleme

Bu Yazıya Tepkin Nedir?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Yorum Yap

1 Yorum

  • dataview seçili olan başka formda güncelleme için seçilen alan il ve ilçeyi nasıl cagıra bilirim
    OleDbConnection con;
    private void personel_kayıt_güncelle_Load(object sender, EventArgs e)
    {
    con = new OleDbConnection(“Provider=Microsoft.ACE.Oledb.12.0;Data Source=vt.accdb”);
    DataTable dt = new DataTable();
    OleDbDataAdapter da = new OleDbDataAdapter(“select * from iller ORDER BY id ASC “, con);
    da.Fill(dt);
    da.Update(dt);
    cmbİl.ValueMember = “id=@id”;
    cmbİl.DisplayMember = “sehir=@sehir”;
    cmbİl.DataSource = dt;
    }

    private void cmbİlce_SelectedIndexChanged(object sender, EventArgs e)
    {

    }

    private void cmbİl_SelectedIndexChanged(object sender, EventArgs e)
    {
    if (cmbİl.SelectedIndex != -1)
    {
    DataTable dt = new DataTable();
    OleDbDataAdapter da = new OleDbDataAdapter(“select * from update ilceler = ” + cmbİl.SelectedValue, con);
    // da.Fill(dt);
    da.Update(dt);
    cmbİlce.ValueMember = “id=@id”;
    cmbİlce.DisplayMember = “ilce=@ilce”;
    cmbİlce.DataSource = dt;
    }
    }