1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click
'DboutillageDataSet = DboutillageDataSet.GetChanges()
Fonctions_validation_historique.ShowDialog()
Dim verif_bool As Boolean
verif_bool = Fonctions_validation_historique.Get_verification()
If verif_bool = True Then
fonction_sauvegarde_table(DboutillageDataSet.Table_forage_famille, Table_forage_familleTableAdapter, ma_table)
Else
MsgBox("La sauvegarde de la table n'a pas été effectuée")
End If
End Sub
Private Sub btn_ajouter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ajouter.Click
Try
Me.TableforagefamilleBindingSource.AllowNew = True
Me.TableforagefamilleBindingSource.AddNew()
Catch except As Exception
MessageBox.Show("la valeur indiquée ne corresponds pas aux attentes demandées")
End Try
End Sub
Private Sub btn_supprimer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_supprimer.Click
Fonctions_validation_historique.ShowDialog()
Dim verif_bool As Boolean
verif_bool = Fonctions_validation_historique.Get_verification()
If verif_bool = True Then
Try
Dim strMessage As String
Dim slbl As String
slbl = Trim(Table_forage_familleDataGridView.CurrentRow.Cells(0).Value)
slbl = Trim(slbl)
strMessage = String.Format("Désirez-vous supprimer {0} ?", slbl)
If MessageBox.Show(strMessage, "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = DialogResult.OK Then
Try
ma_table_adaptater.Delete(slbl)
Fonctions_validation_historique.fonction_sauvegarde_validation_formulaire(ma_table)
Table_forage_familleTableAdapter.Update(DboutillageDataSet.Table_forage_famille)
MessageBox.Show("Suppresion réussi")
TableforagefamilleBindingSource.RemoveCurrent()
'DboutillageDataSet = DboutillageDataSet.GetChanges()
'boutillageDataSet.GetChanges()
Catch ex As Exception
MessageBox.Show("Erreur rencontrée : " & ex.Message.ToString)
End Try
Else
'
End If
Catch ex As Exception
End Try
Else
MsgBox("L'action n'a pas été effectuée")
End If
End Sub |
Partager