C# Ön Muhasebe Programı

C# Ön Muhasebe Programı

firma adında veritabınımızı oluşturuyoruz ve tablolarımızı oluşturuyoruz.

Form1


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 WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
private void Form1_Load(object sender, EventArgs e)
{
timer1.Start();
getir();

}

private void button1_Click(object sender, EventArgs e)
{
Form2 a = new Form2();
a.Show();
this.Hide();
}
private void button10_Click(object sender, EventArgs e)
{
this.Close();
}

private void button2_Click_1(object sender, EventArgs e)
{

Form4 a = new Form4();
a.Show();
this.Hide();

}

private void timer1_Tick_1(object sender, EventArgs e)
{
label20.Text = DateTime.Now.ToShortTimeString();
label19.Text = DateTime.Now.ToLongDateString();
}

private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
{

Form8 a = new Form8();
a.Show();
this.Hide();

}

private void button10_Click_1(object sender, EventArgs e)
{
this.Close();
}
void getir()
{
OleDbCommand veri = new OleDbCommand("Select * From firma", baglan);
OleDbDataReader oku;
baglan.Open();
oku = veri.ExecuteReader();
while (oku.Read())
{
label14.Text = oku[0].ToString();
label15.Text = oku[5].ToString();
label16.Text = oku[8].ToString();
label17.Text = oku[6].ToString();
}
oku.Close();
baglan.Close();
}

private void pictureBox1_Click_1(object sender, EventArgs e)
{

}

private void button3_Click(object sender, EventArgs e)
{
Form9 a = new Form9();
a.Show();
this.Hide();

}

private void button6_Click(object sender, EventArgs e)
{
Form13 a = new Form13();
a.Show();
this.Hide();

}

private void button4_Click(object sender, EventArgs e)
{
Form16 a = new Form16();
a.Show();
this.Hide();

}

private void button9_Click(object sender, EventArgs e)
{
MessageBox.Show("Programın Ayarları İle Oynamayınız.");
}
}
}

Form2 Carikartlar

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 WindowsFormsApplication2
{
 public partial class Form2 : Form
 {
 Form6 frm2 = new Form6();
 public Form2()
 {
 InitializeComponent();
 }

 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select * From carikart";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "carikart");
 dataGridView1.DataSource = goster.Tables["carikart"];

getir.Dispose();
 baglan.Close();
 }
 private void button8_Click(object sender, EventArgs e)
 {
 Form1 a = new Form1();
 a.Show();
 this.Hide();
 }

private void button3_Click(object sender, EventArgs e)
 {
 Form3 a = new Form3();
 a.Show();
 this.Hide();
 }

private void Form2_Load(object sender, EventArgs e)
 {
 goster();
 }

private void button1_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From carikart", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From carikart" + " where(carituru like'%" + textBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "carikart");
 goster.Tables["carikart"].Clear();
 dataGridView1.DataSource = goster.Tables["carikart"];
 getir.Fill(goster, "carikart");
 baglan.Close();
 }

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From carikart", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From carikart" + " where(carituru like'%" + comboBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "carikart");
 goster.Tables["carikart"].Clear();
 dataGridView1.DataSource = goster.Tables["carikart"];
 getir.Fill(goster, "carikart");
 baglan.Close();
 }

private void button5_Click(object sender, EventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;

DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From carikart Where [tcno]=@tcno", baglan);
 sil.Parameters.AddWithValue("@tcno", dataGridView1.Rows[secili].Cells[5].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }

}

 private void button4_Click(object sender, EventArgs e)
 {
 Form6 frm2 = new Form6();
frm2.comboBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
 frm2.textBox1.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
 frm2.textBox2.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
 frm2.comboBox2.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
 frm2.comboBox3.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
 frm2.textBox3.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
 frm2.textBox4.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
 frm2.textBox5.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString();
 frm2.textBox6.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
 frm2.textBox7.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString();
 frm2.textBox8.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString();
 frm2.textBox9.Text = dataGridView1.CurrentRow.Cells[11].Value.ToString();
 frm2.textBox10.Text = dataGridView1.CurrentRow.Cells[12].Value.ToString();
 frm2.textBox11.Text = dataGridView1.CurrentRow.Cells[13].Value.ToString();
 frm2.textBox12.Text = dataGridView1.CurrentRow.Cells[14].Value.ToString();
 frm2.textBox13.Text = dataGridView1.CurrentRow.Cells[15].Value.ToString();
 frm2.textBox14.Text = dataGridView1.CurrentRow.Cells[16].Value.ToString();
 frm2.textBox15.Text = dataGridView1.CurrentRow.Cells[17].Value.ToString();
 frm2.textBox16.Text = dataGridView1.CurrentRow.Cells[18].Value.ToString();
 frm2.textBox17.Text = dataGridView1.CurrentRow.Cells[19].Value.ToString();
 frm2.dateTimePicker1.Text = dataGridView1.CurrentRow.Cells[20].Value.ToString();*/
 frm2.Show();
 this.Hide();
 }

private void button2_Click(object sender, EventArgs e)
 {
 goster();
 }
 }
}

Form3 Carikart Ekle

</pre>
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 WindowsFormsApplication2
{
 public partial class Form3 : Form
 {
 public Form3()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a==DialogResult.Yes)
 {
 Form2 b = new Form2();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

 }
 }

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO carikart([carituru],[firmaisim],[carikod],[carigrup],[fiyatgrup],[tcno],[dbakiyeb],[dbakiyea],[bakiyelimit],[adres],[istel1],[istel2],[ceptel1],[ceptel2],[faks],[tckno],[vergid],[vergino],[yetkiliad],[bankhesap],[kayittrh]) VALUES (@a,@s,@d,@f,@g,@h,@j,@k,@l,@z,@x,@c,@v,@b,@n,@m,@q,@w,@e,@r,@t)", baglan);
 kaydet.Parameters.AddWithValue("@a", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox1.Text);
 kaydet.Parameters.AddWithValue("@d", textBox2.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@g", comboBox3.Text);
 kaydet.Parameters.AddWithValue("@h", textBox3.Text);
 kaydet.Parameters.AddWithValue("@j", textBox4.Text);
 kaydet.Parameters.AddWithValue("@k", textBox5.Text);
 kaydet.Parameters.AddWithValue("@l", textBox6.Text);
 kaydet.Parameters.AddWithValue("@z", textBox7.Text);
 kaydet.Parameters.AddWithValue("@x", textBox8.Text);
 kaydet.Parameters.AddWithValue("@c", textBox9.Text);
 kaydet.Parameters.AddWithValue("@v", textBox10.Text);
 kaydet.Parameters.AddWithValue("@b", textBox11.Text);
 kaydet.Parameters.AddWithValue("@n", textBox12.Text);
 kaydet.Parameters.AddWithValue("@m", textBox13.Text);
 kaydet.Parameters.AddWithValue("@q", textBox14.Text);
 kaydet.Parameters.AddWithValue("@w", textBox15.Text);
 kaydet.Parameters.AddWithValue("@e", textBox16.Text);
 kaydet.Parameters.AddWithValue("@r", textBox17.Text);
 kaydet.Parameters.AddWithValue("@t", dateTimePicker1.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Edildi");

 }

private void Form3_Load(object sender, EventArgs e)
 {

 }

private void textBox3_TextChanged(object sender, EventArgs e)
 {
 string a;
 a = textBox3.Text;
 textBox13.Text = a.ToString();
 }
 }
}
<pre>

Form4 Stokkartları

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 WindowsFormsApplication2
{
 public partial class Form4 : Form
 {
 public Form4()
 {
 InitializeComponent();
 }

OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select * From stok";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "stok");
 dataGridView1.DataSource = goster.Tables["stok"];

getir.Dispose();
 baglan.Close();
 }
 private void button8_Click(object sender, EventArgs e)
 {
 Form1 b = new Form1();
 b.Show();
 this.Hide();
 }

private void button3_Click(object sender, EventArgs e)
 {
 Form5 c = new Form5();
 c.Show();
 this.Hide();
 }

private void button1_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From stok", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From stok" + " where(urunad like'%" + textBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "stok");
 goster.Tables["stok"].Clear();
 dataGridView1.DataSource = goster.Tables["stok"];
 getir.Fill(goster, "stok");
 baglan.Close();
 }

private void Form4_Load(object sender, EventArgs e)
 {
 goster();
 }

private void button2_Click(object sender, EventArgs e)
 {
 goster();
 }

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From stok", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From stok" + " where(stokgrup like'%" + comboBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "stok");
 goster.Tables["stok"].Clear();
 dataGridView1.DataSource = goster.Tables["stok"];
 getir.Fill(goster, "stok");
 baglan.Close();
 }

private void button4_Click(object sender, EventArgs e)
 {
 Form7 a = new Form7();
 a.Show();
 this.Hide();
 }

private void button5_Click(object sender, EventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;

 DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From stok Where [stokkod]=@stokkod", baglan);
 sil.Parameters.AddWithValue("@stokkod", dataGridView1.Rows[secili].Cells[1].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }
 }
 }
}

Form5 Stokkart Ekle


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 WindowsFormsApplication2
{
 public partial class Form5 : Form
 {
 public Form5()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO stok([urunad],[stokkod],[stokgrup],[birim],[alısf],[satısf],[kdv],[stokmik]) VALUES (@a,@s,@d,@f,@g,@h,@j,@k)", baglan);
 kaydet.Parameters.AddWithValue("@a", textBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox2.Text);
 kaydet.Parameters.AddWithValue("@d", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@g", textBox3.Text);
 kaydet.Parameters.AddWithValue("@h", textBox4.Text);
 kaydet.Parameters.AddWithValue("@j", textBox5.Text);
 kaydet.Parameters.AddWithValue("@k", textBox6.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Edildi");
 }

private void button2_Click(object sender, EventArgs e)
 {

DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form4 b = new Form4();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void Form5_Load(object sender, EventArgs e)
 {

}
 }
}

Form6 Carikart Düzelt


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 WindowsFormsApplication2
{
 public partial class Form6 : Form
 {
 public Form6()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form2 b = new Form2();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand güncelle = new OleDbCommand("UPDATE carikart SET [carituru]=@a,[firmaisim]=@s,[carikod]=@d,[carigrup]=@f,[fiyatgrup]=@g,[tcno]=@h,[dbakiyeb]=@j,[dbakiyea]=@k,[bakiyelimit]=@l,[adres]=@z,[istel1]=@x,[istel2]=@c,[ceptel1]=@v,[ceptel2]=@b,[faks]=@n,[tckno]=@m,[vergid]=@q,[vergino]=@w,[yetkiliad]=@e,[bankhesap]=@r,[kayittrh]=@t Where [tcno]=@h", baglan);
 güncelle.Parameters.AddWithValue("@a", comboBox1.Text);
 güncelle.Parameters.AddWithValue("@s", textBox1.Text);
 güncelle.Parameters.AddWithValue("@d", textBox2.Text);
 güncelle.Parameters.AddWithValue("@f", comboBox2.Text);
 güncelle.Parameters.AddWithValue("@g", comboBox3.Text);
 güncelle.Parameters.AddWithValue("@h", textBox3.Text);
 güncelle.Parameters.AddWithValue("@j", textBox4.Text);
 güncelle.Parameters.AddWithValue("@k", textBox5.Text);
 güncelle.Parameters.AddWithValue("@l", textBox6.Text);
 güncelle.Parameters.AddWithValue("@z", textBox7.Text);
 güncelle.Parameters.AddWithValue("@x", textBox8.Text);
 güncelle.Parameters.AddWithValue("@c", textBox9.Text);
 güncelle.Parameters.AddWithValue("@v", textBox10.Text);
 güncelle.Parameters.AddWithValue("@b", textBox11.Text);
 güncelle.Parameters.AddWithValue("@n", textBox12.Text);
 güncelle.Parameters.AddWithValue("@m", textBox13.Text);
 güncelle.Parameters.AddWithValue("@q", textBox14.Text);
 güncelle.Parameters.AddWithValue("@w", textBox15.Text);
 güncelle.Parameters.AddWithValue("@e", textBox16.Text);
 güncelle.Parameters.AddWithValue("@r", textBox17.Text);
 güncelle.Parameters.AddWithValue("@t", dateTimePicker1.Text);
 güncelle.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Güncellendi");
 }

private void Form6_Load(object sender, EventArgs e)
 {

}
 }
}

Form7 Stokkart Düzelt

</pre>
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 WindowsFormsApplication2
{
 public partial class Form7 : Form
 {
 public Form7()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form4 b = new Form4();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand güncelle = new OleDbCommand("UPDATE carikart SET [urunad]=@a,[stokkod]=@s,[stokgrup]=@d,[birim]=@f,[alısf]=@g,[satısf]=@h,[kdv]=@j,[stokmik]=@k", baglan);
 güncelle.Parameters.AddWithValue("@a", textBox1.Text);
 güncelle.Parameters.AddWithValue("@s", textBox2.Text);
 güncelle.Parameters.AddWithValue("@d", comboBox1.Text);
 güncelle.Parameters.AddWithValue("@f", comboBox2.Text);
 güncelle.Parameters.AddWithValue("@g", textBox3.Text);
 güncelle.Parameters.AddWithValue("@h", textBox4.Text);
 güncelle.Parameters.AddWithValue("@j", textBox5.Text);
 güncelle.Parameters.AddWithValue("@k", textBox6.Text);
 güncelle.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Güncellendi");
 }
 }
}
<pre>

Form8 Firma Bilgileri

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 WindowsFormsApplication2
{
 public partial class Form8 : Form
 {
 public Form8()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {
 Form1 a = new Form1();
 a.Show();
 this.Hide();
 }
 void goster()
 {
 string sorgu = "Select * From firma";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "firma");
 dataGridView1.DataSource = goster.Tables["firma"];

getir.Dispose();
 baglan.Close();
 }
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO firma([firmaad],[vergid],[vergino],[sehir],[ilce],[adres],[yetkili],[istel],[ceptel],[faks],[email],[web]) VALUES (@a,@s,@d,@f,@g,@h,@j,@k,@l,@z,@x,@c)", baglan);
 kaydet.Parameters.AddWithValue("@a", textBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox2.Text);
 kaydet.Parameters.AddWithValue("@d", textBox3.Text);
 kaydet.Parameters.AddWithValue("@f", textBox4.Text);
 kaydet.Parameters.AddWithValue("@g", textBox5.Text);
 kaydet.Parameters.AddWithValue("@h", textBox6.Text);
 kaydet.Parameters.AddWithValue("@j", textBox7.Text);
 kaydet.Parameters.AddWithValue("@k", textBox8.Text);
 kaydet.Parameters.AddWithValue("@l", textBox9.Text);
 kaydet.Parameters.AddWithValue("@z", textBox10.Text);
 kaydet.Parameters.AddWithValue("@x", textBox11.Text);
 kaydet.Parameters.AddWithValue("@c", textBox12.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Edildi");
 goster();
 }

private void button3_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand güncelle = new OleDbCommand("UPDATE firma SET [firmaad]=@a,[vergid]=@s,[vergino]=@d,[sehir]=@f,[ilce]=@g,[adres]=@h,[yetkili]=@j,[istel]=@k,[ceptel]=@l,[faks]=@z,[email]=@x,[web]=@c", baglan);
 güncelle.Parameters.AddWithValue("@a", textBox1.Text);
 güncelle.Parameters.AddWithValue("@s", textBox2.Text);
 güncelle.Parameters.AddWithValue("@d", textBox3.Text);
 güncelle.Parameters.AddWithValue("@f", textBox4.Text);
 güncelle.Parameters.AddWithValue("@g", textBox5.Text);
 güncelle.Parameters.AddWithValue("@h", textBox6.Text);
 güncelle.Parameters.AddWithValue("@j", textBox7.Text);
 güncelle.Parameters.AddWithValue("@k", textBox8.Text);
 güncelle.Parameters.AddWithValue("@l", textBox9.Text);
 güncelle.Parameters.AddWithValue("@z", textBox10.Text);
 güncelle.Parameters.AddWithValue("@x", textBox11.Text);
 güncelle.Parameters.AddWithValue("@c", textBox12.Text);
 güncelle.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Güncellendi");
 goster();
 }

private void button4_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From firma Where [vergid]=@vergid", baglan);
 sil.Parameters.AddWithValue("@vergid",textBox2.Text);
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();

 }

private void Form8_Load(object sender, EventArgs e)
 {
 goster();
 }

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 textBox1.Text = dataGridView1.Rows[secili].Cells[0].Value.ToString();
 textBox2.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
 textBox3.Text = dataGridView1.Rows[secili].Cells[2].Value.ToString();
 textBox4.Text = dataGridView1.Rows[secili].Cells[3].Value.ToString();
 textBox5.Text = dataGridView1.Rows[secili].Cells[4].Value.ToString();
 textBox6.Text = dataGridView1.Rows[secili].Cells[5].Value.ToString();
 textBox7.Text = dataGridView1.Rows[secili].Cells[6].Value.ToString();
 textBox8.Text = dataGridView1.Rows[secili].Cells[7].Value.ToString();
 textBox9.Text = dataGridView1.Rows[secili].Cells[8].Value.ToString();
 textBox10.Text = dataGridView1.Rows[secili].Cells[9].Value.ToString();
 textBox11.Text = dataGridView1.Rows[secili].Cells[10].Value.ToString();
 textBox12.Text = dataGridView1.Rows[secili].Cells[11].Value.ToString();

 }
 }
}

Form9 Fatura

</pre>
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 WindowsFormsApplication2
{
 public partial class Form9 : Form
 {
 public Form9()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select * From satis";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "satis");
 dataGridView1.DataSource = goster.Tables["satis"];

getir.Dispose();
 baglan.Close();
 }
 void goster2()
 {
 string sorgu = "Select * From alis";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "alis");
 dataGridView2.DataSource = goster.Tables["alis"];

getir.Dispose();
 baglan.Close();
 }
 void getir()//carikart bilgileri getiriyor
 {
 OleDbCommand veri = new OleDbCommand("Select * From carikart", baglan);
 OleDbDataReader oku;
 baglan.Open();
 oku = veri.ExecuteReader();
 while (oku.Read())
 {
 comboBox1.Items.Add(oku[1].ToString());
 }
 oku.Close();
 baglan.Close();
 }

 private void button3_Click(object sender, EventArgs e)
 {
 Form10 a = new Form10();
 a.Show();
 this.Hide();
 }

private void Form9_Load(object sender, EventArgs e)
 {
 goster();
 getir();
 goster2();
 }

private void button1_Click(object sender, EventArgs e)
 {
 if (checkBox1.Checked && checkBox2.Checked)
 {
 goster();
 goster2();
 }
 else
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From satis", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From satis" + " where(müsteri like'%" + comboBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "satis");
 goster.Tables["satis"].Clear();
 dataGridView1.DataSource = goster.Tables["satis"];
 getir.Fill(goster, "satis");
 baglan.Close();
 }
 }

private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
 if (checkBox1.Checked)
 {
 comboBox1.Enabled = false;
 }
 else
 {
 comboBox1.Enabled = true;
 }
 }

private void checkBox2_CheckedChanged(object sender, EventArgs e)
 {

if (checkBox2.Checked)
 {
 dateTimePicker1.Enabled = false;
 dateTimePicker2.Enabled = false;
 }
 else
 {
 dateTimePicker1.Enabled = true;
 dateTimePicker2.Enabled = true;
 }
 }

private void button2_Click(object sender, EventArgs e)
 {
 goster();
 goster2();
 }

private void button3_Click_1(object sender, EventArgs e)
 {
 Form10 a = new Form10();
 a.Show();
 this.Hide();
 }

private void button5_Click_1(object sender, EventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;

 DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From carikart Where [faturano]=@a", baglan);
 sil.Parameters.AddWithValue("@a", dataGridView1.Rows[secili].Cells[0].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }
 }

private void button8_Click_1(object sender, EventArgs e)
 {

Form1 a = new Form1();
 a.Show();
 this.Hide();
 }

private void button4_Click(object sender, EventArgs e)
 {
 Form11 a = new Form11();
 a.Show();
 this.Hide();
 }

private void button6_Click(object sender, EventArgs e)
 {
 Form15 a = new Form15();
 a.Show();
 this.Hide();
 }
 }
}

Form10 Satış Ekle

</pre>
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 WindowsFormsApplication2
{
 public partial class Form10 : Form
 {
 public Form10()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void getir()//carikart bilgileri getiriyor
 {
 OleDbCommand veri = new OleDbCommand("Select * From carikart", baglan);
 OleDbDataReader oku;
 baglan.Open();
 oku = veri.ExecuteReader();
 while (oku.Read())
 {
 comboBox1.Items.Add(oku[1].ToString());
 }
 oku.Close();
 baglan.Close();
 }
 void getir2()//stokkart bilgileri getiriyor
 {
 OleDbCommand veri = new OleDbCommand("Select * From stok", baglan);
 OleDbDataReader oku;
 baglan.Open();
 oku = veri.ExecuteReader();
 while (oku.Read())
 {
 comboBox2.Items.Add(oku[0].ToString());
 textBox2.Text = oku[5].ToString();
 }
 oku.Close();
 baglan.Close();
 }
 void hesapla()
 {
 double b, c;
 b = double.Parse(textBox2.Text);

 if (comboBox3.Text =="1")
 {

 c = 1 * b ;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "2")
 {
 c = 2 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "3")
 {
 c = 3 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "4")
 {
 c = 4 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "5")
 {
 c = 5 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "6")
 {
 c = 6 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "7")
 {
 c = 7 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "8")
 {
 c = 8 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "9")
 {
 c = 9 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "10")
 {
 c = 10 * b;
 textBox3.Text = c.ToString();
 }
 }
 private void Form10_Load(object sender, EventArgs e)
 {
 getir();
 getir2();

 }

private void button2_Click(object sender, EventArgs e)
 {

DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form9 b = new Form9();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO satis([tarih],[müsteri],[stokad],[miktar],[kdv],[satisf],[tutar]) VALUES (@a,@s,@d,@f,@g,@h,@j)", baglan);
 kaydet.Parameters.AddWithValue("@a", dateTimePicker1.Text);
 kaydet.Parameters.AddWithValue("@s", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@d", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox3.Text);
 kaydet.Parameters.AddWithValue("@g", textBox1.Text);
 kaydet.Parameters.AddWithValue("@h", textBox2.Text);
 kaydet.Parameters.AddWithValue("@j", textBox3.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Satış Yapıldı");

 }

private void textBox3_TextChanged(object sender, EventArgs e)
 {

 }

private void textBox2_TextChanged(object sender, EventArgs e)
 {
 hesapla();
 }

private void button3_Click(object sender, EventArgs e)
 {
 Form19 a = new Form19();
 a.Show();
 this.Hide();
 }

private void button4_Click(object sender, EventArgs e)
 {
 Form20 a = new Form20();
 a.Show();
 this.Hide();
 }
 }
}
<pre>

Form11 Alış Yap

</pre>
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 WindowsFormsApplication2
{
 public partial class Form11 : Form
 {
 public Form11()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO alis([tarih],[müsteri],[stokad],[miktar],[kdv],[satisf],[tutar]) VALUES (@a,@s,@d,@f,@g,@h,@j)", baglan);
 kaydet.Parameters.AddWithValue("@a", dateTimePicker1.Text);
 kaydet.Parameters.AddWithValue("@s", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@d", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox3.Text);
 kaydet.Parameters.AddWithValue("@g", textBox1.Text);
 kaydet.Parameters.AddWithValue("@h", textBox2.Text);
 kaydet.Parameters.AddWithValue("@j", textBox3.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Alış Yapıldı");
 }
 void hesapla()
 {
 double b, c;
 b = double.Parse(textBox2.Text);

 if (comboBox3.Text == "1")
 {

c = 1 * b ;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "2")
 {
 c = 2 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "3")
 {
 c = 3 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "4")
 {
 c = 4 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "5")
 {
 c = 5 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "6")
 {
 c = 6 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "7")
 {
 c = 7 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "8")
 {
 c = 8 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "9")
 {
 c = 9 * b;
 textBox3.Text = c.ToString();
 }
 if (comboBox3.Text == "10")
 {
 c = 10 * b;
 textBox3.Text = c.ToString();
 }
 }
 private void Form11_Load(object sender, EventArgs e)
 {

}

private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form9 c = new Form9();
 c.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void textBox2_TextChanged(object sender, EventArgs e)
 {
 hesapla();
 }
 }
}
<pre>

Form12 Personel Ekle

</pre>
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 WindowsFormsApplication2
{
 public partial class Form12 : Form
 {
 public Form12()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {

DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form13 b = new Form13();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void button1_Click(object sender, EventArgs e)
 {

baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO personel([ad],[tc],[gorev],[odeme],[maas],[bst],[bit],[tel],[adres],[sgk],[kang]) VALUES (@a,@s,@d,@f,@g,@h,@j,@k,@l,@z,@x)", baglan);
 kaydet.Parameters.AddWithValue("@a", textBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox2.Text);
 kaydet.Parameters.AddWithValue("@d", textBox3.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@g", textBox4.Text);
 kaydet.Parameters.AddWithValue("@h", dateTimePicker1.Text);
 kaydet.Parameters.AddWithValue("@j", dateTimePicker2.Text);
 kaydet.Parameters.AddWithValue("@k", textBox5.Text);
 kaydet.Parameters.AddWithValue("@l", textBox6.Text);
 kaydet.Parameters.AddWithValue("@z", textBox7.Text);
 kaydet.Parameters.AddWithValue("@x", comboBox2.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Yapıldı");
 }

private void Form12_Load(object sender, EventArgs e)
 {

}
 }
}
<pre>

Form13 Personel

</pre>
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 WindowsFormsApplication2
{
 public partial class Form13 : Form
 {
 Form14 frm2 = new Form14();
 public Form13()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select * From personel";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "personel");
 dataGridView1.DataSource = goster.Tables["personel"];

getir.Dispose();
 baglan.Close();
 }
 private void button3_Click(object sender, EventArgs e)
 {
 Form12 a = new Form12();
 a.Show();
 this.Hide();
 }

private void Form13_Load(object sender, EventArgs e)
 {
 goster();
 }

private void button2_Click(object sender, EventArgs e)
 {
 goster();
 }

private void button1_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From personel", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From personel" + " where(gorev like'%" + textBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "personel");
 goster.Tables["personel"].Clear();
 dataGridView1.DataSource = goster.Tables["personel"];
 getir.Fill(goster, "personel");
 baglan.Close();
 }

private void button5_Click(object sender, EventArgs e)
 {

int secili = dataGridView1.SelectedCells[0].RowIndex;

 DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From personel Where [tc]=@tc", baglan);
 sil.Parameters.AddWithValue("@tc", dataGridView1.Rows[secili].Cells[1].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }
 }

private void button8_Click(object sender, EventArgs e)
 {
 Form1 a = new Form1();
 a.Show();
 this.Hide();
 }

private void button4_Click(object sender, EventArgs e)
 {
 Form14 frm = new Form14();
 frm2.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
 frm2.textBox2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
 frm2.textBox3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
 frm2.comboBox1.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
 frm2.textBox4.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
 frm2.dateTimePicker1.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
 frm2.dateTimePicker2.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
 frm2.textBox5.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString();
 frm2.textBox6.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
 frm2.textBox7.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString();
 frm2.comboBox2.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString();
 frm2.Show();
 this.Hide();
 }

private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
 Form14 frm = new Form14();
 frm2.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
 frm2.textBox2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
 frm2.textBox3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
 frm2.comboBox1.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
 frm2.textBox4.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
 frm2.dateTimePicker1.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
 frm2.dateTimePicker2.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
 frm2.textBox5.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString();
 frm2.textBox6.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
 frm2.textBox7.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString();
 frm2.comboBox2.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString();
 frm2.Show();
 this.Hide();
 }
 }
}

Form14 Personel Düzelt

</pre>
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 WindowsFormsApplication2
{
 public partial class Form14 : Form
 {

 public Form14()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form13 b = new Form13();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand güncelle = new OleDbCommand("UPDATE personel SET [ad]=@a,[tc]=@s,[gorev]=@d,[odeme]=@f,[maas]=@g,[bst]=@h,[bit]=@j,[tel]=@k,[adres]=@l,[sgk]=@z,[kang] = @x", baglan);
 güncelle.Parameters.AddWithValue("@a", textBox1.Text);
 güncelle.Parameters.AddWithValue("@s", textBox2.Text);
 güncelle.Parameters.AddWithValue("@d", textBox3.Text);
 güncelle.Parameters.AddWithValue("@f", comboBox1.Text);
 güncelle.Parameters.AddWithValue("@g", textBox4.Text);
 güncelle.Parameters.AddWithValue("@h", dateTimePicker1.Text);
 güncelle.Parameters.AddWithValue("@j", dateTimePicker2.Text);
 güncelle.Parameters.AddWithValue("@k", textBox5.Text);
 güncelle.Parameters.AddWithValue("@l", textBox6.Text);
 güncelle.Parameters.AddWithValue("@z", textBox7.Text);
 güncelle.Parameters.AddWithValue("@x", comboBox2.Text);
 güncelle.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Güncellendi");
 }

private void Form14_Load(object sender, EventArgs e)
 {

}
 }
}
<pre>

Form15 Fatura Düzelt

</pre>
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 WindowsFormsApplication2
{
 public partial class Form15 : Form
 {
 public Form15()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand güncelle = new OleDbCommand("UPDATE satis SET [faturano]=@a,[tarih]=@s,[müsteri]=@d,[stokad]=@f,[miktar]=@g,[kdv]=@h,[satisf]=@j,[tutar]=@k Where [faturano]=a", baglan);
 güncelle.Parameters.AddWithValue("@s", dateTimePicker1.Text);
 güncelle.Parameters.AddWithValue("@d", comboBox1.Text);
 güncelle.Parameters.AddWithValue("@f", comboBox2.Text);
 güncelle.Parameters.AddWithValue("g", comboBox3.Text);
 güncelle.Parameters.AddWithValue("@h", textBox1.Text);
 güncelle.Parameters.AddWithValue("@j", textBox2.Text);
 güncelle.Parameters.AddWithValue("@k", textBox3.Text);
 güncelle.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Güncellendi");
 }

private void button2_Click(object sender, EventArgs e)
 {
 DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form9 b = new Form9();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void Form15_Load(object sender, EventArgs e)
 {

}
 }
}
<pre>

Form16 Kasa


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 WindowsFormsApplication2
{
 public partial class Form16 : Form
 {
 public Form16()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select * From gelir";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "gelir");
 dataGridView1.DataSource = goster.Tables["gelir"];

getir.Dispose();
 baglan.Close();
 }
 void goster2()
 {
 string sorgu = "Select * From gider";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "gider");
 dataGridView2.DataSource = goster.Tables["gider"];

getir.Dispose();
 baglan.Close();
 }
 private void button4_Click(object sender, EventArgs e)
 {

}

private void button3_Click(object sender, EventArgs e)
 {
 Form17 a = new Form17();
 a.Show();
 this.Hide();
 }

private void button2_Click(object sender, EventArgs e)
 {
 goster();
 }

private void button1_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From kasa", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From kasa" + " where(carikart like'%" + textBox1.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "kasa");
 goster.Tables["kasa"].Clear();
 dataGridView1.DataSource = goster.Tables["kasa"];
 getir.Fill(goster, "kasa");
 baglan.Close();
 }

private void button8_Click(object sender, EventArgs e)
 {
 Form1 a = new Form1();
 a.Show();
 this.Hide();
 }

private void button5_Click(object sender, EventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;

DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From gelir Where [no]=@a", baglan);
 sil.Parameters.AddWithValue("@a", dataGridView1.Rows[secili].Cells[0].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }
 }

private void Form16_Load(object sender, EventArgs e)
 {
 goster();
 goster2();
 }

private void button14_Click(object sender, EventArgs e)
 {
 Form18 a = new Form18();
 a.Show();
 this.Hide();
 }

private void button13_Click(object sender, EventArgs e)
 {

}

private void button12_Click(object sender, EventArgs e)
 {

int secili = dataGridView2.SelectedCells[0].RowIndex;

DialogResult a;
 a = MessageBox.Show("Silmek İstediğinizden Emin Misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From gider Where [no]=@a", baglan);
 sil.Parameters.AddWithValue("@a", dataGridView2.Rows[secili].Cells[0].Value.ToString());
 sil.ExecuteNonQuery();
 baglan.Close();
 goster();
 }
 }

private void button9_Click(object sender, EventArgs e)
 {
 Form1 a = new Form1();
 a.Show();
 this.Hide();
 }
 }
}

Form17 Gelir Ekle


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 WindowsFormsApplication2
{
 public partial class Form17 : Form
 {
 public Form17()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void getir()//carikart bilgileri getiriyor
 {
 OleDbCommand veri = new OleDbCommand("Select * From carikart", baglan);
 OleDbDataReader oku;
 baglan.Open();
 oku = veri.ExecuteReader();
 while (oku.Read())
 {
 comboBox2.Items.Add(oku[1].ToString());
 }
 oku.Close();
 baglan.Close();
 }
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO gelir([cıkısyaph],[tutar],[carikart],[giderk],[tarih],[acıklama]) VALUES (@a,@s,@d,@f,@g,@h)", baglan);
 kaydet.Parameters.AddWithValue("@a", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox1.Text);
 kaydet.Parameters.AddWithValue("@d", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox3.Text);
 kaydet.Parameters.AddWithValue("@g", dateTimePicker1.Text);
 kaydet.Parameters.AddWithValue("@h", textBox2.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Yapıldı");

}

private void Form17_Load(object sender, EventArgs e)
 {
 getir();
 }

private void button2_Click(object sender, EventArgs e)
 {

DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form16 b = new Form16();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }
 }
}

Form18 Gider Ekle


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 WindowsFormsApplication2
{
 public partial class Form18 : Form
 {
 public Form18()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void getir()//carikart bilgileri getiriyor
 {
 OleDbCommand veri = new OleDbCommand("Select * From carikart", baglan);
 OleDbDataReader oku;
 baglan.Open();
 oku = veri.ExecuteReader();
 while (oku.Read())
 {
 comboBox2.Items.Add(oku[1].ToString());
 }
 oku.Close();
 baglan.Close();
 }
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO gider([cıkısyaph],[tutar],[carikart],[giderk],[tarih],[acıklama]) VALUES (@a,@s,@d,@f,@g,@h)", baglan);
 kaydet.Parameters.AddWithValue("@a", comboBox1.Text);
 kaydet.Parameters.AddWithValue("@s", textBox1.Text);
 kaydet.Parameters.AddWithValue("@d", comboBox2.Text);
 kaydet.Parameters.AddWithValue("@f", comboBox3.Text);
 kaydet.Parameters.AddWithValue("@g", dateTimePicker1.Text);
 kaydet.Parameters.AddWithValue("@h", textBox2.Text);
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("Başarıyla Kayıt Yapıldı");
 }

private void button2_Click(object sender, EventArgs e)
 {

DialogResult a;
 a = MessageBox.Show("Yapılan Değişiklikler İptal Edilecek. Devam Etmek İstiyor musunuz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
 if (a == DialogResult.Yes)
 {
 Form16 b = new Form16();
 b.Show();
 this.Hide();
 }
 if (a == DialogResult.No)
 {

}
 }

private void Form18_Load(object sender, EventArgs e)
 {

}
 }
}

Form19 Cari Kart Seç


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 WindowsFormsApplication2
{
 public partial class Form19 : Form
 {
 public Form19()
 {
 InitializeComponent();
 }
 Form10 frm10 = new Form10();
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select carituru,firmaisim,carikod From carikart";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "carikart");
 dataGridView1.DataSource = goster.Tables["carikart"];

getir.Dispose();
 baglan.Close();
 }
 private void button2_Click(object sender, EventArgs e)
 {
 Form10 a = new Form10();
 a.Show();
 this.Hide();
 }

private void Form19_Load(object sender, EventArgs e)
 {
 goster();
 }

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 textBox1.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
 }

private void textBox2_TextChanged(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From carikart", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From carikart" + " where(firmaisim like'%" + textBox2.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "carikart");
 goster.Tables["carikart"].Clear();
 dataGridView1.DataSource = goster.Tables["carikart"];
 getir.Fill(goster, "carikart");
 baglan.Close();
 }

private void button1_Click(object sender, EventArgs e)
 {
 Form10 frm = new Form10();
 frm10.comboBox1.Text = textBox1.Text.ToString();

 frm10.Show();
 this.Hide();
 }
 }
}

Form20 Stok Kart Seç


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 WindowsFormsApplication2
{
 public partial class Form20 : Form
 {
 public Form20()
 {
 InitializeComponent();
 }
 Form10 frm10 = new Form10();
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=firma.accdb");
 void goster()
 {
 string sorgu = "Select urunad,stokkod From stok";
 baglan.Open();

OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet goster = new DataSet();
 getir.Fill(goster, "stok");
 dataGridView1.DataSource = goster.Tables["stok"];

getir.Dispose();
 baglan.Close();
 }
 private void Form20_Load(object sender, EventArgs e)
 {
 goster();
 }

private void textBox2_TextChanged(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From stok", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From stok" + " where(urunad like'%" + textBox2.Text + "%')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "stok");
 goster.Tables["stok"].Clear();
 dataGridView1.DataSource = goster.Tables["stok"];
 getir.Fill(goster, "stok");
 baglan.Close();
 }

private void button1_Click(object sender, EventArgs e)
 {
 Form10 frm = new Form10();
 frm10.comboBox2.Text = textBox1.Text.ToString();

frm10.Show();
 this.Hide();
 }

private void button2_Click(object sender, EventArgs e)
 {
 Form10 a = new Form10();
 a.Show();
 this.Hide();
 }

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 textBox1.Text = dataGridView1.Rows[secili].Cells[0].Value.ToString();
 }
 }
}

6.574 defa okundu.

7 Responses to C# Ön Muhasebe Programı

  1. Fatih dedi ki:

    Kardeş bu projeyi nasıl indirebiliriz…

  2. Hale dedi ki:

    projenin veri tabanındaki tablo bilgilerini nasıl görebilirim?

    • Kadir GÜRBÜZ dedi ki:

      Hale Hanım Merhabalar;
      Projenin veritabanındaki tablo bilgilerinden kasıt burada sütunların açıklama bölümü ise bunu veritabanından çekmek yerine tooltip benzeri araçlar kullanılabilir fakat siz listelemeyi kastediyorsanız sitede konu mevcut
      Örnek Kod :

      OleDbConnection bag = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=data.accdb");//Bağlantı Cümlesi
      DataTable tablo = new DataTable();//Sanal Tablo
      void liste()//Listeyi Güncellemek İçin ve Verileri Anlık Görüntülemek İçin Bir Metod
       {
       tablo.Clear();
       OleDbDataAdapter da = new OleDbDataAdapter("Select * from Tablo1",bag);
       da.Fill(tablo);
       dataGridView1.DataSource = tablo;
       }
      

      Bu liste Metodunu istediğiniz yere yazıp verileri anlık görebilirsiniz.
      –Hayırlı Çalışmalar–

  3. Rahmi dedi ki:

    Cidden iyiki paylaşmışsınız ama bir sorum var hocam simdi bu bire bir muhasebe programı’mı ?

  4. fazli dedi ki:

    hemen hemen çözdüm ama kasa veri tabanı alanlarını bulamadım

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Powered by WordPress | Designed by: credit repair | Thanks to st louis web design, essay writing and fire glass
c# örnekleri , csharp örnekleri , c# örnek , C# Örnekleri , örnekleri c# , C# ÖRNEKLERİ
BTT Sınavları

C# Uygulamaları

Müdür Yardımcılığı Sınavına Hazırlık Sayfası

Müdür Yardımcılığı Çalışma Notları

C# Uygulamaları

Yazılı Soruları Php Dersleri Bilişim Teknolojileri Alanı Yazılı Soruları C# Dersleri C# Örnekleri