private void GenererLicence_Click(object sender, EventArgs e)
        {
            if (ProgramManager.DetecteurErreurSaisieNewClient(NomClient, CodeClient, CodePostale, Adresse1) == true)
            {
                FixRadioGroup();
                string licences = GetLicences.GetSeriale(NomClient, CodeClient, CodePostale, Adresse1, GropLicences);
                ImputLicences.Text     = licences;
                DateDebutLicenece.Text = DateTime.Today.ToString("dd-MM-yyyy");
                DateFin.Text           = Convert.ToDateTime(LicenceDelaisManager.FinLicence(DateTime.Today, LicenceDelaisManager.LicenceLength(GropLicences.Properties.Items[GropLicences.SelectedIndex].Description))).ToString("dd-MM-yyyy");
                NombreDeJour.Text      = LicenceDelaisManager.LicenceLength(GropLicences.Properties.Items[GropLicences.SelectedIndex].Description).ToString();
                ProgramManager.InserstionData(CmdLicenceLoad.UpdateDataClient(NomClient, CodeClient, CodePostale, VilleClient, Adresse1, Adresse2, GropLicences));

                ProgramManager.InserstionData(CmdLicenceLoad.LoadDataToDataBase(DateDebutLicenece.Text, DateFin.Text, ImputLicences.Text, NombreDeJour.Text, CodeClient.Text, GropLicences.Properties.Items[GropLicences.SelectedIndex].Description));
                AlimenterGrid.FillDataGridView <Client>(GcLicence, ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient()), ProgramManager.Chargement(ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient())));
                FindInGridControl(CodeClient.Text);
                NomClient.ResetText(); CodeClient.ResetText(); CodePostale.ResetText();
                VilleClient.ResetText(); Adresse1.ResetText(); Adresse2.ResetText();
                DateDebutLicenece.ResetText(); DateFin.ResetText();
                ImputLicences.ResetText(); NombreDeJour.ResetText();
                MsgBox.Show(this, MessagesSystem.ModifSaved);
            }
            else
            {
                MsgBox.Show(this, MessagesSystem.ErreurAjoutClientExpress);
            }
        }
        private void FrmAcceuil_Shown(object sender, EventArgs e)
        {
            ImageList il = new ImageList();

            il.Images.Add(Properties.Resources.Licence1);
            il.Images.Add(Properties.Resources.Licence2);
            il.Images.Add(Properties.Resources.Licence3);
            LicImageCombo.SmallImages = il;
            LicImageCombo.Items.Add("Licence1", "Licence1", 0);
            LicImageCombo.Items.Add("Licence2", "Licence2", 1);
            LicImageCombo.Items.Add("Licence3", "Licence3", 2);
            AlimenterGrid.FillDataGridView <Client>(GcLicence, ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient()), ProgramManager.Chargement(ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient())));
        }
 private void Sauvgarder_Click(object sender, EventArgs e)
 {
     try
     {
         ProgramManager.InserstionData(CmdLicenceLoad.LoadDataToDataBase(DateDebutLicenece.Text, DateFin.Text, ImputLicences.Text, NombreDeJour.Text, CodeClient.Text, GropLicences.Properties.Items[GropLicences.SelectedIndex].Description));
         AlimenterGrid.FillDataGridView <Client>(GcLicence, ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient()), ProgramManager.Chargement(ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient())));
         MsgBox.Show(this, MessagesSystem.LoadDataSucced + NomClient.Text);
         if (ImputLicences.Text == MessagesSystem.StringVide)
         {
             MsgBox.Show(this, MessagesSystem.StringVide);
         }
     }
     catch (Exception ex)
     {
         MsgBox.Show(this, ex.Message);
     }
 }
 private void BoutonDetails_Click(object sender, EventArgs e)
 {
     try
     {
         if (IsLicenced)
         {
             if (CodeClient.Text != String.Empty)
             {
                 FrmDetails Details = new FrmDetails();
                 Details.ShowInTaskbar = false;
                 Details.ClientCode    = CodeClient.Text;
                 if (Details.ClientCode != "")
                 {
                     Details.Dialog = true;
                     Details.ShowDialog();
                     Details.ClientCode = "";
                     AlimenterGrid.FillDataGridView <Client>(GcLicence, ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient()), ProgramManager.Chargement(ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient())));
                     FindInGridControl(CodeClient.Text);
                     NomClient.ResetText(); CodeClient.ResetText(); CodePostale.ResetText();
                     VilleClient.ResetText(); Adresse1.ResetText(); Adresse2.ResetText();
                 }
                 else
                 {
                     CodeClient.BackColor = Color.Red;
                     Details.Dispose();
                     return;
                 }
             }
             else
             {
                 MsgBox.Show(this, MessagesSystem.ErreurAjoutClientExpress);
                 CodeClient.BackColor = Color.Red;
             }
         }
         else
         {
             MsgBox.Show(this, "User Not Licenced !!!");
             return;
         }
     }
     catch (Exception ex)
     {
         MsgBox.Show(this, ex.Message);
     }
 }
 private void ButtonAjout_Click(object sender, EventArgs e)
 {
     try
     {
         if (ProgramManager.DetecteurErreurSaisieNewClient(NomClient, CodeClient, CodePostale, Adresse1) == true)
         {
             ProgramManager.InsertClientRapide(CmdClient.RequetAjoutClientRapide(CodeClient.Text, Adresse1.Text, Adresse2.Text, CodePostale.Text, VilleClient.Text, NomClient.Text));
             AlimenterGrid.FillDataGridView <Client>(GcLicence, ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient()), ProgramManager.Chargement(ProgramManager.Chargementreader(CmdClient.RequetteCaracteristiqueClient())));
             MsgBox.Show(this, MessagesSystem.ClientAddSuccecful);
         }
         else
         {
             MsgBox.Show(this, MessagesSystem.ErreurAjoutClientExpress);
         }
     }
     catch (Exception EX)
     {
         MsgBox.Show(this, EX.Message);
     }
 }