Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string yakit="",vites="";
- if(RadioButton1.Checked==true)
- {
- yakit="Lambasuyu";
- }
- else if(RadioButton2.Checked==true)
- {
- yakit="Benzin";
- }
- else if(RadioButton3.Checked==true)
- {
- yakit="Hibrid";
- }
- if(RadioButton4.Checked==true)
- {
- vites="Manuel";
- }
- else if(RadioButton5.Checked==true)
- {
- vites="Otomatik";
- }
- try
- {
- 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 + "')");
- AccessDataSource1.Insert();
- Label1.Text = "Kaydedildi";
- }
- catch
- {
- Label1.Text = "Kayıt işlemi Başarısız";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement