コード例 #1
0
        public InformationLibre(Model.Sage.cbSysLibre SageInformationLibre, ObservableCollection <InformationLibreValeursMode> ListInformationLibreMode, ObservableCollection <Model.Prestashop.PsFeatureLang> ListCharacteristic)
        {
            SageInfoLibre = SageInformationLibre;
            Model.Local.InformationLibreRepository InformationLibreRepository = new Local.InformationLibreRepository();
            InfoLibre = new Local.InformationLibre();
            if (InformationLibreRepository.ExistInfoLibre(SageInfoLibre.CB_Name))
            {
                InfoLibre = InformationLibreRepository.ReadInfoLibre(SageInfoLibre.CB_Name);
            }
            else
            {
                InfoLibre.Sag_InfoLibre = SageInfoLibre.CB_Name;
            }

            InfoValeursMode = ListInformationLibreMode.FirstOrDefault(i => i.Marq == InfoLibre.Inf_Mode);

            if (InfoLibre.Cha_Id != 0 && ListCharacteristic.Count(c => c.IDFeature == InfoLibre.Cha_Id) == 1)
            {
                Feature = ListCharacteristic.FirstOrDefault(c => c.IDFeature == InfoLibre.Cha_Id);
            }
            else
            {
                CanCreateFeature = (!new Model.Prestashop.PsFeatureLangRepository().ExistSageInformationLibre(SageInfoLibre.CB_Name)) ? true : false;
            }
        }
コード例 #2
0
        public InformationLibreArticle(Model.Sage.cbSysLibre SageInformationLibre, ObservableCollection <InformationLibreValeursMode> ListInformationLibreMode)
        {
            SageInfoLibre = SageInformationLibre;
            Model.Local.InformationLibreArticleRepository InformationLibreArticleRepository = new Local.InformationLibreArticleRepository();
            InfoLibreArticle = new Local.InformationLibreArticle();
            if (InformationLibreArticleRepository.ExistInfoLibre(SageInfoLibre.CB_Name))
            {
                InfoLibreArticle = InformationLibreArticleRepository.ReadInfoLibre(SageInfoLibre.CB_Name);
            }
            else
            {
                InfoLibreArticle.Sag_InfoLibreArticle = SageInfoLibre.CB_Name;
            }

            if (InfoLibreArticle.Inf_Catalogue == 2)
            {
                Action = "Création des catalogues enfant pour le catalogue de niveau 1 \"" + InfoLibreArticle.Inf_Parent + "\" déjà existant";
            }
            else if (InfoLibreArticle.Inf_Catalogue == 3)
            {
                Action = "Création des catalogues de niveau 3 enfant des catalogues définis par l'information libre \"" + InfoLibreArticle.Inf_Parent + "\"";
            }
        }