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
| Imports System.IO
Imports System.Data.SqlServerCe
Public Class formulaire_patient
Private Sub formulaire_patient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: cette ligne de code charge les données dans la table 'Base_de_donnée_patientDataSet.donnée_patient'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
Me.Donnée_patientTableAdapter.Fill(Me.Base_de_donnée_patientDataSet.donnée_patient)
Dim builder As SqlCeCommandBuilder = New SqlCeCommandBuilder(Donnée_patientTableAdapter)
Console.WriteLine(builder.GetUpdateCommand().CommandText)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles insert_photo.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
PictureBox1.ImageLocation = OpenFileDialog1.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Print.Click
Dim PageSetupDialog As New PageSetupDialog()
PageSetupDialog.Document = PrintDocument1
PageSetupDialog.PageSettings.Landscape = False
Me.PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim bmp As New Bitmap(Me.Width, Me.Height, Imaging.PixelFormat.Format32bppArgb)
Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
e.Graphics.DrawImage(bmp, 10, 10)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles precedent.Click
DonnéepatientBindingSource.MovePrevious()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles suivant.Click
DonnéepatientBindingSource.MoveNext()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles création_fiche.Click
DonnéepatientBindingSource.AddNew()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Delette.Click
If TextBox1.Text = Nothing Then
MsgBox("il n'y a rien à effacer", MsgBoxStyle.Exclamation, "vérification")
End If
DonnéepatientBindingSource.RemoveCurrent()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
If TextBox1.Text = Nothing Then
MsgBox("il manque une donnée", MsgBoxStyle.Exclamation, "vérification")
End If
DonnéepatientBindingSource.EndEdit()
Donnée_patientTableAdapter.Update(Base_de_donnée_patientDataSet)
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
liste_patient.Show()
End Sub
End Class |
Partager