本帖最后由 clming327 于 2009-11-26 15:52:53 编辑

解决方案 »

  1.   

    bs.DataSource = sct;
    在这一句里, bs是复制一份sct, 还是指向sct? 
      

  2.   

    BindingSource bs = new BindingSource();
    bs.DataSource = sct;
    TheSCT.NO=sct.NO;
    txtNO.DataBindings.Add("Text", bs, "NO");
      

  3.   

    实现对象深复制
    class InstanceA : ICloneable
        {}
      

  4.   

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;namespace WindowsFormsApplication9
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();            BindSCT(TheSCT);
            }        CSCT TheSCT = new CSCT();
            public class CSCT
            {
                public string NO
                {
                    get;
                    set;
                }
            }        private void BindSCT(CSCT sct)
            {
                BindingSource bs = new BindingSource();
                bs.DataSource = sct;
                txtNO.DataBindings.Add("Text", bs, "NO", false, DataSourceUpdateMode.OnPropertyChanged);
            }        private void btnSave_Click(object sender, EventArgs e)
            {
                MessageBox.Show(TheSCT.NO);
            }
        }
    }