10.07.2015 Views

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

internal static DataTable Data{get{return table;}}public static SUP GetSUP(string name){DataRow row = Data.Rows.Find(name);if (row == null) return null;return new SUP(row);}public static void Initialize(DataSet dataSet, SqlConnectionconnection){SUPNo<strong>de</strong>.Initialize(dataSet, connection);adapter = DataUtilities.InitializeTable(dataSet,connection, TABLE_NAME);table = dataSet.Tables[TABLE_NAME];// Create relationToNo<strong><strong>de</strong>s</strong> = table.DataSet.Relations.Add("SUP_To_SUPNo<strong><strong>de</strong>s</strong>",table.Columns[SUP_NAME],SUPNo<strong>de</strong>.Data.Columns[SUPNo<strong>de</strong>.SUP],false);}public static void Update(){SUPNo<strong>de</strong>.Update();adapter.Update(Data);}//************ NON-STATIC PART *************private string _name;/// /// Wraps already existing data as a SUP object./// /// private SUP(DataRow row) : this((string)row[SUP_NAME]) {}private SUP(string name){_name = name;}public string Name{get{return _name;}}private DataRow Row{MSc EMOOSE Thesis – http://www.emn.fr/EMOOSE 124

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!