Giriş Ekranı
[code lang=”csharp”]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;
namespace Ferhat
{
public partial class Form1 : Form
{
public Form2 frm2;
public Form3 frm3;
public Form4 frm4;
public Form1()
{
InitializeComponent();
frm2 = new Form2();
frm3 = new Form3();
frm4 = new Form4();
frm2.frm1 = this;
frm3.frm1 = this;
frm4.frm1 = this;
}
OleDbConnection bag = new OleDbConnection("Provider=Microsoft.Ace.OleDb.12.0;Data Source=data.accdb");
OleDbCommand kmt = new OleDbCommand();
private void btnEkle_Click(object sender, EventArgs e)
{
frm2.ShowDialog();
}
void listele()
{
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek", bag);
adaptör.Fill(tablo);
dataGridView1.DataSource = tablo;
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
private void btnGüncelle_Click(object sender, EventArgs e)
{
frm3.ShowDialog();
}
private void Form1_Load(object sender, EventArgs e)
{
listele();
}
private void btnSil_Click(object sender, EventArgs e)
{
DialogResult sil;
sil = MessageBox.Show("Kullanıcıyı silmek istediğinize emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (sil == DialogResult.Yes)
{
bag.Open();
kmt.Connection = bag;
kmt.CommandText = "DELETE FROM örnek WHERE numara=’" + dataGridView1.CurrentRow.Cells[0].Value.ToString() + "’";
kmt.ExecuteNonQuery();
bag.Close();
listele();
MessageBox.Show("Başarıyla Silindi", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void btnAra_Click(object sender, EventArgs e)
{
frm4.ShowDialog();
}
private void btnÇıkış_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
[/code]
[code lang=”csharp”]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;
namespace Ferhat
{
public partial class Form2 : Form
{
public Form1 frm1;
public Form3 frm3;
public Form4 frm4;
public Form2()
{
InitializeComponent();
}
OleDbConnection bag = new OleDbConnection("Provider=Microsoft.Ace.OleDb.12.0;Data Source=data.accdb");
OleDbCommand kmt = new OleDbCommand();
DataTable tablo = new DataTable();
private void btnEkle_Click(object sender, EventArgs e)
{
try
{
if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "")
{
DialogResult kayıt;
kayıt = MessageBox.Show("Eklemek istediğinize emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (kayıt == DialogResult.Yes)
{
tablo.Clear();
bag.Open();
kmt.Connection = bag;
kmt.CommandText = "INSERT INTO örnek(numara,adı,soyadı)VALUES (‘" + textBox1.Text + "’,’" + textBox2.Text + "’,’" + textBox3.Text + "’)";
kmt.ExecuteNonQuery();
bag.Close();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek", bag);
adaptör.Fill(tablo);
frm1.dataGridView1.DataSource = tablo;
MessageBox.Show("Başarıyla kayıt olundu", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
}
}
else MessageBox.Show("Lütfen Boş alanları dolduralım", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
catch
{
MessageBox.Show("Aynı numaradan başka biri eklenemez", "uyarı", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}
}
}
[/code]
[code lang=”csharp”]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;
namespace Ferhat
{
public partial class Form3 : Form
{
public Form1 frm1;
public Form2 frm2;
public Form4 frm4;
public Form3()
{
InitializeComponent();
}
OleDbConnection bag = new OleDbConnection("Provider=Microsoft.Ace.OleDb.12.0;Data Source=data.accdb");
OleDbCommand kmt = new OleDbCommand();
private void btnGüncelle_Click(object sender, EventArgs e)
{
DialogResult güncel;
güncel = MessageBox.Show("Güncellemek istediğinize emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (güncel == DialogResult.Yes)
{
bag.Open();
kmt.Connection = bag;
kmt.CommandText = "UPDATE örnek SET adı=’" + textBox2.Text + "’,soyadı=’" + textBox3.Text + "’ WHERE numara=’" + frm1.dataGridView1.CurrentRow.Cells[0].Value.ToString() + "’";
kmt.ExecuteNonQuery();
bag.Close();
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek", bag);
adaptör.Fill(tablo);
frm1.dataGridView1.DataSource = tablo;
this.Close();
MessageBox.Show("Güncelleme Başarıyla tamamlandı", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void Form4_Load(object sender, EventArgs e)
{
textBox2.Text = frm1.dataGridView1.CurrentRow.Cells[1].Value.ToString();
textBox3.Text = frm1.dataGridView1.CurrentRow.Cells[2].Value.ToString();
}
}
}
[/code]
Arama

[code lang=”csharp”]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;
namespace Ferhat
{
public partial class Form4 : Form
{
public Form1 frm1;
public Form2 frm2;
public Form3 frm3;
public Form4()
{
InitializeComponent();
}
OleDbConnection bag = new OleDbConnection("Provider=Microsoft.Ace.OleDb.12.0;Data Source=data.accdb");
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (comboBox1.Text == "Numarası")
{
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek where numara Like ‘%" + textBox1.Text + "%’", bag);
adaptör.Fill(tablo);
dataGridView1.DataSource = tablo;
}
if (comboBox1.Text == "Adı")
{
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek where adı Like ‘%" + textBox1.Text + "%’", bag);
adaptör.Fill(tablo);
dataGridView1.DataSource = tablo;
}
if (comboBox1.Text == "Soyadı")
{
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek where soyadı Like ‘%" + textBox1.Text + "%’", bag);
adaptör.Fill(tablo);
dataGridView1.DataSource = tablo;
}
}
private void Form4_Load(object sender, EventArgs e)
{
DataTable tablo = new DataTable();
OleDbDataAdapter adaptör = new OleDbDataAdapter("Select * From örnek", bag);
adaptör.Fill(tablo);
dataGridView1.DataSource = tablo;
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
}
}
[/code]



Selam GörselProgramlama ;
Benim Böyle Bir Programa İhtiyacım Var Kişileri Kaydedip Kişinin Üzerine Tıkladığımda Kişinin TC’si numarası adresi vb. şeyler çıkmalı tabikide giriş yaparken şifre istemeli belki umursamazsınız ama e mail imde ulaşırsanız sevinirim.Şimdiden teşekkür ederim..
oğuzhan : Proje için gorselprogram@gmail.com adresine mail atınız.
bu projeyi nasıl indire bilirim
arkadaşlar benim böyle bir projeye ihtiyacım mail olarak attım ama bir ilgilenirseniz sevinirim :