网络应用 - 基本问题 [英] Network Application - basic question

查看:58
本文介绍了网络应用 - 基本问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的窗口的不同用户实例之间进行通信

表单项目?


我正在尝试编写将在网络上运行的程序15个。


5个电脑将运行程序的管理部分。其余的

pc'将运行该程序的推销员部分。


两种形式(管理员表格和推销员表格)在这个阶段是

非常简单,因为我只是想学习基本的网络通信之间的机制。


管理表单有几个标签,一个文本框和一个下拉框。

文本框允许管理员输入潜在客户名称,

下拉框允许管理员选择他们想要的销售员

来发送潜在客户。然后,当他们按下确定时,这就是我需要的事情

发生...


让我们从下拉框中选择他们选择名为JOHN的推销员。 />

在Johns PC上,该应用程序会弹出一个提示他有一个

来电导致的信箱。


然后弹出推销员表格,先前输入的客户

名称已经填充,时间和日期信息也从

填写管理员在他们发送给他之前输入的数据领导。


有人可以解释我是如何实现上述目标的。我可以创建

表格,当然没有任何问题,但我的问题是询问

网络方面的事情以及我如何实际获取表格进行沟通
彼此/并找到合适的用户表格来激活。


非常感谢。

How do I communicate between different user instances of my windows
forms project?

Im trying to write a program that will run on a network of 15 pcs.

5 of the pc''s will run the admin part of the program. and the rest of
the pc''s will run the salesman part of the program.

Both forms (the admin form, and the salesman form) at this stage are
VERY simple as i''m just trying to learn the mechanics between basic
form communication accross the network.

The admin form has a couple of labels, a text box and a drop down box.
The text box allows the admin person to enter a leads name, and the
dropdown box allows the admin person to select which salesman they want
to send the lead to. Then when they press OK here is what i need to
happen...

Lets say from the dropdown box they selected the salesman called JOHN.

On Johns PC the app will popup a box alerting him that he has an
incoming lead.

It then pops up the salesman form, with the previously entered customer
name already populated and the time and date info also populated from
the data the admin person entered before they sent him the lead.

Can someone please explain how I achieve the above. I can create the
forms with no problems of course, but my question is asking about the
network side of things and how i actually get the forms to communicate
with each other / and find the right users form to activate.

Many Thanks.

推荐答案

我想我必须有几十种方法来做到这一点;但是我认为

最直接的方式,只是为了让你开始,将数据库置于中间位置。用户在admin

表单上进行选择,并将信息写入数据库。推销员表格定期轮询

数据库,当它找到新信息时,它会在推销员表格上显示它。


这应该足以让你入门。


-

干杯,

Gary
http://www.garyshort.org/

CCLeasing写道:
Well I suppose there must be dozens of ways to do this; but I think the
most straight forward way to do it, just to get you started, would be
to put a database in the middle. User makes selections on the admin
form and writes info to the database. The salesman form polls the
database on regular basis, and when it finds new information it
displays it on the salesman form.

This should be enough to get you started.

--
Cheers,
Gary
http://www.garyshort.org/
CCLeasing wrote:

如何在窗口的不同用户实例之间进行通信

表单项目?


我正在尝试编写一个可以在15个网络上运行的程序。


5个电脑将运行程序的管理部分。其余的

pc'将运行该程序的推销员部分。


两种形式(管理员表格和推销员表格)在这个阶段是

非常简单,因为我只是想学习基本的网络通信之间的机制。


管理表单有几个标签,一个文本框和一个下拉框。

文本框允许管理员输入潜在客户名称,

下拉框允许管理员选择他们想要的销售员

来发送潜在客户。然后,当他们按下确定时,这就是我需要的事情

发生...


让我们从下拉框中选择他们选择名为JOHN的推销员。 />

在Johns PC上,该应用程序会弹出一个提示他有一个

来电导致的信箱。


然后弹出推销员表格,先前输入的客户

名称已经填充,时间和日期信息也从

填写管理员在他们发送给他之前输入的数据领导。


有人可以解释我是如何实现上述目标的。我可以创建

表格,当然没有任何问题,但我的问题是询问

网络方面的事情以及我如何实际获取表格进行沟通
彼此/并找到合适的用户表格来激活。


非常感谢。
How do I communicate between different user instances of my windows
forms project?

Im trying to write a program that will run on a network of 15 pcs.

5 of the pc''s will run the admin part of the program. and the rest of
the pc''s will run the salesman part of the program.

Both forms (the admin form, and the salesman form) at this stage are
VERY simple as i''m just trying to learn the mechanics between basic
form communication accross the network.

The admin form has a couple of labels, a text box and a drop down box.
The text box allows the admin person to enter a leads name, and the
dropdown box allows the admin person to select which salesman they want
to send the lead to. Then when they press OK here is what i need to
happen...

Lets say from the dropdown box they selected the salesman called JOHN.

On Johns PC the app will popup a box alerting him that he has an
incoming lead.

It then pops up the salesman form, with the previously entered customer
name already populated and the time and date info also populated from
the data the admin person entered before they sent him the lead.

Can someone please explain how I achieve the above. I can create the
forms with no problems of course, but my question is asking about the
network side of things and how i actually get the forms to communicate
with each other / and find the right users form to activate.

Many Thanks.





听起来你应该使用中央服务器。


如果您想使用远程处理,每个登录的客户端都可以通过众所周知的IP地址与中央服务器建立一个

远程会话。

客户端可以在本地传递有关其自己的远程服务的信息

,以便中央服务器可以建立一个远程连接回来

到客户。服务器必须维护客户端远程控制列表以及客户端连接的自己的托管对象。


远程服务器可以执行将传入消息发送给其客户端。


您需要将源自MarshalByRefObject的类配置为作为服务器激活的SingleCall托管的
或Singleton(首选)。


.NET Remoting概述
http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx


你也可以使用套接字在较低级别执行此操作:


TcpListener类
http://msdn.microsoft.com/library/de .. .asp?frame = true


-
Dave Sexton


" CCLeasing" < ga ** @ ccleasing.co.ukwrote in message

news:11 ********************** @ b28g2000cwb.googlegr oups.com ...
Hi,

It sounds like you should be using a central server.

If you want to use remoting, each client that logs in can establish a
remoting session with a central server via a well known IP address. The
client can pass information about its own remoting service being hosted
locally so that the central server can establish a remoting connection back
to the client. The server will have to maintain a list of client remoting
objects as well as its own hosted object to which clients connect.

The remoting server can act to dispatch incoming messages to its clients.

You''ll need to configure a class that derives from MarshalByRefObject to be
hosted as a server-activated SingleCall or Singleton (preferred).

".NET Remoting Overview"
http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx

You could do this on a lower level using Sockets too:

"TcpListener Class"
http://msdn.microsoft.com/library/de...asp?frame=true

--
Dave Sexton

"CCLeasing" <ga**@ccleasing.co.ukwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...

如何在我的窗口的不同用户实例之间进行通信

表单项目?


我正在尝试编写一个可在15个网络上运行的程序。


5的PC将运行该程序的管理部分。其余的

pc'将运行该程序的推销员部分。


两种形式(管理员表格和推销员表格)在这个阶段是

非常简单,因为我只是想学习基本的网络通信之间的机制。


管理表单有几个标签,一个文本框和一个下拉框。

文本框允许管理员输入潜在客户名称,

下拉框允许管理员选择他们想要的销售员

来发送潜在客户。然后,当他们按下确定时,这就是我需要的事情

发生...


让我们从下拉框中选择他们选择名为JOHN的推销员。 />

在Johns PC上,该应用程序会弹出一个提示他有一个

来电导致的信箱。


然后弹出推销员表格,先前输入的客户

名称已经填充,时间和日期信息也从

填写管理员在他们发送给他之前输入的数据领导。


有人可以解释我是如何实现上述目标的。我可以创建

表格,当然没有任何问题,但我的问题是询问

网络方面的事情以及我如何实际获取表格进行沟通
彼此/并找到合适的用户表格来激活。


非常感谢。
How do I communicate between different user instances of my windows
forms project?

Im trying to write a program that will run on a network of 15 pcs.

5 of the pc''s will run the admin part of the program. and the rest of
the pc''s will run the salesman part of the program.

Both forms (the admin form, and the salesman form) at this stage are
VERY simple as i''m just trying to learn the mechanics between basic
form communication accross the network.

The admin form has a couple of labels, a text box and a drop down box.
The text box allows the admin person to enter a leads name, and the
dropdown box allows the admin person to select which salesman they want
to send the lead to. Then when they press OK here is what i need to
happen...

Lets say from the dropdown box they selected the salesman called JOHN.

On Johns PC the app will popup a box alerting him that he has an
incoming lead.

It then pops up the salesman form, with the previously entered customer
name already populated and the time and date info also populated from
the data the admin person entered before they sent him the lead.

Can someone please explain how I achieve the above. I can create the
forms with no problems of course, but my question is asking about the
network side of things and how i actually get the forms to communicate
with each other / and find the right users form to activate.

Many Thanks.



谢谢,但我不知道如何与c#express中的数据库进行交互。


我前段时间尝试过与mysql数据库接口但卡住了/>
一路上的某个地方。我不想使用ms sql server因为

的许可要求。


谢谢,任何进一步的建议都将不胜感激。

Thanks but i don''t know how to interface with databases in c# express.

I tried sometime ago to interface with a mysql database but got stuck
somewhere along the way. I don''t want to use ms sql server because of
the licencing requirements.

Thanks, any further advice would be appreciated.


这篇关于网络应用 - 基本问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆