C# Kargo Takip Programı

C# Kargo Takip Programı

Form1

</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;

namespace WindowsFormsApplication20
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }

private void Form1_Load(object sender, EventArgs e)
 {
 // textBox1.Text = "HOŞGELDİNİZ...HOŞGELDİNİZ...HOŞGELDİNİZ...".ToString();
 textBox2.Text = "HOŞGELDİNİZ...HOŞGELDİNİZ...HOŞGELDİNİZ...".ToString();
 timer1.Start();

}

private void button1_Click(object sender, EventArgs e)
 {
 Form2 y = new Form2();
 y.Show();

}

private void button2_Click(object sender, EventArgs e)
 {
 Form3 y = new Form3();
 y.Show();

 // if (button1.Text) pictureBox1.ImageLocation = "b.PNG";
 }

private void kargoGönderToolStripMenuItem_Click(object sender, EventArgs e)
 {
 Form2 y = new Form2();
 y.Show();
 }

private void button3_Click(object sender, EventArgs e)
 {
 Form4 y = new Form4();
 y.Show();
 }

private void button4_Click(object sender, EventArgs e)
 {
 Form5 y = new Form5();
 y.Show();
 }

private void pictureBox1_Click(object sender, EventArgs e)
 {
 if (pictureBox1.ImageLocation == "a.jpg")
 {
 Form2 y = new Form2();
 y.Show();
 }
 if (pictureBox1.ImageLocation == "b.jpg")
 {
 Form3 y = new Form3();
 y.Show();
 }
 if (pictureBox1.ImageLocation == "d.jpg")
 {
 Form4 y = new Form4();
 y.Show();
 }
 if (pictureBox1.ImageLocation == "e.jpg")
 {
 Form5 y = new Form5();
 y.Show();
 }
 }

private void kargoTakipToolStripMenuItem_Click(object sender, EventArgs e)
 {
 Form3 y = new Form3();
 y.Show();
 }

private void fiyatHesablaToolStripMenuItem_Click(object sender, EventArgs e)
 {

 Form4 y = new Form4();
 y.Show();

 }

private void bayilerimizToolStripMenuItem_Click(object sender, EventArgs e)
 {

 Form5 y = new Form5();
 y.Show();

 }

private void hakkımızdaToolStripMenuItem_Click(object sender, EventArgs e)
 {
 MessageBox.Show("2014 yılında kurulmuştur kargo şirketimiz.Şirket başkanı Seyit Camcı'dır.");
 }

private void adminGirişiToolStripMenuItem_Click(object sender, EventArgs e)
 {
 Form6 y = new Form6();
 y.Show();
 }

&nbsp;

private void button1_MouseMove(object sender, MouseEventArgs e)
 {
 pictureBox1.ImageLocation = "a.jpg";
 button1.BackColor = Color.White;
 button2.BackColor = Color.DeepSkyBlue;
 button3.BackColor = Color.DeepSkyBlue;
 button4.BackColor = Color.DeepSkyBlue;
 }

private void button2_MouseMove(object sender, MouseEventArgs e)
 {
 pictureBox1.ImageLocation = "b.jpg";

button1.BackColor = Color.DeepSkyBlue;
 button2.BackColor = Color.White;
 button3.BackColor = Color.DeepSkyBlue;
 button4.BackColor = Color.DeepSkyBlue;
 }

private void button3_MouseMove(object sender, MouseEventArgs e)
 {
 pictureBox1.ImageLocation = "d.jpg";
 button1.BackColor = Color.DeepSkyBlue;
 button2.BackColor = Color.DeepSkyBlue;
 button3.BackColor = Color.White;
 button4.BackColor = Color.DeepSkyBlue;
 }

private void button4_MouseMove(object sender, MouseEventArgs e)
 {
 pictureBox1.ImageLocation = "e.jpg";
 button1.BackColor = Color.DeepSkyBlue;
 button2.BackColor = Color.DeepSkyBlue;
 button3.BackColor = Color.DeepSkyBlue;
 button4.BackColor = Color.White;

 }

private void timer1_Tick(object sender, EventArgs e)
 {
 textBox2.Text = textBox2.Text.Substring(1) + textBox2.Text.Substring(0, 1);
 }

private void pictureBox4_Click(object sender, EventArgs e)
 {
 Form8 y = new Form8();
 y.Show();
 }

private void pictureBox2_Click(object sender, EventArgs e)
 {
 Form9 y = new Form9();
 y.Show();
 }

private void pictureBox3_Click(object sender, EventArgs e)
 {
 Form7 y = new Form7();
 y.Show();
 }

private void pictureBox5_Click(object sender, EventArgs e)
 {
 Form10 y = new Form10();
 y.Show();
 }

private void pictureBox6_Click(object sender, EventArgs e)
 {
 Form11 y = new Form11();
 y.Show();
 }

private void pictureBox7_Click(object sender, EventArgs e)
 {
 Form12 y = new Form12();
 y.Show();
 }
 }
}
<pre>

Form2(Kargo Gönder)

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

private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand kaydet = new OleDbCommand("INSERT INTO kargo([tc],[adı],[soyadı],[telefon],[email],[kredi],[adres],[gönderilecekadres],[fiyat],[durum]) VALUES (@tc,@ad,@s,@tel,email,@k,@adres,@g,@f,@d)", baglan);
 kaydet.Parameters.AddWithValue("@tc", textBox1.Text);
 kaydet.Parameters.AddWithValue("@ad", textBox2.Text);
 kaydet.Parameters.AddWithValue("@s", textBox3.Text);
 kaydet.Parameters.AddWithValue("@tel", textBox4.Text);
 kaydet.Parameters.AddWithValue("@email", textBox5.Text);
 kaydet.Parameters.AddWithValue("@k", textBox7.Text);
 kaydet.Parameters.AddWithValue("@adres",richTextBox1.Text);
 kaydet.Parameters.AddWithValue("@g",richTextBox2.Text);
 kaydet.Parameters.AddWithValue("@f", label11.Text);
 kaydet.Parameters.AddWithValue("@d", "beklemede");
 kaydet.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("başarıyı ile kayıtedildi");
 }

private void button3_Click(object sender, EventArgs e)
 {
 Form4 n = new Form4();
 n.Show();
 this.Close();
 }

private void button4_Click(object sender, EventArgs e)
 {
 printDialog1.ShowDialog();
 }

private void button5_Click_1(object sender, EventArgs e)
 {
 Form13 x = new Form13();
 x.Show();
 this.Close();
 }
 }
}
<pre>

Form3(Kargonun Durumu)

</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 WindowsFormsApplication20
{
 public partial class Form3 : Form
 {
 public Form3()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=scmc.accdb");
 private void button1_Click(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("Select * From kargo ", baglan);
 baglan.Open();
 getir.SelectCommand.CommandText = "Select * From kargo" + " where(tc = '"+ textBox1.Text+"')";
 DataSet goster = new DataSet();
 getir.Fill(goster, "kargo");
 goster.Tables["kargo"].Clear();
 dataGridView1.DataSource = goster.Tables["kargo"];
 getir.Fill(goster, "kargo");
 baglan.Close();
 }

private void textBox1_TextChanged(object sender, EventArgs e)
 {

 }

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 string d;
 DialogResult s;
 d = dataGridView1.Rows[secili].Cells[9].Value.ToString();
 s= MessageBox.Show(d.ToString(),"YAZDIRMAK İSTER MİSİNİZ",MessageBoxButtons.OKCancel);
 if (s ==DialogResult.OK )
 {
 printDialog1.ShowDialog();

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

 }

}
}
<pre>

Form4(Fiyat Hesapla)

</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;

namespace WindowsFormsApplication20
{
 public partial class Form4 : Form
 {
 Form2 frm4 = new Form2();

 public Form4()
 {
 InitializeComponent();
 }

private void button3_Click(object sender, EventArgs e)
 {
 if (radioButton1.Checked)
 {
 double a ;
 double adet ;

double d ;

double k, y, m, c, b, l, p;
 adet = double.Parse(textBox4.Text);
 a = double.Parse(textBox6.Text);
 d = double.Parse(textBox5.Text);
 l = double.Parse(textBox2.Text);

b = double.Parse(textBox1.Text);
 k = double.Parse(textBox3.Text);
 if (comboBox1.Text == "Konya" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p+18;

label1.Text = y.ToString();

 }

if (comboBox1.Text == "Konya" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Konya" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 10;

label1.Text = y.ToString();

}
 if (comboBox2.Text == "SOMA")
 {
 int n = 0;

label1.Text = n.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 15;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 8;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 15;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 18;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 20;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 8;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 10;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 20;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 2;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Konya" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 2;

label1.Text = y.ToString();

}

 }
 if (radioButton2.Checked)
 {
 double a;
 double adet;
 double d ;
 double k, y, m, c, b, l, p;
 adet = double.Parse(textBox9.Text);
 d = double.Parse(textBox8.Text);
 a = double.Parse(textBox7.Text);
 l = double.Parse(textBox2.Text);
 b = double.Parse(textBox1.Text);
 k = double.Parse(textBox3.Text);
 /* m = k * d;
 p = l * adet;
 c = a * b;
 y = c + m + p;

label1.Text = y.ToString();*/
 if (comboBox1.Text == "Konya" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 18;

label1.Text = y.ToString();

}

if (comboBox1.Text == "Konya" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Konya" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 10;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 15;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 8;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 15;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 18;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 20;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 8;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 10;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 20;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Sivas" && comboBox2.Text == "Sivas")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 2;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "İstanbul" && comboBox2.Text == "İstanbul")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Ankara" && comboBox2.Text == "Ankara")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 5;

label1.Text = y.ToString();

}
 if (comboBox1.Text == "Konya" && comboBox2.Text == "Konya")
 {
 p = l * adet;

m = k * d;
 c = a * b;
 y = c + m + p + 2;

label1.Text = y.ToString();

}

 }

}
 public static string fiyat;
 private void Form4_Load(object sender, EventArgs e)
 {
 textBox4.Visible = false;
 textBox5.Visible = false;
 textBox6.Visible = false;
 textBox7.Visible = false;
 textBox8.Visible = false;
 textBox9.Visible = false;
 label8.Visible = false;
 label9.Visible = false;
 label10.Visible = false;
 label11.Visible = false;
 label12.Visible = false;
 label13.Visible = false;
 label14.Visible = false;
 label15.Visible = false;
 // fiyat = label1.Text;

 }

private void button1_Click(object sender, EventArgs e)
 {
 textBox4.Visible = true;
 textBox5.Visible = true;
 textBox6.Visible = true;
 textBox7.Visible = true;
 textBox8.Visible = true;
 textBox9.Visible = true;
 label8.Visible = true;
 label9.Visible = true;
 label10.Visible = true;
 label11.Visible = true;
 label12.Visible = true;
 label13.Visible = true;
 label14.Visible = true;
 label15.Visible = true;
 }

private void button2_Click(object sender, EventArgs e)
 {

 frm4.label11.Text = label1.Text;
 // Form2 f = (Form2)this.Owner;

frm4.Show();
 this.Hide();
 //f.Show();


 }
 }
 }
<pre>

Form5(Bayiler)

</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;

namespace WindowsFormsApplication20
{
 public partial class Form5 : Form
 {
 public Form5()
 {
 InitializeComponent();
 }

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
 if (comboBox1.Text == "İstanbul")
 {
 comboBox2.Items.Clear();
 comboBox2.Items.Add("Taksim");
 comboBox2.Items.Add("Beyoğlu");
 comboBox2.Items.Add("Eyüp");
 }
 if (comboBox1.Text == "Ankara")
 {
 comboBox2.Items.Clear();
 comboBox2.Items.Add("Kızılay");
 comboBox2.Items.Add("Kurtuluş");
 comboBox2.Items.Add("Cebeci");
 }
 if (comboBox1.Text == "Konya")
 {
 comboBox2.Items.Clear();
 comboBox2.Items.Add("Meram");
 comboBox2.Items.Add("Karatay");
 comboBox2.Items.Add("Çumra");
 }
 if (comboBox1.Text == "Sivas")
 {
 comboBox2.Items.Clear();
 comboBox2.Items.Add("Merkez");


 }

}

private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
 if (comboBox2.Text == "Taksim")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("dumlıpınar caddesi bostancı sokak no:81 5362986243");
 }
 if (comboBox2.Text == "Beyoğlu")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("yeniyol caddesi kaan sokak no:12 5426983621");
 }
 if (comboBox2.Text == "Eyüp")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("erdem caddesi no:20 5317893652");
 }
 if (comboBox2.Text == "Kızılay")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("lale caddesi İş Bankası Arkasında 5452697863");
 }
 if (comboBox2.Text == "Kurtuluş")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("50.yıl parkı yanı 5362101028");
 }
 if (comboBox2.Text == "Cebeci")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("konya yolu istiklal caddesi no:36 5427893610");
 }
 if (comboBox2.Text == "Meram")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("stadyum arkası 5426235842");
 }
 if (comboBox2.Text == "Karatay")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("eski garaj arkası 5446123698");
 }
 if (comboBox2.Text == "Çumra")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("İzzetbey mah. Alparslan Türkeş Cad. no:42 (Bim karşısı) 5461450000");
 }
 if (comboBox2.Text == "Merkez")
 {
 listBox1.Items.Clear();
 listBox1.Items.Add("İstiklal caddesi no:19(Büyük Otel karşısı) 5442697812");
 }
 }

private void Form5_Load(object sender, EventArgs e)
 {
 webBrowser1.Navigate("https://maps.google.com/maps/ms?hl=tr&ie=UTF8&msa=0");
 }

}
 }
<pre>

Form6(Admin)

</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 WindowsFormsApplication20
{
 public partial class Form6 : Form
 {

 public Form6()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=scmc.accdb");
 private void Form6_Load(object sender, EventArgs e)
 {
 cmc();
 scmc();
 }
 void cmc()
 {
 string sorgu = "Select * From kargo";
 baglan.Open();
 OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet göster = new DataSet();
 getir.Fill(göster, "kargo");
 dataGridView1.DataSource = göster.Tables["kargo"];
 getir.Dispose();
 baglan.Close();
 }

void scmc()
 {
 string sorgu = "Select * From kargo";
 baglan.Open();
 OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
 DataSet göster = new DataSet();
 getir.Fill(göster, "kargo");
 dataGridView2.DataSource = göster.Tables["kargo"];
 getir.Dispose();
 baglan.Close();
 }
 private void button1_Click(object sender, EventArgs e)
 {
 baglan.Open();
 OleDbCommand sil = new OleDbCommand("delete From kargo Where [kargo no]=@k", baglan);
 sil.Parameters.AddWithValue("@k", textBox1.Text);
 sil.ExecuteNonQuery();
 MessageBox.Show("Kayıt Silindi");
 baglan.Close();
 cmc();
 }

private void button2_Click(object sender, EventArgs e)
 {
 string d;
 baglan.Open();
 OleDbCommand guncel = new OleDbCommand("Update kargo SET [tc]=@tc,[adı]=@ad,[soyadı]=@s,[telefon]=@tel,[email]=@email,[kredi]=@k,[adres]=@adres,[gönderilecekadres]=@g,[fiyat]=@f,[durum]=@drm,[kargo no]=@kn Where [kargo no]=@kn ", baglan);

 guncel.Parameters.AddWithValue("@tc", textBox3.Text);
 guncel.Parameters.AddWithValue("@ad", textBox4.Text);
 guncel.Parameters.AddWithValue("@s", textBox5.Text);
 guncel.Parameters.AddWithValue("@tel", textBox6.Text);
 guncel.Parameters.AddWithValue("@email", textBox7.Text);
 guncel.Parameters.AddWithValue("@k", textBox8.Text);
 guncel.Parameters.AddWithValue("@adres", richTextBox1.Text);
 guncel.Parameters.AddWithValue("@g", richTextBox2.Text);
 guncel.Parameters.AddWithValue("@f", textBox9.Text);
 if (radioButton1.Checked)
 {
 d = "beklemede";
 guncel.Parameters.AddWithValue("@drm", d);
 }
 if (radioButton2.Checked)
 {
 d = "teslim edildi";
 guncel.Parameters.AddWithValue("@drm", d);
 //guncel.Parameters.AddWithValue("@kn", textBox2.Text);
 }

guncel.Parameters.AddWithValue("@kn", textBox2.Text);

guncel.ExecuteNonQuery();
 baglan.Close();
 MessageBox.Show("başarıyı ile güncellendi");
 scmc();

}

private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView2.SelectedCells[0].RowIndex;
 textBox3.Text = dataGridView2.Rows[secili].Cells[0].Value.ToString();
 textBox4.Text = dataGridView2.Rows[secili].Cells[1].Value.ToString();
 textBox5.Text = dataGridView2.Rows[secili].Cells[2].Value.ToString();
 textBox6.Text = dataGridView2.Rows[secili].Cells[3].Value.ToString();
 textBox7.Text = dataGridView2.Rows[secili].Cells[4].Value.ToString();
 textBox8.Text = dataGridView2.Rows[secili].Cells[5].Value.ToString();
 richTextBox1.Text = dataGridView2.Rows[secili].Cells[6].Value.ToString();

 richTextBox2.Text = dataGridView2.Rows[secili].Cells[7].Value.ToString();
 textBox9.Text = dataGridView2.Rows[secili].Cells[8].Value.ToString();
 textBox2.Text = dataGridView2.Rows[secili].Cells[10].Value.ToString();
 }

private void button3_Click(object sender, EventArgs e)
 {

 }

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

private void tabPage1_Click(object sender, EventArgs e)
 {

}
 }
}
<pre>

Form13(Bilgi Aktarma)

</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 WindowsFormsApplication20
{
 public partial class Form13 : Form
 {
 Form2 form13 = new Form2();
 public Form13()
 {
 InitializeComponent();
 }
 OleDbConnection baglan = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=scmc.accdb");
 private void Form13_Load(object sender, EventArgs e)
 {
 OleDbDataAdapter getir = new OleDbDataAdapter("SELECT * From kargo", baglan);
 baglan.Open();
 DataSet goster = new DataSet();
 getir.Fill(goster, "kargo");
 dataGridView1.DataSource = goster.Tables["kargo"];
 getir.Dispose();
 baglan.Close();
 }
 int secili = 0;
 void gezinti()
 {

textBox2.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
 }

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
 int secili = dataGridView1.SelectedCells[0].RowIndex;
 textBox2.Text = dataGridView1.Rows[secili].Cells[0].Value.ToString();
 textBox3.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
 textBox4.Text = dataGridView1.Rows[secili].Cells[2].Value.ToString();
 textBox5.Text = dataGridView1.Rows[secili].Cells[3].Value.ToString();
 textBox6.Text = dataGridView1.Rows[secili].Cells[4].Value.ToString();
 textBox7.Text = dataGridView1.Rows[secili].Cells[5].Value.ToString();
 richTextBox1.Text = dataGridView1.Rows[secili].Cells[6].Value.ToString();
 richTextBox2.Text = dataGridView1.Rows[secili].Cells[7].Value.ToString();
 }

private void button1_Click(object sender, EventArgs e)
 {
 form13.textBox1.Text = textBox2.Text;
 form13.textBox2.Text = textBox3.Text;
 form13.textBox3.Text = textBox4.Text;
 form13.textBox4.Text = textBox5.Text;
 form13.textBox5.Text = textBox6.Text;
 form13.textBox7.Text = textBox7.Text;
 form13.richTextBox1.Text = richTextBox1.Text;
 form13.richTextBox2.Text = richTextBox2.Text;
 form13.Show();
 this.Hide();
 }

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

3.675 defa okundu.

2 Responses to C# Kargo Takip Programı

  1. Ali Rıza KOÇAK dedi ki:

    Çok güzel olmuş…Yapanın ellerine sağlık..Akıllıca düşünülmüş…

  2. MERT ATEŞ dedi ki:

    BUNUN HAZIR YAPILMIŞ KODU YOK MU
    İNDİRELİ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