示例#1
0
        private void btnDz_Click(object sender, EventArgs e)
        {
            if (dgvGz.SelectedRows.Count <= 0)
            {
                return;
            }
            if (dgvWhys.SelectedRows.Count <= 0)
            {
                return;
            }

            string gz   = dgvGz.SelectedRows[0].Cells["gzid"].Value.ToString().Trim();
            string whys = dgvWhys.SelectedRows[0].Cells["whysid"].Value.ToString().Trim();

            xtBiz.Delete(gz);
            xtBiz.Insert(gz, whys);
            LoadDgvWhys();
            LoadDgvGz();
        }