' Copyright (C) 2025  P4pillon.org
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU Affero General Public License as
' published by the Free Software Foundation, either version 3 of the
' License, or (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU Affero General Public License for more details.
'
' You should have received a copy of the GNU Affero General Public License
' along with this program.  If not, see <https://www.gnu.org/licenses/>.
Public Class PRESCRIPTEURS_MAIN

    Private Sub SORTIE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SORTIE.Click
        Me.Close()
    End Sub

    Private Sub PrescripteursBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrescripteursBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.PrescripteursBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.PharmaDataSet)

    End Sub

    Private Sub PRESCRIPTEURS_MAIN_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 'PharmaDataSet.Prescripteurs'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
        Me.PrescripteursTableAdapter.Fill(Me.PharmaDataSet.Prescripteurs)

    End Sub

    'Trouver un Code Spécialité (Obligatoire pour les Prescripteurs Salariés)
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For i = 0 To tabCodeSpécialité.Length - 1
            If InStr(UCase(tabCodeSpécialité(i).signification), UCase(TextBox1.Text)) <> 0 Then
                RichTextBox1.AppendText(tabCodeSpécialité(i).signification + "-->Code:" + tabCodeSpécialité(i).valeur + Chr(10))
            End If
        Next
    End Sub
End Class