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

    Private Sub CodePrestationsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Validate()
        Me.CodePrestationsBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.PharmaDataSet)

    End Sub

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

    End Sub

    Private Sub CodePrestationsDataGridView_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles CodePrestationsDataGridView.CellClick
        If e.RowIndex = -1 Then
            Exit Sub
        End If
        If CodePrestationsDataGridView.Item(DataGridViewTextBoxColumn1.Index, CodePrestationsDataGridView.CurrentRow.Index).Value.ToString = "DPS" _
        Or CodePrestationsDataGridView.Item(DataGridViewTextBoxColumn1.Index, CodePrestationsDataGridView.CurrentRow.Index).Value.ToString = "SGN" Then
            Exit Sub
        End If
        COMPTOIR_MAIN.Vente.CurrentCell.Value = CodePrestationsDataGridView.Item(0, CodePrestationsDataGridView.CurrentRow.Index).Value
        Me.Dispose()
    End Sub


    Private Sub CodePrestationsDataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles CodePrestationsDataGridView.CellContentClick

    End Sub
End Class