Click here to Skip to main content
11,478,066 members (75,206 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
Add your own
alternative version

Implementing Model-View-Presenter in ASP.NET

, 17 Nov 2007 CPOL 97K 2.6K 122
Three implementations of Model-View-Presenter in ASP.NET 2.0.
MVPSampleApp.zip
MVP.SampleApp
Lib
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Data.dll
MySql.Data.dll
nunit.framework.dll
Rhino.Mocks.dll
Model
Data
Interfaces
Properties
Presentation
Presentation.Tests
Properties
Interfaces
Properties
SubSonic
ActiveRecord
Builder
CodeGeneration
Templates
CodeLanguage
Configuration
Controls
Calendar
lang
skin
active-bg.gif
calendar.gif
dark-bg.gif
hover-bg.gif
menuarrow.gif
normal-bg.gif
rowhover-bg.gif
status-bg.gif
title-bg.gif
today-bg.gif
Resources
DataProviders
Properties
Sql Tools
SubSonic.snk
Sugar
WebApp
App_Data
Views
SQL2000SampleDb.zip
SQL2000SampleDb.msi
using System;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
using SubSonic;
using SubSonic.Utilities;


namespace Model.Data.Northwind{
    public partial class SPs{
        
        /// <summary>
        /// Creates an object wrapper for the Ten Most Expensive Products Procedure
        /// </summary>
        public static StoredProcedure TenMostExpensiveProducts()
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("Ten Most Expensive Products" , DataService.GetInstance("Northwind"));
        	
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the Employee Sales by Country Procedure
        /// </summary>
        public static StoredProcedure EmployeeSalesByCountry(DateTime? BeginningDate, DateTime? EndingDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("Employee Sales by Country" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@Beginning_Date", BeginningDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@Ending_Date", EndingDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the Sales by Year Procedure
        /// </summary>
        public static StoredProcedure SalesByYear(DateTime? BeginningDate, DateTime? EndingDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("Sales by Year" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@Beginning_Date", BeginningDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@Ending_Date", EndingDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the CustOrdersDetail Procedure
        /// </summary>
        public static StoredProcedure CustOrdersDetail(int? OrderID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("CustOrdersDetail" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@OrderID", OrderID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the CustOrdersOrders Procedure
        /// </summary>
        public static StoredProcedure CustOrdersOrders(string CustomerID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("CustOrdersOrders" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@CustomerID", CustomerID,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the CustOrderHist Procedure
        /// </summary>
        public static StoredProcedure CustOrderHist(string CustomerID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("CustOrderHist" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@CustomerID", CustomerID,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the SalesByCategory Procedure
        /// </summary>
        public static StoredProcedure SalesByCategory(string CategoryName, string OrdYear)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("SalesByCategory" , DataService.GetInstance("Northwind"));
        	
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@OrdYear", OrdYear,DbType.String);
        	    
            return sp;
        }

        
    }

    
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Alex Mueller
Web Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150520.1 | Last Updated 17 Nov 2007
Article Copyright 2007 by Alex Mueller
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid