Exemplo n.º 1
0
        private void chargerFonction(FonctionElectronique fctElec)
        {
            this.labelTitre.Text       = fctElec.ToString();
            this.labelResponsable.Text = "Crédit : " + fctElec.projet.personnel.getCredit();

            this.labelDate.Text       = "Date : " + fctElec.projet.getDate();
            this.labelValidation.Text = (fctElec.validation) ? "Fonction validée !" : "Fonction non validée !";

            //voir les controle definie dans la region Controle picture box
            this.tailleImage = this.ihmM.chargerSchema(fctElec.schema, this.pictureBoxSchema);
            this.recentrerSchema();
            this.locationPictureBox();
            this.trackBarZoomSchema.Value = this.positionScrool();

            this.openSvnProjet.Tag              = fctElec.projet.lienSnvProjet;
            this.openSvnFonction.Tag            = fctElec.lienSVNTest;
            this.labelPlageTensionInput.Text    = fctElec.getPlageTensionInput();
            this.labelPlageIntensitéInput.Text  = fctElec.getPlageIntensiteInput();
            this.labelPlageTensionOutput.Text   = fctElec.getPlageTensionOutput();
            this.labelPlageIntensitéOutput.Text = fctElec.getPlageIntensiteOutput();

            this.listBoxCritere.DataSource    = fctElec.listCritere;
            this.listBoxIoPhysique.DataSource = fctElec.listIO;

            this.richTextBox1.Text = fctElec.description;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Modifier un <paramref name="fctElec"/> dans la table Fonction_Générique de la base de données.
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="fctElec">un objet FonctionGenerique</param>
        public int modifierFonction(FonctionElectronique fctElec)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "UPDATE Fonction " +
                              "SET description = '" + fctElec.description + "', "
                              + "schéma = '" + fctElec.schema + "', "
                              + "tension_entree_min = " + fctElec.tensionInputMin.ToString().Replace(",", ".") + ", "
                              + "tension_entree_max  = " + fctElec.tensionInputMax.ToString().Replace(",", ".") + ", "
                              + "intensite_entree_min  = " + fctElec.intensiteInputMin.ToString().Replace(",", ".") + ", "
                              + "intensite_entree_max  = " + fctElec.intensiteInputMax.ToString().Replace(",", ".") + ", "
                              + "tension_sortie_min = " + fctElec.tensionOutputMin.ToString().Replace(",", ".") + ", "
                              + "tension_sortie_max  = " + fctElec.tensionOutputMax.ToString().Replace(",", ".") + ", "
                              + "intensite_sortie_min  = " + fctElec.intensiteOutputMin.ToString().Replace(",", ".") + ", "
                              + "intensite_sortie_max  = " + fctElec.intensiteOutputMax.ToString().Replace(",", ".") + ", "
                              + "cout=" + fctElec.cout.ToString().Replace(",", ".") + ", "
                              + "validation=" + fctElec.validation + ", "
                              + "lien_SVN_Dossier_PV='" + fctElec.lienSVNTest + "', "
                              + "en_attente = " + fctElec.enAttente + " "
                              + "WHERE id_projet = '" + fctElec.projet.idProjet + "' and id_fonction=" + fctElec.fonction.idFonction;
            cmd.Parameters.Add(new MySqlParameter("@cout", MySqlDbType.Float, 8));
            cmd.Parameters["@cout"].Value = fctElec.cout;
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Obtenir un objet FonctionElectronique par son <paramref name="idFonction"/>
        /// </summary>
        /// <returns>
        /// Un objet FonctionElectronique
        /// </returns>
        /// <param name="idFonction">Identifiant de la fonction</param>
        public FonctionElectronique getFonctionById(int idFonction, string idprojet)
        {
            FonctionElectronique fctElect = new FonctionElectronique();
            DbCommand            cmd      = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Select * from Fonction where id_fonction=" + idFonction + " and id_projet ='" + idprojet + "";
            DataTable table = db.CreerDatatable(cmd);

            if (table.Rows.Count >= 1)
            {
                fctElect.projet      = prjManager.getProjetById((string)table.Rows[0][0]);
                fctElect.fonction    = fctGenData.getFonctionGenById((int)table.Rows[0][1]);
                fctElect.description = (string)table.Rows[0][2].ToString();
                fctElect.schema      = (string)table.Rows[0][3].ToString();

                //les données io tension et intensité
                fctElect.tensionInputMin    = float.Parse(table.Rows[0][4].ToString());
                fctElect.tensionInputMax    = float.Parse(table.Rows[0][5].ToString());
                fctElect.intensiteInputMin  = float.Parse(table.Rows[0][6].ToString());
                fctElect.intensiteInputMax  = float.Parse(table.Rows[0][7].ToString());
                fctElect.tensionOutputMin   = float.Parse(table.Rows[0][8].ToString());
                fctElect.tensionOutputMax   = float.Parse(table.Rows[0][9].ToString());
                fctElect.intensiteOutputMin = float.Parse(table.Rows[0][10].ToString());
                fctElect.intensiteOutputMax = float.Parse(table.Rows[0][11].ToString());

                fctElect.cout        = float.Parse(table.Rows[0][12].ToString());
                fctElect.validation  = (Boolean)table.Rows[0][13];
                fctElect.lienSVNTest = (string)table.Rows[0][14].ToString();
                fctElect.enAttente   = (Boolean)table.Rows[0][15];
                //fctElect.listIO = fctIoManager.getListIOAssocieeByFonction((string)table.Rows[0][0], (int)table.Rows[0][1]);
                //fctElect.listCritere = fctCritManager.getListCritAssocieeByFonction((string)table.Rows[0][0], (int)table.Rows[0][1]);
            }
            return(fctElect);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Supprimer un <paramref name="fctGen"/> dans la table Fonction_Générique de la base de données.
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="fctGen">un objet FonctionGenerique</param>
        public int supprimerFonction(FonctionElectronique fctElec)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "DELETE FROM Fonction " +
                              "WHERE id_projet ='" + fctElec.projet.idProjet + "' and id_fonction=" + fctElec.fonction.idFonction;
            return(db.ExecuterRequete(cmd));
        }
        //controler les caractères d'échappement pour l'insertion SQL
        private FonctionElectronique echappementFonction(FonctionElectronique fct)
        {
            FonctionElectronique f = new FonctionElectronique();

            f = fct;
            f.projet.idProjet = f.projet.idProjet.Replace("'", "''").Replace(@"\", "\\");

            return(f);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Supprimer tout les ioPhysique dans la table Associer_IO_Physique de la base de données pour <paramref name="fct"/>
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="fct">un objet FonctionElectronique</param>
        public int supprimerIoPhystAssocieByFonction(FonctionElectronique fct)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "DELETE FROM Associer_IO_Physique " +
                              "WHERE id_projet ='" + fct.projet.idProjet + "' and  id_fonction= " + fct.fonction.idFonction;
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 7
0
        //controler les caractères d'échappement pour l'insertion SQL
        private FonctionElectronique echappementFctElec(FonctionElectronique fctElec)
        {
            FonctionElectronique f = new FonctionElectronique();

            f = fctElec;
            f.projet.idProjet = fctElec.projet.idProjet.Replace("'", "''").Replace(@"\", "");
            f.description     = fctElec.description.Replace("'", "''").Replace(@"\", "");
            f.lienSVNTest     = fctElec.lienSVNTest.Replace("'", "''").Replace(@"\", "");
            return(f);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Ajouter un <paramref name="ioPhysAss"/> dans la table Associer_Critère de la base de données pour une  <paramref name="FonctionElectronique"/>
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="critAss">un objet IoPhysiqueAssociee</param>
        /// <param name="critAss">un objet FonctionElectronique</param>
        public int ajouterIoPhysAssocieByFonction(FonctionElectronique fct, IoPhysiqueAssociee ioPhysAss)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "INSERT INTO Associer_IO_Physique(id_projet,id_fonction, id_io_physique  , "
                              + "	quantité) "+
                              "VALUES ('" + fct.projet.idProjet
                              + "', '" + fct.fonction.idFonction + "', '"
                              + ioPhysAss.ioPhysique.idIophysique + "', '" + ioPhysAss.quantite + "')";
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 9
0
        /// <summary>
        /// Ajouter un <paramref name="critAss"/> dans la table Associer_Critère de la base de données pour une  <paramref name="FonctionElectronique"/>
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="critAss">un objet CritereAssociee</param>
        /// <param name="critAss">un objet FonctionElectronique</param>
        public int ajouterCritAssocieByFonction(FonctionElectronique fct, CritereAssociee critAss)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "INSERT INTO Associer_Critère(id_projet,id_fonction, id_critère  , "
                              + "niveau_nombre, niveau_texte) " +
                              "VALUES ('" + fct.projet.idProjet
                              + "', '" + fct.fonction.idFonction + "', '"
                              + critAss.critere.idCritere + "', '" + critAss.valeurNbr.Replace(",", ".") + "', '" + critAss.valeurTexte + "')";
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 10
0
        private void treeViewFonction_DoubleClick(object sender, EventArgs e)
        {
            object ob = null;

            if (this.treeViewFonction.SelectedNode != null)
            {
                ob = (this.treeViewFonction.SelectedNode.Tag != null) ? this.treeViewFonction.SelectedNode.Tag.GetType() : null;
            }
            if (ob != null)
            {
                this.fctPrivate = (FonctionElectronique)this.treeViewFonction.SelectedNode.Tag;
                this.chargerFonction(this.fctPrivate);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Modifier un <paramref name="ioAss"/> dans la table Associer_IO_Physique de la base de données pour <paramref name="fct"/>
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="ioAss">un objet IoPhysiqueAssociee</param>
        /// <param name="fct">un objet FonctionElectronique</param>
        public int modifierIoPhysAssocieByFonction(FonctionElectronique fct, IoPhysiqueAssociee ioAss)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "UPDATE Associer_IO_Physique " +
                              "SET "
                              + "quantité = '" + ioAss.quantite + "' "
                              + "WHERE "
                              + "id_projet = '" + fct.projet.idProjet + "' "
                              + "and id_fonction = " + fct.fonction.idFonction + " "
                              + "and id_io_physique = " + ioAss.ioPhysique.idIophysique + " ";
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 12
0
        /// <summary>
        /// Obtenir une liste d'objet FonctionElectronique par son <paramref name="f"/>
        /// </summary>
        /// <returns>
        /// Une liste d'objet FonctionElectronique
        /// </returns>
        /// <param name="f">Filtre</param>
        public List <FonctionElectronique> getListFonction(Filtre f)
        {
            List <FonctionElectronique> listFonction = new List <FonctionElectronique>();

            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "call filtrerPremier (" + f.fonction.idFonction + ", "
                              + f.tensionInMin + ", " + f.tensionInMax + ", "
                              + f.intensiteInMin + ", " + f.intensiteInMax + ", "
                              + f.tensionOutMin + ", " + f.tensionOutMax + ", "
                              + f.intensiteOutMin + ", " + f.intensiteOutMax + ", "
                              + ((f.crit[0].crit != null) ? f.crit[0].crit.idCritere : CritereRecherche.valeurParDefisNull) + ", "
                              + ((f.crit[0].signe != null) ? f.crit[0].signe.valeur : CritereRecherche.valeurParDefisNull) + ", "
                              + f.crit[0].valeur + " ) ";



            DataTable table = db.CreerDatatable(cmd);

            foreach (DataRow row in table.Rows)
            {
                FonctionElectronique fctElect = new FonctionElectronique();

                fctElect.projet      = prjManager.getProjetById((string)row[0]);
                fctElect.fonction    = fctGenData.getFonctionGenById((int)row[1]);
                fctElect.description = (string)row[2].ToString();
                fctElect.schema      = (string)row[3].ToString();
                //les données io tension et intensité
                fctElect.tensionInputMin    = float.Parse(row[4].ToString());
                fctElect.tensionInputMax    = float.Parse(row[5].ToString());
                fctElect.intensiteInputMin  = float.Parse(row[6].ToString());
                fctElect.intensiteInputMax  = float.Parse(row[7].ToString());
                fctElect.tensionOutputMin   = float.Parse(row[8].ToString());
                fctElect.tensionOutputMax   = float.Parse(row[9].ToString());
                fctElect.intensiteOutputMin = float.Parse(row[10].ToString());
                fctElect.intensiteOutputMax = float.Parse(row[11].ToString());

                fctElect.cout        = float.Parse(row[12].ToString());
                fctElect.validation  = (Boolean)row[13];
                fctElect.lienSVNTest = (string)row[14].ToString();
                fctElect.enAttente   = (Boolean)row[15];
                fctElect.taux        = float.Parse(row[16].ToString());
                fctElect.listIO      = ioPhysAssData.getListIoAssocieeByFonction(fctElect);
                fctElect.listCritere = critAssData.getListCritAssocieeByFonction(fctElect);
                listFonction.Add(fctElect);
            }
            return(listFonction);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Modifier un <paramref name="critAss"/> dans la table Associer_Critère de la base de données pour <paramref name="fct"/>
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="critAss">un objet CritereAssociee</param>
        /// <param name="fct">un objet FonctionElectronique</param>
        public int modifierCritAssocieByFonction(FonctionElectronique fct, CritereAssociee critAss)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "UPDATE Associer_Critère " +
                              "SET "
                              + "niveau_nombre = '" + critAss.valeurNbr.Replace(",", ".") + "', "
                              + "niveau_texte = '" + critAss.valeurTexte + "' "
                              + "WHERE "
                              + "id_projet = '" + fct.projet.idProjet + "' "
                              + "and id_fonction = " + fct.fonction.idFonction + " "
                              + "and id_critère = " + critAss.critere.idCritere + " ";
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 14
0
        /// <summary>
        /// Obtenir une liste d'objet IoPhysiqueAssociee pour <paramref name="fct"/>
        /// </summary>
        /// <returns>
        /// Une liste d'objet IoPhysiqueAssociee
        /// </returns>
        /// <param name="fct">un objet FonctionElectronique</param>
        public List <IoPhysiqueAssociee> getListIoAssocieeByFonction(FonctionElectronique fct)
        {
            List <IoPhysiqueAssociee> listIotAss = new List <IoPhysiqueAssociee>();

            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Select * from Associer_IO_Physique where " +
                              "id_projet='" + fct.projet.idProjet + "' and  id_fonction='"
                              + fct.fonction.idFonction + "'";
            DataTable table = db.CreerDatatable(cmd);

            foreach (DataRow row in table.Rows)
            {
                IoPhysiqueAssociee ioAss = new IoPhysiqueAssociee();
                ioAss.ioPhysique = iopgd.getIoGenById((int)row[2]);
                ioAss.quantite   = (int)row[3];
                listIotAss.Add(ioAss);
            }
            return(listIotAss);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Obtenir une liste d'objet CritereAssociee pour <paramref name="fct"/>
        /// </summary>
        /// <returns>
        /// Une liste d'objet CritereAssociee
        /// </returns>
        /// <param name="fct">un objet FonctionElectronique</param>
        public List <CritereAssociee> getListCritAssocieeByFonction(FonctionElectronique fct)
        {
            List <CritereAssociee> listCritAss = new List <CritereAssociee>();

            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Select * from Associer_Critère where " +
                              "id_projet='" + fct.projet.idProjet + "' and  id_fonction='" + fct.fonction.idFonction + "'";
            DataTable table = db.CreerDatatable(cmd);

            foreach (DataRow row in table.Rows)
            {
                CritereAssociee critAss = new CritereAssociee();
                critAss.critere     = cgd.getCritGenById((int)row[2]);
                critAss.valeurNbr   = row[3].ToString();
                critAss.valeurTexte = (string)row[4].ToString();
                listCritAss.Add(critAss);
            }
            return(listCritAss);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Obtenir une liste d'objet FonctionElectronique avec une close where
        /// </summary>
        /// <returns>
        /// Une liste d'objet FonctionElectronique
        /// </returns>
        public List <FonctionElectronique> getListFonction(string closeWhere)
        {
            List <FonctionElectronique> listFonction = new List <FonctionElectronique>();

            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Select * from Fonction where " + closeWhere;
            DataTable table = db.CreerDatatable(cmd);

            foreach (DataRow row in table.Rows)
            {
                FonctionElectronique fctElect = new FonctionElectronique();

                fctElect.projet      = prjManager.getProjetById((string)row[0]);
                fctElect.fonction    = fctGenData.getFonctionGenById((int)row[1]);
                fctElect.description = (string)row[2].ToString();
                fctElect.schema      = (string)row[3].ToString();

                //les données io tension et intensité
                fctElect.tensionInputMin    = float.Parse(row[4].ToString());
                fctElect.tensionInputMax    = float.Parse(row[5].ToString());
                fctElect.intensiteInputMin  = float.Parse(row[6].ToString());
                fctElect.intensiteInputMax  = float.Parse(row[7].ToString());
                fctElect.tensionOutputMin   = float.Parse(row[8].ToString());
                fctElect.tensionOutputMax   = float.Parse(row[9].ToString());
                fctElect.intensiteOutputMin = float.Parse(row[10].ToString());
                fctElect.intensiteOutputMax = float.Parse(row[11].ToString());

                fctElect.cout        = float.Parse(row[12].ToString());
                fctElect.validation  = (Boolean)row[13];
                fctElect.lienSVNTest = (string)row[14].ToString();
                fctElect.enAttente   = (Boolean)row[15];
                //fctElect.listIO = fctIoManager.getListIOAssocieeByFonction((string)row[0], (int)row[1]);
                //fctElect.listCritere = fctCritManager.getListCritAssocieeByFonction((string)row[0], (int)row[1]);
                listFonction.Add(fctElect);
            }

            return(listFonction);
        }
Exemplo n.º 17
0
        //private IoAssocieeManager fctIoManager = new IoAssocieeManager();
        //private CritereAssocieManager fctCritManager = new CritereAssocieManager();


        /// <summary>
        /// Ajouter un <paramref name="fctElec"/> dans la table Fonction de la base de données.
        /// </summary>
        /// <returns>
        /// Nombre de lignes affectées
        /// </returns>
        /// <param name="fctElec">un objet FonctionElectronique</param>
        public int ajouterFonction(FonctionElectronique fctElec)
        {
            DbCommand cmd = db.CreerCommande();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "INSERT INTO Fonction "
                              + "(id_projet, "
                              + "id_fonction , "
                              + "description , "
                              + "schéma , "
                              + "tension_entree_min , "
                              + "tension_entree_max , "
                              + "intensite_entree_min , "
                              + "intensite_entree_max , "
                              + "tension_sortie_min , "
                              + "tension_sortie_max , "
                              + "intensite_sortie_min , "
                              + "intensite_sortie_max , "
                              + "cout , "
                              + "validation , "
                              + "lien_SVN_Dossier_PV ) "
                              + "VALUES ('" + fctElec.projet.idProjet + "', '"
                              + fctElec.fonction.idFonction + "', '"
                              + fctElec.description + "', '"
                              + fctElec.schema + "', "
                              + fctElec.tensionInputMin.ToString().Replace(",", ".") + ", "
                              + fctElec.tensionInputMax.ToString().Replace(",", ".") + ", "
                              + fctElec.intensiteInputMin.ToString().Replace(",", ".") + ", "
                              + fctElec.intensiteInputMax.ToString().Replace(",", ".") + ", "
                              + fctElec.tensionOutputMin.ToString().Replace(",", ".") + ", "
                              + fctElec.tensionOutputMax.ToString().Replace(",", ".") + ", "
                              + fctElec.intensiteOutputMin.ToString().Replace(",", ".") + ", "
                              + fctElec.intensiteOutputMax.ToString().Replace(",", ".") + ", "
                              + fctElec.cout.ToString().Replace(",", ".") + ", "
                              + fctElec.validation + ", '"
                              + fctElec.lienSVNTest + "')";
            return(db.ExecuterRequete(cmd));
        }
Exemplo n.º 18
0
 /// <summary>
 /// Supprimer un <paramref name="fctGen"/> dans la table Fonction_Générique de la base de données.
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="fctGen">un objet FonctionGenerique</param>
 public int supprimerFonction(FonctionElectronique fctElec)
 {
     return(fctd.supprimerFonction(this.echappementFctElec(fctElec)));
 }
Exemplo n.º 19
0
        private void initialiserDonnees(state e)
        {
            ihmM.raffraichirCombobox(IhmManager.metier.Projet, comboBoxProjet);
            ihmM.raffraichirCombobox(IhmManager.metier.FonctionGen, comboBoxRubrique, comboBoxFonction);
            IhmManager.projetSelect = (Projet)comboBoxProjet.SelectedValue;
            this.fctElectronique    = new FonctionElectronique();

            switch (e)
            {
            case FenCrudFctElect.state.ajouter:

                this.fctElectronique.enAttente = true;
                this.comboBoxProjet.Enabled    = true;
                this.comboBoxRubrique.Enabled  = true;
                this.comboBoxFonction.Enabled  = true;
                this.buttonValider.Visible     = false;

                this.addProjet.Enabled    = true;
                this.updateProjet.Enabled = true;
                this.deleteProjet.Enabled = true;

                this.addFonction.Enabled    = true;
                this.updateFonction.Enabled = true;
                this.deleteFonction.Enabled = true;

                this.pictureBox1.Image = null;

                this.textBoxLienSvnTest.Text = IhmManager.projetSelect.lienSnvProjet;

                this.supprimerLaFonctionToolStripMenuItem.Enabled = false;

                break;

            case FenCrudFctElect.state.modifier:

                this.fctElectronique             = IhmManager.fctElectSelect;
                this.fctElectronique.listCritere = this.critAssocieManager.getListCritAssocieeByFonction(IhmManager.fctElectSelect).ToList();
                this.fctElectronique.listIO      = this.ioPhysAssocieManager.getListIoAssocieeByFonction(IhmManager.fctElectSelect).ToList();

                this.comboBoxProjet.Text      = IhmManager.fctElectSelect.projet.ToString();
                this.comboBoxProjet.Enabled   = false;
                this.comboBoxRubrique.Text    = IhmManager.fctElectSelect.fonction.rubrique;
                this.comboBoxRubrique.Enabled = false;
                this.comboBoxFonction.Text    = IhmManager.fctElectSelect.fonction.designation;
                this.comboBoxFonction.Enabled = false;

                this.ihmM.chargerSchema(this.fctElectronique.schema, pictureBox1);

                this.buttonValider.Visible = true;

                this.addProjet.Enabled    = false;
                this.updateProjet.Enabled = false;
                this.deleteProjet.Enabled = false;

                this.addFonction.Enabled    = false;
                this.updateFonction.Enabled = false;
                this.deleteFonction.Enabled = false;

                this.textBoxLienSvnTest.Text = this.fctElectronique.lienSVNTest;

                this.supprimerLaFonctionToolStripMenuItem.Enabled = true;
                break;

            default:
                break;
            }

            this.radioButtonTestOui.Checked = (this.fctElectronique.validation) ? true : false;
            this.radioButtonTestNon.Checked = (!this.fctElectronique.validation) ? true : false;

            this.comportementButtonValider();

            //charger les io tension intensité dans les tb
            this.textBox3.Text  = this.fctElectronique.tensionInputMin.ToString();
            this.textBox4.Text  = this.fctElectronique.tensionInputMax.ToString();
            this.textBox5.Text  = this.fctElectronique.intensiteInputMin.ToString();
            this.textBox6.Text  = this.fctElectronique.intensiteInputMax.ToString();
            this.textBox7.Text  = this.fctElectronique.tensionOutputMin.ToString();
            this.textBox8.Text  = this.fctElectronique.tensionOutputMax.ToString();
            this.textBox9.Text  = this.fctElectronique.intensiteOutputMin.ToString();
            this.textBox10.Text = this.fctElectronique.intensiteOutputMax.ToString();

            this.textBoxCout.Text            = this.fctElectronique.cout.ToString();
            this.richTextBoxDescription.Text = this.fctElectronique.description;
            this.listBoxCrit.DataSource      = this.fctElectronique.listCritere;
            this.listBoxIo.DataSource        = this.fctElectronique.listIO;
        }
Exemplo n.º 20
0
 public List <CritereAssociee> getListCritAssocieeByFonction(FonctionElectronique fct)
 {
     return(cad.getListCritAssocieeByFonction(this.echappementFonction(fct)));
 }
Exemplo n.º 21
0
 /// <summary>
 /// Modifier un <paramref name="critAss"/> dans la table Associer_Critère de la base de données pour <paramref name="FonctionElectronique"/>
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="critAss">un objet CritereAssociee</param>
 /// <param name="critAss">un objet FonctionElectronique</param>
 public int modifierCritAssocieByFonction(FonctionElectronique fct, CritereAssociee critAss)
 {
     return(cad.modifierCritAssocieByFonction(this.echappementFonction(fct), this.echappementCritAss(critAss)));
 }
Exemplo n.º 22
0
 /// <summary>
 /// Supprimer toutes le critères dans la table Associer_Critère de la base de données pour <paramref name="fct"/>
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="fct">un objet FonctionElectronique</param>
 public int supprimerCritAssocieByFonction(FonctionElectronique fct)
 {
     return(cad.supprimerCritAssocieByFonction(this.echappementFonction(fct)));;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Obtenir une liste d'objet IoPhysiqueAssociee pour <paramref name="fct"/>
 /// </summary>
 /// <returns>
 /// Une liste d'objet IoPhysiqueAssociee
 /// </returns>
 /// <param name="fct">un objet FonctionElectronique</param>
 public List <IoPhysiqueAssociee> getListIoAssocieeByFonction(FonctionElectronique fct)
 {
     return(iopad.getListIoAssocieeByFonction(this.echappementFonction(fct)));;
 }
Exemplo n.º 24
0
 /// <summary>
 /// Modifier un <paramref name="fctElec"/> dans la table Fonction_Générique de la base de données.
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="fctElec">un objet FonctionGenerique</param>
 public int modifierFonction(FonctionElectronique fctElec)
 {
     return(fctd.modifierFonction(this.echappementFctElec(fctElec)));
 }
Exemplo n.º 25
0
 /// <summary>
 /// Ajouter un <paramref name="fctElec"/> dans la table Fonction de la base de données.
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="fctElec">un objet FonctionElectronique</param>
 public int ajouterFonction(FonctionElectronique fctElec)
 {
     return(fctd.ajouterFonction(this.echappementFctElec(fctElec)));
 }
Exemplo n.º 26
0
 /// <summary>
 /// Modifier un <paramref name="ioAss"/> dans la table Associer_IO_Physique de la base de données pour <paramref name="fct"/>
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="ioAss">un objet IoPhysiqueAssociee</param>
 /// <param name="fct">un objet FonctionElectronique</param>
 public int modifierIoPhysAssocieByFonction(FonctionElectronique fct, IoPhysiqueAssociee ioAss)
 {
     return(iopad.modifierIoPhysAssocieByFonction(this.echappementFonction(fct), ioAss));
 }
Exemplo n.º 27
0
 /// <summary>
 /// Supprimer tout les ioPhysique dans la table Associer_IO_Physique de la base de données pour <paramref name="fct"/>
 /// </summary>
 /// <returns>
 /// Nombre de lignes affectées
 /// </returns>
 /// <param name="fct">un objet FonctionElectronique</param>
 public int supprimerIoPhystAssocieByFonction(FonctionElectronique fct)
 {
     return(iopad.supprimerIoPhystAssocieByFonction(this.echappementFonction(fct)));
 }