Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- AccessDataSource1.InsertCommand = ("insert into ktp (isbn,adi, turu,yazari,fiyat,btarihi) values('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + TextBox3.Text + "', '" + TextBox4.Text + "', " + TextBox5.Text + ", '" + TextBox6.Text + "')");
- AccessDataSource1.Insert();
- Label1.Text = "Kaydedildi";
- }
- catch
- {
- Label1.Text = "Kaydedilemedi";
- }
- }
- protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
- {
- try
- {
- AccessDataSource1.UpdateCommand = ("update ktp set adi='" + TextBox2.Text + "', turu='" + TextBox3.Text + "', yazari='" + TextBox4.Text + "', fiyat=" + TextBox5.Text + ", btarihi='" + TextBox6.Text + "' where isbn='" + TextBox1.Text + "'");
- AccessDataSource1.Update();
- Label1.Text = "Kayıt güncellendi";
- }
- catch
- {
- Label1.Text = "Kayıt güncellenemedi";
- }
- }
- protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
- {
- try
- {
- AccessDataSource1.DeleteCommand = ("delete from ktp where isbn='" + TextBox1.Text + "'");
- AccessDataSource1.Delete();
- Label1.Text = "Silindi";
- }
- catch
- {
- Label1.Text = "Silinemedi";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement