Click here to Skip to main content
12,074,995 members (60,962 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads

Tagged as

Stats

43.2K views
406 downloads
45 bookmarked
Posted

The 3 Musketeers: - Model, View and Controller using ASP.NET MVC – Part 2

, 8 Sep 2009 CPOL
The 3 Musketeers: - Model, View and Controller using ASP.NET MVC – Part 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
namespace MvcApplication.Models
{
    public class clsCustomer
    {
        private string _strCustomerName;
        private string _strAddress;
        private double _dblSales;
        public string CustomerName
        {
            set
            {
                _strCustomerName = value;
            }
            get
            {
                return _strCustomerName;
            }
        }
        public string Address
        {
            set
            {
                _strAddress = value;
            }
            get
            {
                return _strAddress;
            }
        }
        public double Sales
        {
            set
            {
                _dblSales = value;
            }
            get
            {
                return _dblSales;
            }
        }
    }
    public class clsCustomers : CollectionBase
    {
        public clsCustomers()
        {
        }
        public void LoadCustomers()
        {
            Add("Shiv", "Mulund", 20);
            Add("Raju", "Mumbai", 20);
            Add("Manish", "Delhi", 20);
            Add("Lalu", "Nepal", 20);
            Add("Khadak", "Ratoli", 20);
            Add("Shaam", "Ghatkopar", 20);
        }
        void Add(string strCustomerName, string strAddress, double dblSales)
        {
            clsCustomer objCustomer = new clsCustomer();
            objCustomer.Address = strAddress;
            objCustomer.CustomerName = strCustomerName;
            objCustomer.Sales = dblSales;
            List.Add(objCustomer);
        }
    }
}

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

Shivprasad koirala
Architect http://www.questpond.com
India India

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160208.1 | Last Updated 9 Sep 2009
Article Copyright 2008 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid