From: Alan T on 9 Aug 2010 03:22 I have a page have 2 dropdown list on it. eg. employee (John, Peter, Mary, ...) offices (eg. New York, Chicago, ...) These will be fetched from database to populate it. I have defined data access object and business object for these 2 classes. Do I need to create a model for each of them to linke to dropdown list? Or just like normal datasource to do population? I think I should have a model link to this 'View'. So what should I do?
From: Man T on 9 Aug 2010 08:01 >I have a page have 2 dropdown list on it. > eg. > employee (John, Peter, Mary, ...) > offices (eg. New York, Chicago, ...) > > These will be fetched from database to populate it. > I have defined data access object and business object for these 2 classes. > > Do I need to create a model for each of them to linke to dropdown list? > Or just like normal datasource to do population? > > I think I should have a model link to this 'View'. > So what should I do? I have created a simple ASP.NET website at the moment: 1) main page menu list on the left of category eg. Technical Staff Administrative Staff When click one of the staff type will display positions of the category eg. Click Tecnical Staff will display on the right: Repair Engineer Technician Telecommunication Engineer These are hardcoded, not from database 2) When click on one of these positions: Will display selection criteria of this position. eg. a) If click on Technician will display: 'Department' dropdown list 'Office' dropdown list b) If click on Repair Engineer will display 'Specialty' dropdownlist 'Supervisor' dropdown list This third page will depends on the staff type selected. After selection of the 2 dropdown list, a record will be inserted to a table. I want to reshape the 'model', actually I want to use MVC to build my application. BUT it will take much time to learn MVC 2 framework. Anyway I can simulate a MVC model without using MVC 2 framework?
From: "Mr. Arnold" MR. on 10 Aug 2010 12:28 "Alan T" <alan_NO_SPAM_pltse(a)yahoo.com.au> wrote in message news:uY51xO5NLHA.5732(a)TK2MSFTNGP06.phx.gbl... > So what should I do? Use Model View Presenter, which is easier and more flexible to use than MVC. What is Model -View- Presenter? MVP is a software pattern considered a derivative of the Model-view-controller. http://en.wikipedia.org/wiki/Model_View_Presenter MODEL-VIEW-PRESENTER http://www.polymorphicpodcast.com/ click 'Shows' click 'Design Patterns Bootcamp: Model View * Patterns* view parts 1-5 After you get the basics, then use Bing or Google to find out how to use MVP with dependency injection, which would be injecting the view and the service into the presenter.
|
Pages: 1 Prev: i-Technosoft offers Cheap Windows Sharepoint Services Next: I GOT $2000 FROM PAYPAL . |