Click here to Skip to main content
12,818,489 members (33,493 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads

Tagged as

Stats

46.8K views
414 downloads
46 bookmarked
Posted 16 Nov 2008

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


You may also be interested in...

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