' 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 LPP

    
    Private Sub Enregistrer_Button_Click(sender As Object, e As EventArgs) Handles Enregistrer_Button.Click
        COMPTOIR_MAIN.LPPTableAdapter.Insert(CodeLPPTextBox.Text, PrixLPPTextBox.Text, DateMaxTextBox.Text, DateMinTextBox.Text, Entente_PréalableCheckBox.Checked, PrestationTextBox.Text, _
                                             Age_maximalTextBox.Text, Code_identifiant_de_prothèseTextBox.Text, Coefficients_majorations_DOMTextBox.Text, Indication_PU_sur_devisCheckBox.Checked, _
                                             Indication_médicaleCheckBox.Checked, LibelléTextBox.Text, Montant_maximalTextBox.Text, Prise_en_charge_particulièreTextBox.Text, _
                                             Prix_unitaire_réglementéTextBox.Text, Quantité_maximaleTextBox.Text, Tarif_de_référenceTextBox.Text, Mid(Type_prestationComboBox.Text, 1, 1))
        My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\import_lpp.txt", "ajout code LPP" & CodeLPPTextBox.Text & "  tarif unit " & PrixLPPTextBox.Text & vbCrLf, True)
        Me.Close()
    End Sub

    Private Sub Annuler_Button_Click(sender As Object, e As EventArgs) Handles Annuler_Button.Click

        Me.Close()
    End Sub


End Class