Example #1
0
 private void SetPermission(frmUpload frm)
 {
     if (frm.NewFileId > 0)
     {
         DialogResult d = MessageBox.Show("上传成功,是否进入权限设置?", "系统提示", MessageBoxButtons.YesNo,
                                          MessageBoxIcon.Question);
         if (d == DialogResult.Yes)
         {
             frmPermissionConfig frmPer = new frmPermissionConfig(frm.NewFileId);
             frmPer.ShowDialog();
         }
     }
 }
Example #2
0
        private void 借阅ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string fileid = skinDataGridView1.CurrentRow.Cells["FileId"].Value.ToString();
            bool   check  = AuthPermission.Auth(LoginUser.UserId, Convert.ToInt32(fileid), FilePermission.Share);

            if (check)
            {
                frmPermissionConfig frm = new frmPermissionConfig(Convert.ToInt32(fileid));
                frm.ShowDialog();
            }
            else
            {
                MessageBox.Show("您没有权限借阅该文件", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }