Esempio n. 1
0
        /// <summary>
        /// Modifier un paramètre d'un module
        /// </summary>
        /// <param name="p">Le paramètre</param>
        public void modifierParametre(Parametre p)
        {
            int i = modParametres.FindIndex(x => x.parId == p.parId);

            modParametres.RemoveAt(i);
            modParametres.Insert(i, p);
        }
Esempio n. 2
0
        public static Parametre GetParametre(string id)
        {
            NpgsqlConnection conn;

            conn = new NpgsqlConnection(chaineConnection);
            conn.Open();

            string query = @"SELECT par_id, par_nom, mod_id FROM parametre where mod_id ='" + id + "'";

            Debug.WriteLine(query);

            NpgsqlCommand    command = new NpgsqlCommand(query, conn);
            NpgsqlDataReader dr      = command.ExecuteReader();

            while (dr.Read())
            {
                Parametre OneParametre = new Parametre(new Guid(dr[0].ToString()), dr[1].ToString(), 0);
                conn.Close();
                return(OneParametre);
            }
            conn.Close();
            return(null);
        }
Esempio n. 3
0
 /// <summary>
 /// Modification d'un paramètre
 /// </summary>
 /// <param name="p">Le paramètre à modifier</param>
 public static void modifierParam(Parametre p)
 {
 }
Esempio n. 4
0
 public static Boolean AjouterParametre(Parametre monParametre)
 {
     return(true);
 }