Exemple #1
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            frmUpload    frm = new frmUpload();
            DialogResult dlg = frm.ShowDialog();

            if (dlg == System.Windows.Forms.DialogResult.OK)
            {
                SetPermission(frm);
                //刷新网格
                string str = frm.Status;
                if (str == "personal")
                {
                    DataTable dt = new FileBLL().GetFileByUser(LoginUser.UserId, Convert.ToInt32(frm.SelectFid));
                    this.skinDataGridView1.DataSource = dt;
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        skinDataGridView1.Rows[0].Selected = false;
                    }
                    this.skinGroupBox1.Text = "[" + frm.Fname + "]" + "共" + dt.Rows.Count + "份文档(下列文档点击右键可以进行操作)";
                }
                else
                {
                    DataTable dt = new FileBLL().GetFileByDepartment(frm.Depid);
                    this.skinDataGridView1.DataSource = dt;
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        skinDataGridView1.Rows[0].Selected = false;
                    }
                    this.skinGroupBox1.Text = "[" + frm.Fname + "]" + "共" + dt.Rows.Count + "份文档(下列文档点击右键可以进行操作)";
                }
            }
        }
Exemple #2
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();
         }
     }
 }
Exemple #3
0
        private void   ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var          fileId = this.skinTreeViewPersonl.SelectedNode.Tag as string;
            frmUpload    frm    = new frmUpload(Convert.ToInt32(fileId));
            DialogResult dlg    = frm.ShowDialog();

            if (dlg == DialogResult.OK)
            {
                SetPermission(frm);
                DataTable dt = new FileBLL().GetFileByUser(LoginUser.UserId, Convert.ToInt32(frm.SelectFid));
                this.skinDataGridView1.DataSource = dt;
                if (dt != null && dt.Rows.Count > 0)
                {
                    skinDataGridView1.Rows[0].Selected = false;
                }
                this.skinGroupBox1.Text = "[" + frm.Fname + "]" + "共" + dt.Rows.Count + "份文档(下列文档点击右键可以进行操作)";
            }
        }