Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet, DataTable, DataView
Message
De
29/07/2004 16:30:00
 
 
À
29/07/2004 16:23:35
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00928619
Message ID:
00929341
Vues:
17
There ya go ... =)

~~Bonnie

>Thanks (slaps forehead repeatedly). Blame it on rapid typing and an empty stomach.
>
>So in this case, it's not necessary to instantiate the object with a new()...
>
>Once more, with feeling...
>
>
>1) the class
>
>using System;
>using System.Data;
>
>public class MyLocalData
>{
>	private static DataTable _DtCustomers;
>	public static DataTable DtCustomers
>	{
>		get {return _DtCustomers ;}
>		set {_DtCustomers = value;}
>	}
>
>       // if you need to utilize a binding manager, or other data, you could add it here
>}
>
>
>2) first form
>
>MyLocalData.DtCustomers = oBusinessLayer.RetrieveCustomers();
>DataRow Dr = MyLocalData.DtCustomers.NewRow();
>Dr["FirstName"] = "JOHN";
>MyLocalData.DtCustomers.Rows.Add(Dr);
>
>
>3) second form
>
>dataGrid1.DataSource = MyLocalData.DtCustomers;
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform