public override void OnClick()
 {
     if (m_Hook.UserTree.SelectedNode != null)
     {
         Exception eError;
         string    DeID = m_Hook.UserTree.SelectedNode.TagString;
         if (DeID == null || DeID == "")
         {
             return;
         }
         if (m_Hook.UserTree.SelectedNode.Text == "遥感室")
         {
             MessageBox.Show("该科室为管理员科室,不可修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
             return;
         }
         FrmAddDepartment frmDepartment = new FrmAddDepartment();
         frmDepartment.m_id       = DeID;
         frmDepartment.m_FrmText  = "更新科室";
         frmDepartment.m_BtnText  = "更新";
         frmDepartment.m_IsUpdate = true;
         if (frmDepartment.ShowDialog() == DialogResult.OK)
         {
             if (this.WriteLog)
             {
                 Plugin.LogTable.Writelog(Caption);//xisheng 2011.07.09 增加日志
             }
             ModuleOperator.DisplayUserTree("", m_Hook.UserTree, ref ModData.gisDb, out eError);
             if (eError != null)
             {
                 ErrorHandle.ShowFrmErrorHandle("提示", eError.Message);
                 return;
             }
         }
     }
 }
Exemple #2
0
        public override void OnClick()
        {
            Exception        eError;
            FrmAddDepartment frmDepartment = new FrmAddDepartment();

            if (this.WriteLog)
            {
                Plugin.LogTable.Writelog(Caption);//xisheng 2011.07.09 增加日志
            }
            if (frmDepartment.ShowDialog() == DialogResult.OK)
            {
                ModuleOperator.DisplayUserTree("", m_Hook.UserTree, ref ModData.gisDb, out eError);
                if (eError != null)
                {
                    ErrorHandle.ShowFrmErrorHandle("提示", eError.Message);
                    return;
                }
            }
        }