Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Databinding refresh
Message
De
01/12/2004 19:24:08
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00966178
Message ID:
00966241
Vues:
7
I dunno ... the second one, simply resetting the bindings every time, sure looks cleaner. Easier to read, so therefore more maintainable. But, I maybe would've structured my Query stuff differently (passing the DataSet to it, which would be passed by reference, instead of returning it).

I just haven't had to deal with this issue, so I'm just spinning my wheels here. You know what? It sure would help if someone else who's used remoting and has maybe done this before would jump into this discussion. For now, I'd say just go with the second method.

~~Bonnie




>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();
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform