Example #1
0
 /// <summary>
 ///
 /// </summary>
 public override void Reload()
 {
     this.Controls.Clear();
     InitializeComponent();
     showManagementForm = new ShowEntityManagementForm(new BaseBAO <BaseEntity>(), this);
     new ConfigMenuApplication(new BaseBAO <MenuItemApplication>(), this);
 }
        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);
            }
        }
Example #3
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);
        }
Example #4
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);
                }
            }
        }
Example #5
0
 public FormMenu()
 {
     InitializeComponent();
     AfficherFormulaire = new ShowEntityManagementForm(this);
 }