consystems asked 2018-01-15 15:52:35 UTC
Hi,
in our project we have multiple pages of type Wisej.Web.Page, e.g. for orders, customers, carriers, and we handle them in a List<Wisej.Web.Page>
called PageCol , add new pages to that list and handle the navigation between these pages in a static class with methods like this:
public static List<Wisej.Web.Page> PageColl;
public static void Forward(Wisej.Web.Page page)
{
bool added = false;
foreach (Wisej.Web.Page item in PageColl)
{
if (item.Tag.ToString() == page.Tag.ToString())
{
added = true;
break;
}
}
if (!added)
{
PageColl.Add(page);
Page.Show();
}
}
It all works fine for one user, but as soon as a second user works with the page the whole navigation of the pages will crush, as it appears that all users work with the same list of pages. Looks like we can't use the static class to handle the different pages for multiple users so I would like to ask if you have any idea to solve that problem or maybe have an even better approach for the whole navigation of multiple Wisej.Web.Pages.
Greets,
Marcel
consystems asked 2018-01-15 15:52:35 UTC
Hi,
in our project we have multiple pages of type Wisej.Web.Page, e.g. for orders, customers, carriers, and we handle them in a List<Wisej.Web.Page>
called PageCol , add new pages to that list and handle the navigation between these pages in a static class with methods like this:
public static List<Wisej.Web.Page> PageColl;
public static void Forward(Wisej.Web.Page page)
{
bool added = false;
foreach (Wisej.Web.Page item in PageColl)
{
if (item.Tag.ToString() == page.Tag.ToString())
{
added = true;
break;
}
}
if (!added)
{
PageColl.Add(page);
Page.Show();
}
}
It all works fine for one user, but as soon as a second user works with the page the whole navigation of the pages will crush, as it appears that all users work with the same list of pages. Looks like we can't use the static class to handle the different pages for multiple users so I would like to ask if you have any idea to solve that problem or maybe have an even better approach for the whole navigation of multiple Wisej.Web.Pages.
Greets,
Marcel