using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace Mesnac.Controls.Base
{
    /// <summary>
    /// 数据源控件
    /// </summary>
    [ToolboxBitmap(typeof(System.ComponentModel.Component))]
    public partial class MCDataSource : Component
    {
        public MCDataSource()
        {
            InitializeComponent();
        }

        public MCDataSource(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }
        private string _tableName;
        private string _mcKey;

        /// <summary>
        /// 表名
        /// </summary>
        public string TableName
        {
            get { this._tableName = this._mcKey; return _tableName; }
            set { _tableName = value; this._mcKey = value; }
        }
        /// <summary>
        /// 数据源
        /// </summary>
        public string MCKey
        {
            get { return this._mcKey; }
            set { this._mcKey = value; this._tableName = value; }
        }
        
        public override string ToString()
        {
            return this.Site.Name;
        }
    }
}