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

    Private Sub Choix_AMC_Data_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        LinkLabel_CV.Text = "1) Carte Vitale: "
        If CurrentBenéficiaire.G107C1 <> "" Then
            LinkLabel_CV.Text = LinkLabel_CV.Text & COMPTOIR_MAIN.AmC_OrganismesTableAdapter1.Select_Intitulé(CurrentBenéficiaire.G107C1) & " " & CurrentBenéficiaire.G107C1
        ElseIf CurrentBenéficiaire.G109C1 <> "" Then
            LinkLabel_CV.Text = LinkLabel_CV.Text & COMPTOIR_MAIN.AmC_OrganismesTableAdapter1.Select_Intitulé(CurrentBenéficiaire.G109C1) & " " & CurrentBenéficiaire.G109C1
        End If

        LinkLabel_BaseLocale.Text = "2) base locale: "
        If CurrentBenéficiaire.AMC_NumMutuelle <> "" Then
            LinkLabel_BaseLocale.Text = LinkLabel_BaseLocale.Text & COMPTOIR_MAIN.AmC_OrganismesTableAdapter1.Select_Intitulé(CurrentBenéficiaire.AMC_NumMutuelle) & " " & CurrentBenéficiaire.AMC_NumMutuelle
        ElseIf CurrentBenéficiaire.AMC_NumOrganisme <> "" Then
            LinkLabel_BaseLocale.Text = LinkLabel_BaseLocale.Text & COMPTOIR_MAIN.AmC_OrganismesTableAdapter1.Select_Intitulé(CurrentBenéficiaire.AMC_NumOrganisme) & " " & CurrentBenéficiaire.AMC_NumOrganisme
        End If

    End Sub

    Private Sub LinkLabel_BaseLocale_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel_BaseLocale.Click
        COMPTOIR_MAIN.AMC_Piècejustificative_ComboBox.SelectedIndex = 0
        Me.DialogResult = Windows.Forms.DialogResult.Yes
        Me.Close()
    End Sub

    Private Sub LinkLabel_CV_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel_CV.Click
        Me.DialogResult = Windows.Forms.DialogResult.No
        Me.Close()
    End Sub


    Private Sub Choix_AMC_Data_Shown(sender As Object, e As EventArgs) Handles Me.Shown
        If jeux_d_essai_CAS_STANDARD.Visible = True Then
            LinkLabel_CV_Click(Nothing, Nothing)
        End If
    End Sub


    Private Sub LinkLabel_CV_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel_CV.LinkClicked

    End Sub

    Private Sub LinkLabel_CV_MouseEnter(sender As Object, e As EventArgs) Handles LinkLabel_CV.MouseEnter
        LinkLabel_CV.LinkColor = Color.White

    End Sub

    Private Sub LinkLabel_CV_MouseLeave(sender As Object, e As EventArgs) Handles LinkLabel_CV.MouseLeave
        LinkLabel_CV.LinkColor = Color.FromArgb(224, 224, 224)
    End Sub
    Private Sub LinkLabel_BaseLocale_MouseEnter(sender As Object, e As EventArgs) Handles LinkLabel_BaseLocale.MouseEnter
        LinkLabel_BaseLocale.LinkColor = Color.White

    End Sub

    Private Sub LinkLabel_BaseLocale_MouseLeave(sender As Object, e As EventArgs) Handles LinkLabel_BaseLocale.MouseLeave
        LinkLabel_BaseLocale.LinkColor = Color.FromArgb(224, 224, 224)
    End Sub

End Class