private void btnAdd_Click(object sender, System.EventArgs e) { if (this.lsvChu.SelectedItems.Count == 0) { MessageBox.Show("请选择新加站点所属管理处!"); return; } string strDepName = this.lsvChu.SelectedItems[0].Text.Trim(); frmSalZhansEdit frmSZE = new frmSalZhansEdit(); frmSZE.m_strCountryName = strDepName; frmSZE.ShowDialog(); this.lsvChu_Click(null, null); }
private void btnEdit_Click(object sender, System.EventArgs e) { if (this.lsvDep.SelectedItems.Count == 0) { MessageBox.Show("请选择要修改的管理所!"); return; } string strWellNo = this.lsvDep.SelectedItems[0].Text.Trim(); string strDepName = this.lsvDep.SelectedItems[0].SubItems[1].Text.Trim(); string strCountryName = this.lsvDep.SelectedItems[0].SubItems[2].Text.Trim(); frmSalZhansEdit frmSZE = new frmSalZhansEdit(); frmSZE.strDepName = strDepName; frmSZE.m_strCountryName = strCountryName; frmSZE.m_bEdit = true; frmSZE.m_strWellNo = strWellNo; frmSZE.ShowDialog(); }