How to access ModuleController from View Presenter?

  • Thread starter Thread starter peter shaw
  • Start date Start date
P

peter shaw

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 moduleControoler I show a form like this:
string key = "_abc";

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

if (view == null)

{

view = WorkItem.SmartParts.AddNew<AForm>();

}

view.ShowDialog();

What I want is calling a function in the modulecontroller from a view
presenter. Say this is a function call GetCustomerID(string a);

Thank u.
peter
 
U¿ytkownik "peter shaw said:
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 moduleControoler I show a form like this:
string key = "_abc";

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

if (view == null)

{

view = WorkItem.SmartParts.AddNew<AForm>();

}

view.ShowDialog();

What I want is calling a function in the modulecontroller from a view
presenter. Say this is a function call GetCustomerID(string 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.WorkItem. (you hev access to
all public methods in workItem class)

I think you use a UIApplicationBlock am I right?

Forrest
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top