Click here to Skip to main content
15,891,868 members
Articles / Programming Languages / C#

AccountPlus

Rate me:
Please Sign up or sign in to vote.
4.47/5 (63 votes)
10 Sep 2009LGPL320 min read 241.6K   61.8K   209  
A Complete Account Management System
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace AccountPlus.DataAccess
{
    public class DBParameter
    {
        #region "Private Variables"
        private string _name = string.Empty;
        private object _value = null;
        private DbType _type = DbType.String;
        private ParameterDirection _paramDirection = ParameterDirection.Input;
        #endregion

        #region "Constructors"
        /// <summary>
        /// Defaule constructor. Paramete name, vale, type and direction needs to be assigned explicitly by using the public properties exposed.
        /// </summary>
        public DBParameter()
        {
        }


        /// <summary>
        /// Creates a parameter with the name and value specified. Default data type and direction is String and Input respectively.
        /// </summary>
        /// <param name="name">Parameter name</param>
        /// <param name="value">Value associated with the parameter</param>
        public DBParameter(string name, object value)
        {
            _name = name;
            _value = value;
        }

        /// <summary>
        /// Creates a parameter with the name, value and direction specified. Default data type is String.
        /// </summary>
        /// <param name="name">Parameter name</param>
        /// <param name="value">Value associated with the parameter</param>
        /// <param name="paramDirection">Parameter direction</param>
        public DBParameter(string name, object value, ParameterDirection paramDirection)
        {
            _name = name;
            _value = value;
            _paramDirection = paramDirection;
        }

        /// <summary>
        /// Creates a parameter with the name, value and Data type specified. Default direction is Input. 
        /// </summary>
        /// <param name="name">Parameter name</param>
        /// <param name="value">Value associated with the parameter</param>
        /// <param name="dbType">Data type</param>
        public DBParameter(string name, object value, DbType dbType)
        {
            _name = name;
            _value = value;
            _type = dbType;
        }

        /// <summary>
        /// Creates a parameter with the name, value, data type and direction specified. 
        /// </summary>
        /// <param name="name">Parameter name</param>
        /// <param name="value">Value associated with the parameter</param>
        /// <param name="dbType">Data type</param>
        /// <param name="paramDirection">Parameter direction</param>
        public DBParameter(string name, object value, DbType dbType, ParameterDirection paramDirection)
        {
            _name = name;
            _value = value;
            _type = dbType;
            _paramDirection = paramDirection;
        }
        #endregion

        #region "Public Properties"
        /// <summary>
        /// Gets or sets the name of the parameter.
        /// </summary>
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        
        /// <summary>
        /// Gets or sets the value associated with the parameter.
        /// </summary>
        public object Value
        {
            get { return _value; }
            set { _value = value; }
        }
        
        /// <summary>
        /// Gets or sets the type of the parameter.
        /// </summary>
        public DbType Type
        {
            get {return _type ;}
            set { _type = value; }
            
        }
        
        /// <summary>
        /// Gets or sets the direction of the parameter.
        /// </summary>
        public ParameterDirection ParamDirection
        {
            get
            {
                return _paramDirection;
            }
            set
            {
                _paramDirection = value;
            }
        }
        #endregion
    }
}

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 GNU Lesser General Public License (LGPLv3)


Written By
Founder Aspirea Technologies Pvt Ltd
India India
• 8 years of experience in IT Industry as a Developer.
• Experience of End-To-End Software Development and Implementation (Entire SDLC i.e Software Development Life Cycle)
• Real time Exposure to Banking, Finance and Energy industry.
• Expertise in distributed application architecture as well as web based applications using Microsoft.NET platform.
• Expertise in database design, SQL programming and SQL performance tuning.
• Expertise in Web Services and WCF Services.
• Experience of Rich Internet Application using Adobe Flex.
• Experience in migration of legacy application to latest technology, migration of VB application to .NET.
• Knowledge of OOPS and Design Concepts.
• Expertise in Agile/ Scrum software development processes.

Specialties
• Languages\ Technologies-
.NET Framework 1.1/2.0/3.0/3.5, C#.NET, VB.NET, ASP.NET, VB6, AJAX, ASP.NET, Adobe Flex 3.0, Web Services, Windows Communication Foundation (WCF), LINQ, SQL Server, Oracle, MySql, MS Access, HTML, XML, JavaScript, C# Script, CSS and XSLT.

• Methodology/ Concepts-
OOPS, Data Structures, Design Concepts and Agile/ Scrum Software Development

Comments and Discussions