private void btnsavebook_Click(object sender, EventArgs e) { bookclass b = new bookclass(); b.bookIdsg = txtbookId.Text; b.name_ketabsg = txtbookId.Text; b.name_nevisandesg = txtname_nevisande.Text; b.shabaksg = txtshabk.Text; b.mozoesg = txtmozoe.Text; b.nashersg = txtnasher.Text; b.moshakhsatsg = txtmoshakhsat.Text; b.noe_chapsg = txtnoe_chap.Text; b.sale_entesharsg = txtsale_enteshar.Text; b.tedad_kmojodsg = txttedad_kmojod.Text; b.insert_book(); }
///////////////////////////////////////////////////////insert book button private void btnsavebook_Click_1(object sender, EventArgs e) { bookclass b = new bookclass(); b.bookIdsg = txtbookId.Text; DataTable dt = b.search_book_ID(); if (dt.Rows.Count == 0) { b.name_ketabsg = txtname_book.Text; b.name_nevisandesg = txtname_nevisande.Text; b.shabaksg = txtshabk.Text; b.mozoesg = txtmozoe.Text; b.nashersg = txtnasher.Text; b.moshakhsatsg = txtmoshakhsat.Text; b.noe_chapsg = txtnoe_chap.Text; b.sale_entesharsg = txtsale_enteshar.Text; b.tedad_kmojodsg = txttedad_kmojod.Text; b.insert_book(); } else { MessageBox.Show("این کتاب قبلا ثبت شده است"); } txtbookId.Text = ""; txtname_book.Text = ""; txtname_nevisande.Text = ""; txtshabk.Text = ""; txtmozoe.Text = ""; txtnasher.Text = ""; txtmoshakhsat.Text = ""; txtnoe_chap.Text = ""; txtsale_enteshar.Text = ""; txttedad_kmojod.Text = ""; ///////////////////////////////////////////////////////insert book button }