Advertisement
YagizYurek

Araba Kayıt Programı

Mar 28th, 2018
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.12 KB | None | 0 0
  1.             string yakit="",vites="";
  2.            if(RadioButton1.Checked==true)
  3.             {
  4.             yakit="Lambasuyu";
  5.             }
  6.             else if(RadioButton2.Checked==true)
  7.             {
  8.                 yakit="Benzin";
  9.             }
  10.             else if(RadioButton3.Checked==true)
  11.             {
  12.             yakit="Hibrid";
  13.             }
  14.             if(RadioButton4.Checked==true)
  15.             {
  16.             vites="Manuel";
  17.              }
  18.             else if(RadioButton5.Checked==true)
  19.             {
  20.             vites="Otomatik";
  21.             }
  22.  
  23.             try
  24.             {
  25.  
  26.                 AccessDataSource1.InsertCommand = ("insert into araba (serino, marka,model,fiyat, renk,yakit,vites, mgucu) values('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + TextBox3.Text + "', '" + TextBox4.Text + "', '" + TextBox5.Text + "', '" + yakit + "', '" + vites + "' ,'" + TextBox6.Text + "')");
  27.                 AccessDataSource1.Insert();
  28.                 Label1.Text = "Kaydedildi";
  29.             }
  30.             catch
  31.             {
  32.                 Label1.Text = "Kayıt işlemi Başarısız";
  33.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement