471,610 Members | 1,305 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Linking Forms Dynamically

Hi

I'm developing a scheduling application (C#, Windows Forms, SQL Server)
that matches up engineers and sites. I've got one form that shows an
engineer and what sites he's visiting (EngineerView), and another that
shows a site and what engineer visits are planned (SiteView). Both are
made up from a number of ListViews that the user can Drag & Drop
between.

I'd like the user to be able to open multiple instances of EngineerView
and SiteView, and I want a change to one of them to be immediately
reflected in any of the others that show related data. For example if
I schedule Engineer A to Site B on Tuesday in an EngineerView then I
want any SiteViews for Site B to show Engineer A on Tuesday.

My question is what's the best way to achieve this? My idea so far is
to create a central public array that they all update. Would this work?
Can anyone suggest an alternative?
Also I'm not sure how to make updates appear immediately in another
open form.

Hope that's fairly clear.

Cheers

John South
www.WhereCanWeGo.com
Pangbourne UK

Feb 17 '06 #1
3 2662
I would probably create a class on the server, that would hold your
master array of schedules. then to make the changes instant, you could
use AJAX, set each form to refresh every X seconds to poll for the
Array off the server. If the server array is different than the one on
the client side, it gets the updates and updates the UI.

there is an article on MSDN called ASP.NET Spiced, that explains how to
use asp.net and ajax together. some pretty impressive stuff if you ask
me.

hope that helps, little hazy on the details but you get the idea.

Feb 17 '06 #2
i take that back about the form refreshing, that wouldnt be necessary,
all you would have to do is in the javascript on the client forms,
setup an AJAX method on the server, that your forms would call every X
seconds. thats what i was trying to say

Feb 17 '06 #3
Sorry, I thought I had made it clear that it's a Windows Forms
Application not ASP.Net.

John South
DKode wrote:
i take that back about the form refreshing, that wouldnt be necessary,
all you would have to do is in the javascript on the client forms,
setup an AJAX method on the server, that your forms would call every X
seconds. thats what i was trying to say


Feb 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.