Example #1
0
        public void InitComboBoxRattachementEntEtab(List <ReferentielBLL> TableReferentiel)
        {
            ReferentielBLL        RefObject = new ReferentielBLL();
            List <ReferentielBLL> TableReferentielEntreprise = new List <ReferentielBLL>();

            TableReferentielEntreprise = RefObject.FiltrerListeReferentiel_parCPL(TableReferentiel, "3|0|0|CTRL");
            //myformrattachement.comboBox_entreprise_existante.DataSource = new BindingSource(TableReferentielEntreprise, null);
            myformrattachement.comboBox_entreprise_existante.DisplayMember = "Lib";
            myformrattachement.comboBox_entreprise_existante.ValueMember   = "Code";
            //myform.progressBar_admin.Value++;
            myformrattachement.comboBox_entreprise_existante.DropDownStyle = ComboBoxStyle.DropDownList;

            List <ComboBox_EntrepriseBLL> comboBox_EntrepriseBLLs = new List <ComboBox_EntrepriseBLL>();


            for (int i = 0; i < TableReferentielEntreprise.Count; i++)
            {
                ComboBox_EntrepriseBLL comboBox_EntrepriseBLL = new ComboBox_EntrepriseBLL();
                comboBox_EntrepriseBLL.Code = "";
                comboBox_EntrepriseBLL.Lib  = "";
                comboBox_EntrepriseBLL.Code = TableReferentielEntreprise[i].Code;
                comboBox_EntrepriseBLL.Lib  = TableReferentielEntreprise[i].Lib;
                comboBox_EntrepriseBLLs.Add(comboBox_EntrepriseBLL);
                myformrattachement.comboBox_entreprise_existante.Items.Add(comboBox_EntrepriseBLL);
            }

            // myformrattachement.comboBox_entreprise_existante.SelectedIndex = 0;
        }
        public void InitALLLevenshtein(List <CorrespondanceBLL> TableCorrespondance, List <ReferentielBLL> TableReferentiel, List <ComboBoxFiltreBLL> ListeModule)
        {
            CorrespondanceBLL     CorrObject = new CorrespondanceBLL();
            ReferentielBLL        RefObject  = new ReferentielBLL();
            List <LevenshteinBLL> ListeCompleteDesLevenshtein = new List <LevenshteinBLL>();

            for (int i = 0; i < ListeModule.Count; i++)
            {
                //Console.WriteLine("Module : " + ListeModule[i].ToString());
                List <CorrespondanceBLL> TableCorrespondanceFiltre = new List <CorrespondanceBLL>();
                List <ReferentielBLL>    TableReferentielFiltre    = new List <ReferentielBLL>();
                List <ReferentielBLL>    TableRefLevenshtein       = new List <ReferentielBLL>();
                TableCorrespondanceFiltre = CorrObject.FiltrerListeCorrespondance_parCPL(TableCorrespondance, ListeModule[i].Cpl);
                TableReferentielFiltre    = RefObject.FiltrerListeReferentiel_parCPL(TableReferentiel, ListeModule[i].Cpl);
                for (int j = 0; j < TableCorrespondance.Count; j++)
                {
                    TableRefLevenshtein = RefObject.TrierListeParLevenshtein(TableReferentielFiltre, TableCorrespondance[j].Libelle_Ancien_Code);
                    InsertLevenshteinByTableRef_Corresp(ref ListeCompleteDesLevenshtein, TableReferentielFiltre, TableCorrespondance[i]);
                }
            }
        }