473,769 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to access ModuleControlle r from View Presenter?

Hi,

I have a solution, that includs a project.
The project have some folder, (like folder1, folder2, folder3,...).
Inside folder there is a view and view presenter.
Directly under project, there is modulcontroller that controls load win
forms etc.

In the moduleControole r I show a form like this:
string key = "_abc";

AForm view = this.WorkItem.I tems.Get<AForml >(key);

if (view == null)

{

view = WorkItem.SmartP arts.AddNew<AFo rm>();

}

view.ShowDialog ();

What I want is calling a function in the modulecontrolle r from a view
presenter. Say this is a function call GetCustomerID(s tring a);

Thank u.
peter
Oct 8 '06 #1
1 2250

U¿ytkownik "peter shaw" <pe*******@clin icalcomputers.c om.aunapisa³ w
wiadomo¶ci news:uo******** ********@TK2MSF TNGP05.phx.gbl. ..
Hi,

I have a solution, that includs a project.
The project have some folder, (like folder1, folder2, folder3,...).
Inside folder there is a view and view presenter.
Directly under project, there is modulcontroller that controls load win
forms etc.

In the moduleControole r I show a form like this:
string key = "_abc";

AForm view = this.WorkItem.I tems.Get<AForml >(key);

if (view == null)

{

view = WorkItem.SmartP arts.AddNew<AFo rm>();

}

view.ShowDialog ();

What I want is calling a function in the modulecontrolle r from a view
presenter. Say this is a function call GetCustomerID(s tring a);

Thank u.
peter
I thik you have do something like that. In your view class add this code
[CreateNew]

public ClassPresenter Presenter

{

get { return _presenter; }

set

{

_presenter = value;

_presenter.View = this;

}

}

and then if you want to call some methods from your WorkItem class from view
class then you can do that like this Presenter.WorkI tem. (you hev access to
all public methods in workItem class)

I think you use a UIApplicationBl ock am I right?

Forrest
Oct 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2768
by: Droolboy | last post by:
I'm trying to build a fairly small (max. 10 different pages) site using php, and it's becoming obvious that I need some kind of model view separation. Having done a few searches, I've come across the concept of 'template engines', but that seems like overkill for my needs. I'm thinking I'll just stick with php as my template language; a little embedded code in the view pages, for loops or whatever, should be ok.. I've come up with the...
0
1998
by: Brian Loesgen | last post by:
The next San Diego .Net User Group meeting is Tuesday, November 25, 2003 at the Scripps Ranch Library. Scripps Ranch Library 10301 Scripps Lake Drive San Diego, CA 92131-1026 Please join us at 6:00 pm for pizza and networking. The meeting starts at 6:30 pm.
6
4618
by: Robert W. | last post by:
I'm building my first major C# program and am try to use best practices everywhere. So I've implemented the "Document/View Model" whereby: - There's a Windows Form, which we'll call "formView" - There's a Class, which we'll call "classDocument" Thus, when an instance of each the form and the class are instantiated, they each will hold the same data, albeit be independent of each other. To keep the two in perfect sync with each other,...
10
4521
by: Sean Chambers | last post by:
Hello, I am attempting to utilize the MVP pattern in a new app I am building. I am using TDD, along with mock views attached to the View interface to attempt to unit test the UI. The problem I am having is when using the InitView() of the presenter, normally I would be retrieving data from NHibernate when InitView is called. Therein lies the problem, I can't seem to figure out how to properly
12
7502
by: Doug | last post by:
Hi, I learned a little about the model view presenter pattern at a conference this last week and am experimenting with it. It's working pretty well but I have a question. I am trying to use it to reset info in a combo box. Below is some sample code for my view interface and the presenter: public interface IDevToolView
6
14154
by: Dhananjay | last post by:
hello everyone i have got a problem i want to design business layer, data access layer , presentation layer for asp.net using C#.net , can anyone help me to solve this problem. i want some resources to complete this. i am trying very hard. Do you have any idea about website or any links where i can find some examples based on this concept.can you plz provide me , its urgent i want this solution with an example, if u have plz provide me. ...
1
8651
by: Dan | last post by:
Hi Am interested in learning more about Model View Presenter (MVP) design. Specifically to create an application using vs2005 with winforms that use webservices to process business logic. I want a stateless system ( wireless required), so I can then development a front end for the pda client, then webclient. From what I've read so far it should be easier to replace the gui for a pda\webclient with MVP design with minimal rewrite of...
12
1309
by: Joshmoshoshkosh | last post by:
I am creating a database for my company that holds different seminars, often done by different people. those are my 2 variables, but also, each seminar is rated with a sheet, that rates the seminar in various ways (1 to 5) as well as the presenter. how can i relate all of this data in Access, how many tables should i be using, and how can i set it up so i can take averages of the presenter's ratings, as well as take avearges of the specific...
3
3644
by: Gav | last post by:
I have just started to rewrite my application using the Presenter First Design Pattern to make sure my business logic is not in the Gui itself. I've got the general idea but I'm a bit unsure as to how I should be launching a dialogue window from my main application window. What i have done is this in a nutshell. My main application window comprises of a Model, Presenter and a View. The Popup window also has a Model, Presenter and View....
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.