/// <summary> /// 修改行政区划 /// </summary> private void btnEdit_Click(object sender, EventArgs e) { XZQHBMFrm xzqhbmFrm = new XZQHBMFrm(); xzqhbmFrm.XZQHID = (int)this.dataGridView1.SelectedRows[0].Cells[0].Value; xzqhbmFrm.ShowDialog(); if (xzqhbmFrm.DialogResult == DialogResult.OK) { this.quHuaTableAdapter.Fill(this.settingDataSet.QuHua); } }
/// <summary> /// 新增行政区划 /// </summary> private void btnAdd_Click(object sender, EventArgs e) { XZQHBMFrm xzqhbmFrm = new XZQHBMFrm(); if(this.dataGridView1.SelectedRows.Count>0) { xzqhbmFrm.FJQHBM = this.dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); } else { xzqhbmFrm.FJQHBM = 0+""; } xzqhbmFrm.ShowDialog(); if(xzqhbmFrm.DialogResult==DialogResult.OK) { this.quHuaTableAdapter.Fill(this.settingDataSet.QuHua); } }
/// <summary> /// 新增行政区划 /// </summary> private void btnAdd_Click(object sender, EventArgs e) { XZQHBMFrm xzqhbmFrm = new XZQHBMFrm(); if (this.dataGridView1.SelectedRows.Count > 0) { xzqhbmFrm.FJQHBM = this.dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); } else { xzqhbmFrm.FJQHBM = 0 + ""; } xzqhbmFrm.ShowDialog(); if (xzqhbmFrm.DialogResult == DialogResult.OK) { this.quHuaTableAdapter.Fill(this.settingDataSet.QuHua); } }