/// <summary>
 /// 新增
 /// </summary>
 private void Add(object sender, EventArgs e)
 {
     if (this.tvMacrosElements.SelectedNode != null)
     {
         var type = tvMacrosElements.SelectedNode.Tag.As <string>();
         if (type.IsNotEmpty())
         {
             frmMacrosElement frm = new frmMacrosElement(type);
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 this.LoadData();
             }
         }
     }
 }
 /// <summary>
 /// 修改
 /// </summary>
 private void Modify(object sender, EventArgs e)
 {
     if (this.tvMacrosElements.SelectedNode != null)
     {
         var entity = tvMacrosElements.SelectedNode.Tag.As <T_MACROS_ELEMENTS>();
         if (entity != null)
         {
             frmMacrosElement frm = new frmMacrosElement(entity);
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 this.LoadData();
             }
         }
     }
 }