Beispiel #1
0
 private void DeleteResourceGroup(object sender, EventArgs e)
 {
     if (DialogResult.Yes == MessageBox.Show(this, StringParser.Parse("${res:FanHai.Hemera.Addins.Msg.DeleteRemind}"), StringParser.Parse("${res:Global.SystemInfo}"), MessageBoxButtons.YesNo, MessageBoxIcon.Question))
     {
         ResourceGroup resourceGroup = new ResourceGroup();
         resourceGroup.GroupKey = this.resourceTree.SelectedNode.Tag.ToString();
         resourceGroup.DeleteResourceGroup();
         if (resourceGroup.ErrorMsg == "")
         {
             this.resourceTree.Nodes.Remove(resourceTree.SelectedNode);
         }
         else
         {
             MessageService.ShowError("${res:FanHai.Hemera.Addins.RBAC.OperationCtrl.Msg.DeleteMenuItem}");
         }
     }
 }