Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Databinding refresh
Message
 
À
01/12/2004 17:40:29
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00966178
Message ID:
00966237
Vues:
7
It works now!!

I added this line:
_cust.Clear();
but i'm not sure which is best, load an xml in the dataset or replace the existing dataset and redo the bindings. It comes up tho the same result but what is more effective ?
AR_CustMaster cust = new AR_CustMaster(3, 0, false);
QueryResult res = cust.Query(custNo);
if (_cust !=null)
{
	_cust.Clear();
	StringBuilder sb = new StringBuilder();
	System.IO.StringWriter sw = new StringWriter(sb);
	res.queryResult.WriteXml(sw);
	StringReader sr = new StringReader(sb.ToString());
	_cust.ReadXml(sr, XmlReadMode.InferSchema);
	_cust.AcceptChanges();
}
else
{
	_cust = res.queryResult as AR_CustMaster;
	this.SetBindings();
}
-- OR --
AR_CustMaster cust = new AR_CustMaster(3, 0, false);
QueryResult res = cust.Query(custNo);
_cust = res.queryResult as AR_CustMaster;
this.SetBindings();
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform