Beispiel #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ecitmenu_Click(object sender, EventArgs e)
        {
            try
            {
                //判断是否选中行政区域节点信息
                if (treeView1.SelectedNode == null)
                {
                    MessageBox.Show("请选择行政区域");
                    return;
                }
                if (treeView1.SelectedNode.Name != string.Empty && treeView1.SelectedNode.Text != string.Empty)
                {
                    Model_Region region = treeView1.SelectedNode.Tag as Model_Region;

                    FrmAdministrativeAE see = new FrmAdministrativeAE();
                    see._frmadministrativecontrol = this;
                    see.region = region;
                    see.nanber = 0;//0修改,1添加,2修改
                    see.ShowDialog();
                }
                else
                {
                    MessageBox.Show("请选择行政区域");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void ecitmenu_Click(object sender, EventArgs e)
        {
            Model_Region modelregion = dataGridView1.SelectedRows[0].Tag as Model_Region;
            //MessageBox.Show(modelregion .Idk__BackingField+ ","+modelregion.Namek__BackingField);
            FrmAdministrativeAE adminae = new FrmAdministrativeAE();

            adminae._frmseeadministratve = this;
            adminae.region = modelregion;
            adminae.nanber = 2;//0修改,1添加,2当前窗体
            adminae.ShowDialog();
        }