퇴근5분전

사용자 삽입 이미지

<< 캡쳐 >>



바인딩 거는 소스 처리부..

            SqlConnection sql = new SqlConnection(" ... ");
            SqlCommand scmd = sql.CreateCommand();
            scmd.CommandText = "select * from Item(Nolock)";
            sql.Open();              
            DataTable dt = new DataTable();
            dt.Load(scmd.ExecuteReader( CommandBehavior.SequentialAccess ));
            sql.Close();
           

            this.bindingSource1.DataSource = dt;
            this.bindingNavigator1.BindingSource = this.bindingSource1;

            this.textBox1.DataBindings.Add("Text", this.bindingSource1, "ICODE", true);
            this.textBox2.DataBindings.Add("Text", this.bindingSource1, "KNAME", true);


음 이걸 어떻게 응용할수 있을까???