Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
 private void ToolS_FolderAdd_Click(object sender, EventArgs e)
 {
     nodeTemp = this.trvDocumentList.SelectedNode;
     if (nodeTemp != null)
     {
         if (chkIsFile())
         {
             MessageBox.Show("请选择文件夹的上层路径,不能选择文件节点!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
             return;
         }
         else
         {
             IAccount LoginInfo            = EAS.Application.Instance.Session.Client as IAccount;
             HYDocumentMS.IFileHelper file = new HYDocumentMS.FileHelper();
             Boolean bl = file.isHasAuth(DataType.AuthParmsType.FolderCreate, LoginInfo.LoginID, this.trvDocumentList.SelectedNode.Tag.ToString());
             if (bl == false)
             {
                 MessageBox.Show("你没有权限在此文件下创建文件夹!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return;
             }
             //MessageBox.Show(nodeTemp.Text.ToString());
             CreateNewFolderFrm frm = new CreateNewFolderFrm();
             frm.SaveFilepath = fileHelper.getDocumentAllPathByPathID(nodeTemp.Tag.ToString());
             frm.SaveFileKey  = nodeTemp.Tag.ToString();
             frm.BlAddFlg     = true;
             frm.ShowDialog();
         }
     }
     else
     {
         MessageBox.Show("请选择文件夹的上层路径!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
     }
     IniEvent();
 }
Exemplo n.º 2
0
        private void ToolS_FolderAmend_Click(object sender, EventArgs e)
        {
            nodeTemp = this.trvDocumentList.SelectedNode;
            if (nodeTemp != null)
            {
                if (chkIsFile())
                {
                    MessageBox.Show("请选择文件夹的上层路径,不能选择文件节点!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                    return;
                }
                else
                {
                    IAccount LoginInfo = EAS.Application.Instance.Session.Client as IAccount;
                    HYDocumentMS.IFileHelper file = new HYDocumentMS.FileHelper();
                    Boolean bl = file.isHasAuth(DataType.AuthParmsType.FolderEdit, LoginInfo.LoginID, this.trvDocumentList.SelectedNode.Tag.ToString());
                    if (bl == false)
                    {
                        MessageBox.Show("你没有权限修改此文件!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                    //MessageBox.Show(nodeTemp.Text.ToString());
                    CreateNewFolderFrm frm = new CreateNewFolderFrm();
                    frm.SaveFilepath = fileHelper.getDocumentAllPathByPathID(nodeTemp.Tag.ToString());
                    frm.SaveFileKey = nodeTemp.Tag.ToString();
                    frm.BlAddFlg = false;
                    frm.FatherFileKey = nodeTemp.Parent.Tag.ToString();
                    frm.ModifyFolderText = nodeTemp.Text.ToString();
                    frm.DocName = nodeTemp.Text.ToString();

                    frm.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("请选择文件夹的上层路径!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
            }
            IniEvent();
        }