J
Jeremy
We're all used to weird behaviors with the netcf, right? okay well I got
another one. I have honestly tried many of the known tricks to netcf
developers but they don't seem to solve my problem.
(being a good boy, instead of calling a webservice synchronously) I'm
calling a webservice asynchronously. In my callback method I store the
response from the webservice in a new DataSet. All well so far. But then, I
make a call to a previously open form by means of : form.Show() and nothing
happens at all. If however I use another button that only does form.Show()
without any call to any webservice, the previously opened form does show up.
I've tried the usual Application.DoEvents(), this.refresh(),
this.BringToFront() in every possible order. Creating a new instance of the
previously opened form doesn't help either. Ideally, instead of going back
to a previous form I would like to refresh the entire form, but that doesn't
seem to work either (calling this.dispose() or this.InitializeComponent()).
Perhaps it is also worth mentioning that in another part of my application
(i.e. another form) I manage to open a new form from a callback method. Can
someone help me out, please?
For what it's worth, here's the callback method:
private void ReserveSeatCompleted (IAsyncResult ar)
{
DataSet tempDS = new DataSet("seatingChart");
BMacsWebService bm = (BMacsWebService)ar.AsyncState;
tempDS = bm.EndReserveSeat(ar);
//Seat reservation successful
if ((tempDS.Tables[0].Columns[0].Caption.ToString()).Equals("status"))
{
GlobalVars.SeatNumberRemote = GlobalVars.SeatNumberLocal;
}
//Seat reservation unsuccessful
else
{
GlobalVars.SeatingChartDs = tempDS;
GlobalVars.seat1.Show();
}
}
another one. I have honestly tried many of the known tricks to netcf
developers but they don't seem to solve my problem.
(being a good boy, instead of calling a webservice synchronously) I'm
calling a webservice asynchronously. In my callback method I store the
response from the webservice in a new DataSet. All well so far. But then, I
make a call to a previously open form by means of : form.Show() and nothing
happens at all. If however I use another button that only does form.Show()
without any call to any webservice, the previously opened form does show up.
I've tried the usual Application.DoEvents(), this.refresh(),
this.BringToFront() in every possible order. Creating a new instance of the
previously opened form doesn't help either. Ideally, instead of going back
to a previous form I would like to refresh the entire form, but that doesn't
seem to work either (calling this.dispose() or this.InitializeComponent()).
Perhaps it is also worth mentioning that in another part of my application
(i.e. another form) I manage to open a new form from a callback method. Can
someone help me out, please?
For what it's worth, here's the callback method:
private void ReserveSeatCompleted (IAsyncResult ar)
{
DataSet tempDS = new DataSet("seatingChart");
BMacsWebService bm = (BMacsWebService)ar.AsyncState;
tempDS = bm.EndReserveSeat(ar);
//Seat reservation successful
if ((tempDS.Tables[0].Columns[0].Caption.ToString()).Equals("status"))
{
GlobalVars.SeatNumberRemote = GlobalVars.SeatNumberLocal;
}
//Seat reservation unsuccessful
else
{
GlobalVars.SeatingChartDs = tempDS;
GlobalVars.seat1.Show();
}
}