Ejemplo n.º 1
0
        /// <summary>
        /// Afficher une gestion avec une formulaire spécifique
        /// </summary>
        /// <typeparam name="T">L'objet à gérer</typeparam>
        /// <param name="formulaire">Le Formulaire spécifique</param>
        public EntityManagementForm AfficherUneGestion <T>(BaseEntryForm formulaire) where T : BaseEntity
        {
            EntityManagementForm form = new EntityManagementForm(formulaire.Service, formulaire, null, this.FormApplicationMdi);

            this.Afficher(form);
            return(form);
        }
Ejemplo n.º 2
0
        private void gestionDesModulesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            EntityManagementForm form = new EntityManagementForm(
                new BaseRepository <Module>(), null, null, this);

            AfficherFormulaire.Afficher(form);
        }
Ejemplo n.º 3
0
        public EntityManagementForm AfficherUneGestion(Type TypeEntity)
        {
            IBaseRepository baseRepository = this.Service
                                             .CreateInstance_Of_Service_From_TypeEntity(TypeEntity);

            EntityManagementForm form = new EntityManagementForm(baseRepository, null, null, this.FormApplicationMdi);

            this.Afficher(form);
            return(form);
        }
        public void bt_Ajouter_Click_Test()
        {
            Form form = new Form();

            form.IsMdiContainer = true;

            // Tester tous les bouttons ajouter
            using (ModelContext db = new ModelContext())
            {
                ShowEntityManagementForm AfficherFormulaire = new ShowEntityManagementForm(form);
                EntityManagementForm     emform             = AfficherFormulaire
                                                              .AfficherUneGestion <Stagiaire>(new StagiaireEntryForm(new BaseRepository <Stagiaire>()));
                emform.EntityManagementControl.bt_Ajouter_Click(new Button(), null);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Editer la collection ManyToOne
        /// </summary>
        /// <param name="item">PropertyInfo de de la collection</param>
        /// <param name="obj">L'objet qui contient la collection</param>
        protected void EditerCollection(PropertyInfo item, BaseEntity obj)
        {
            // Obient le Service de l'objet de Collection<Objet>
            Type            type_objet_of_collection    = item.PropertyType.GetGenericArguments()[0];
            IBaseRepository service_objet_of_collection = this.Service.CreateInstance_Of_Service_From_TypeEntity(type_objet_of_collection);

            // Valeur Initial du Filtre
            Dictionary <string, object> ValeursFiltre = new Dictionary <string, object>();

            ValeursFiltre[item.DeclaringType.Name] = obj.Id;
            EntityManagementForm form = new EntityManagementForm(service_objet_of_collection, null, ValeursFiltre, this.MdiParent);

            // Affichage de Fomulaire de gestion de la collection ManytoOne
            ShowEntityManagementForm Menu = new ShowEntityManagementForm((Form)this.MdiParent);

            Menu.Afficher(form);
        }
Ejemplo n.º 6
0
        public void Editer_Click()
        {
            Form form = new Form();

            form.IsMdiContainer = true;

            // Tester tous les bouttons ajouter
            using (ModelContext db = new ModelContext())
            {
                foreach (var item in db.GetTypesSets())
                {
                    ShowEntityManagementForm AfficherFormulaire = new ShowEntityManagementForm(form);
                    EntityManagementForm     emform             = AfficherFormulaire.AfficherUneGestion(item);
                    emform.EntityManagementControl.bt_Ajouter_Click(new Button(), null);
                }
            }
        }
Ejemplo n.º 7
0
        public void AfficherUneGestion <T>(IBaseRepository Service, BaseEntryForm formulaire) where T : BaseEntity
        {
            EntityManagementForm form = new EntityManagementForm(Service, formulaire, null, this.FormApplicationMdi);

            this.Afficher(form);
        }