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