Example #1
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            dt.Clear();
            rowlist.Clear();
            List <string> liststr = new List <string>();
            string        str     = e.Node.Text.Split(' ')[0];

            liststr.Add(str);
            GetTree(e.Node, ref liststr);
            DataTable data = sql.AccurateQuery_Like_List(liststr.ToArray(), "cInvCCode");

            foreach (DataRow row in data.Rows)
            {
                DataRow dr = dt.NewRow();
                foreach (var key in dictParam.Keys)
                {
                    dr[dictParam[key]] = row[key];
                }
                dt.Rows.Add(dr);
            }
            scrDataGridView1.SetBindingSource(dt);
            this.Cursor = Cursors.Default;
        }