Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating Entity List
Message
De
12/11/2009 17:07:38
Bill Oeftering
Mainstreet Computers, Inc.
Belleville, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Populating Entity List
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01434467
Message ID:
01434467
Vues:
122
I'm having trouble repopulating the entity list. In Page_Load I call getallEntities which loads the datase and entity list. On a postback I restore the dataset from the session. This does not seem to reload the entity list. Below is the code that I'm using for this.
	protected void Page_Load(object sender, EventArgs e)
	{
		this.StoreZipCodesBo = (Storezipcodes)this.RegisterBizObj(new Storezipcodes());
		this.StoreZipCodesBo.DatabaseKey = "DEVELOPMENT"; // Session["CompID"].ToString();
		if (!this.IsPostBack || this.Session["StoreZipCodesBo"]==null)
		{
			this.getData();
		}
		else
		{
			this.StoreZipCodesBo.SetCurrentDataSet((DataSet)this.Session["StoreZipCodesBo"]);
		}
	}
	protected void getData()
	{
		this.StoreZipCodesBo.GetAllEntities();
		if (this.StoreZipCodesBo.EntityList.Count == 0)
			this.StoreZipCodesBo.NewEntity();
	
		this.Session["StoreZipCodesBo"] = this.StoreZipCodesBo.GetCurrentDataSet();
	}
Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform