public void setMenu(int TopClassID) { bool permission; //验证是否有原件管理的权限 permission = PermissionInfo.checkPermission(TopClassID, PermissionType.原件管理); if (!permission) { tsm查看电子案卷.Enabled = false; tsm生成电子案卷.Enabled = false; } //验证是否有打印的权限 permission = PermissionInfo.checkPermission(TopClassID, PermissionType.打印); if (!permission) { tsm打印.Enabled = false; } //验证是否有检索的权限 permission = PermissionInfo.checkPermission(TopClassID, PermissionType.检索); if (!permission) { tsm检索.Enabled = false; } //验证是否有统计的权限 permission = PermissionInfo.checkPermission(TopClassID, PermissionType.统计); if (!permission) { //tsm统计.Enabled = false; } }
private int NewFileNum;//案卷号临时变量 //构造函数初始化 public BZ_File(int contentID, TreeNode node, int deptID) { InitializeComponent(); this.ContentID = contentID; this.deptID = deptID; this.node = node; pnlNav.SizeChanged += new EventHandler(pnlNav_SizeChanged); winFind.OnFindClick += new EventHandler <FindRecordWindowEventArgs>(this.winFind_OnFindClick); #region 界面设置 panelDgvFile.Visible = true; panelFile.Visible = false; panelDgvFile.Dock = DockStyle.Fill; panelFile.Dock = DockStyle.Fill; //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(BZ_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.BZ_Input.tsbtnCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsbtnSCDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiSCDZAJ.Enabled = true; } UI.Input.BZ_Input.tsbtnDATZ.Enabled = true; UI.Input.BZ_Input.tsbtnDHTZ.Enabled = true; UI.Input.BZ_Input.tsmiDATZ.Enabled = true; UI.Input.BZ_Input.tsmiDHTZ.Enabled = true; UI.Input.BZ_Input.tsbtnSX.Enabled = true; UI.Input.BZ_Input.tsbtnQXSX.Enabled = true; UI.Input.BZ_Input.tsmiSX.Enabled = true; UI.Input.BZ_Input.tsmiQXSX.Enabled = true; //设置查看方式按钮 //UI.Input.BZ_Input.tsbtnCK.Enabled = true; //UI.Input.BZ_Input.tsbtnList2.Checked = true; //UI.Input.BZ_Input.tsbtnCard2.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Checked = true; UI.Input.BZ_Input.tsmiCard.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Enabled = true; UI.Input.BZ_Input.tsmiCard.Enabled = true; ////定义保存按钮图片 //btnUpdata.BackgroundImage = imgButton; //btnUpdata.MouseEnter += new EventHandler(btn_MouseEnter); //btnUpdata.MouseLeave += new EventHandler(btn_MouseLeave); ////定义取消按钮图片 //btnCancel.BackgroundImage = imgButton; //btnCancel.MouseEnter += new EventHandler(btn_MouseEnter); //btnCancel.MouseLeave += new EventHandler(btn_MouseLeave); #endregion }
//页面关闭 private void Ws_Yj_FormClosing(object sender, FormClosingEventArgs e) { //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(BZ_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.BZ_Input.tsbtnCKDZAJ.Enabled = false; UI.Input.BZ_Input.tsmiCKDZAJ.Enabled = false; UI.Input.BZ_Input.tsbtnSCDZAJ.Enabled = false; UI.Input.BZ_Input.tsmiSCDZAJ.Enabled = false; } UI.Input.BZ_Input.tsbtnDATZ.Enabled = false; UI.Input.BZ_Input.tsbtnDHTZ.Enabled = false; UI.Input.BZ_Input.tsmiDATZ.Enabled = false; UI.Input.BZ_Input.tsmiDHTZ.Enabled = false; UI.Input.BZ_Input.tsbtnChange.Enabled = true; #region 释放委托 //释放工具栏按钮的委托 UI.Input.BZ_Input.tsbtnNewRow.Click -= new EventHandler(btnInputYj_Click); UI.Input.BZ_Input.tsbtnDeleteRow.Click -= new EventHandler(tsdelete_Click); UI.Input.BZ_Input.tsbtnSX.Click -= new EventHandler(tssx_Click); UI.Input.BZ_Input.tsbtnQXSX.Click -= new EventHandler(tsqxsx_Click); UI.Input.BZ_Input.tsbtnCKDZAJ.Click -= new EventHandler(tsckdzaj_Click); UI.Input.BZ_Input.tsbtnSCDZAJ.Click -= new EventHandler(tsbtnscdzaj_Click); UI.Input.BZ_Input.tsbtnDATZ.Click -= new EventHandler(tsbtnDATZ_Click); UI.Input.BZ_Input.tsbtnDHTZ.Click -= new EventHandler(tsbtnDHTZ_Click); //释放菜单栏按钮的委托 UI.Input.BZ_Input.tsmiDelete.Click -= new EventHandler(tsdelete_Click); UI.Input.BZ_Input.tsmiSX.Click -= new EventHandler(tssx_Click); UI.Input.BZ_Input.tsmiQXSX.Click -= new EventHandler(tsqxsx_Click); UI.Input.BZ_Input.tsmiCKDZAJ.Click -= new EventHandler(tsckdzaj_Click); UI.Input.BZ_Input.tsmiSCDZAJ.Click -= new EventHandler(tsbtnscdzaj_Click); UI.Input.BZ_Input.tsmiCopy.Click -= new EventHandler(tsmiCopy_Click); UI.Input.BZ_Input.tsmiCut.Click -= new EventHandler(tsmiCut_Click); UI.Input.BZ_Input.tsmiPaste.Click -= new EventHandler(tsmiPaste_Click); UI.Input.BZ_Input.tsmiDATZ.Click -= new EventHandler(tsbtnDATZ_Click); UI.Input.BZ_Input.tsmiDHTZ.Click -= new EventHandler(tsbtnDHTZ_Click); UI.Input.BZ_Input.tsmiFind.Click -= new EventHandler(tsm查找_Click); dgv导航.closeYesNewRowsEventHandler(); #endregion }
//构造函数初始化 public BZ_Yj(int DocID, TreeNode node, int deptID) { InitializeComponent(); this.DocID = DocID; this.DeptID = deptID; this.node = node; pnlNav.SizeChanged += new EventHandler(pnlNav_SizeChanged); winFind.OnFindClick += new EventHandler <FindRecordWindowEventArgs>(this.winFind_OnFindClick); #region 界面设置 //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(BZ_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.BZ_Input.tsbtnCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsbtnSCDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiSCDZAJ.Enabled = true; } UI.Input.BZ_Input.tsbtnDATZ.Enabled = true; UI.Input.BZ_Input.tsbtnDHTZ.Enabled = true; UI.Input.BZ_Input.tsmiDATZ.Enabled = true; UI.Input.BZ_Input.tsmiDHTZ.Enabled = true; UI.Input.BZ_Input.tsbtnSX.Enabled = true; UI.Input.BZ_Input.tsbtnQXSX.Enabled = true; UI.Input.BZ_Input.tsmiSX.Enabled = true; UI.Input.BZ_Input.tsmiQXSX.Enabled = true; UI.Input.BZ_Input.tsbtnChange.Enabled = false; //UI.Input.BZ_Input.tsbtnCK.Enabled = false; //UI.Input.BZ_Input.tsbtnList2.Checked = true; //UI.Input.BZ_Input.tsbtnCard2.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Checked = true; UI.Input.BZ_Input.tsmiCard.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Enabled = false; UI.Input.BZ_Input.tsmiCard.Enabled = false; #endregion InitToolbarButtons();//初始化照片工具栏 this.photoViewer1.SizeChanged += new EventHandler(photoViewer1_SizeChanged); }
//窗体关闭事件 private void Ws_File_FormClosing(object sender, FormClosingEventArgs e) { //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(BZ_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.BZ_Input.tsbtnCKDZAJ.Enabled = false; UI.Input.BZ_Input.tsmiCKDZAJ.Enabled = false; UI.Input.BZ_Input.tsbtnSCDZAJ.Enabled = false; UI.Input.BZ_Input.tsmiSCDZAJ.Enabled = false; } UI.Input.BZ_Input.tsbtnDATZ.Enabled = false; UI.Input.BZ_Input.tsbtnDHTZ.Enabled = false; UI.Input.BZ_Input.tsmiDATZ.Enabled = false; UI.Input.BZ_Input.tsmiDHTZ.Enabled = false; dgvCommon.closeYesNewRowsEventHandler(); }
//页面初始化 private void gd_yj_Load(object sender, EventArgs e) { #region DataGridView导航... dgvCommon.getNavigationYesNewRows(dgvYj, this.btn首记录, this.btn上一记录, this.btn下一记录, this.btn尾记录, this.btn新纪录, UI.Input.GD_Input.tsmi首记录, UI.Input.GD_Input.tsmi上一记录, UI.Input.GD_Input.tsmi下一记录, UI.Input.GD_Input.tsmi尾记录, UI.Input.GD_Input.tsmi新纪录, this.txt行号); #endregion dgvYj.ScrollBars = ScrollBars.Vertical; dgvYj.HScrollBarEx = this.hScrollBar1; dgvYj.Dock = DockStyle.Fill; panel2.Controls.Add(dgvYj); Padding padding = new Padding(); padding.Bottom = 39; this.panel2.Padding = padding; #region DataGridView 事件 this.dgvYj.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvYj_CellBeginEdit); this.dgvYj.RowValidating += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvYj_RowValidating); this.dgvYj.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dgvYj_CellValidating); this.dgvYj.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvYj_CellEndEdit); this.dgvYj.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dgvYj_DefaultValuesNeeded); this.dgvYj.CurrentCellChanged += new System.EventHandler(this.dgvYj_CurrentCellChanged); this.dgvYj.CellFormatting += new DataGridViewCellFormattingEventHandler(dgvYj_CellFormatting); this.dgvYj.CellPainting += new DataGridViewCellPaintingEventHandler(dgvYj_CellPainting); this.dgvYj.CellClick += new DataGridViewCellEventHandler(dgvYj_CellClick); this.dgvYj.SelectionChanged += new EventHandler(dgvYj_SelectionChanged); #endregion #region 工具栏和菜单栏设置 //禁用菜单栏和工具栏中的按钮 //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(GD_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.GD_Input.tsbtnCKDZAJ.Enabled = true; UI.Input.GD_Input.tsmiCKDZAJ.Enabled = true; UI.Input.GD_Input.tsbtnSCDZAJ.Enabled = true; UI.Input.GD_Input.tsmiSCDZAJ.Enabled = true; } UI.Input.GD_Input.tsbtnDATZ.Enabled = true; UI.Input.GD_Input.tsbtnDHTZ.Enabled = true; UI.Input.GD_Input.tsmiDATZ.Enabled = true; UI.Input.GD_Input.tsmiDHTZ.Enabled = true; //UI.Input.GD_Input.tsbtnCK.Enabled = false; //UI.Input.GD_Input.tsbtnList2.Checked = true; //UI.Input.GD_Input.tsbtnCard2.Checked = false; UI.Input.GD_Input.tsmiShowSingle.Checked = true; UI.Input.GD_Input.tsmiCard.Checked = false; UI.Input.GD_Input.tsmiShowSingle.Enabled = false; UI.Input.GD_Input.tsmiCard.Enabled = false; #endregion paneldgvYj.Visible = true; paneldgvYj.Dock = DockStyle.Fill; panelDgv.Visible = true; panelPhoto.Visible = false; showModel = ShowModel.List; panelDgv.Dock = DockStyle.Fill; panelPhoto.Dock = DockStyle.Fill; getPhotoList(DocID); wsYjLoad(); }
//构造函数初始化 public Ws_Yj(int DocID, TreeNode node, int deptID) { InitializeComponent(); this.DocID = DocID; this.DeptID = deptID; this.node = node; #region 绑定委托 UI.Input.BZ_Input.tsbtnNewRow.Click += new EventHandler(btnInputYj_Click); UI.Input.BZ_Input.tsbtnDeleteRow.Click += new EventHandler(tsdelete_Click); UI.Input.BZ_Input.tsbtnSX.Click += new EventHandler(tssx_Click); UI.Input.BZ_Input.tsbtnQXSX.Click += new EventHandler(tsqxsx_Click); UI.Input.BZ_Input.tsbtnCKDZAJ.Click += new EventHandler(tsckdzaj_Click); UI.Input.BZ_Input.tsbtnSCDZAJ.Click += new EventHandler(tsbtnscdzaj_Click); UI.Input.BZ_Input.tsbtnDATZ.Click += new EventHandler(tsbtnDATZ_Click); UI.Input.BZ_Input.tsbtnDHTZ.Click += new EventHandler(tsbtnDHTZ_Click); //绑定菜单栏按钮的委托 UI.Input.BZ_Input.tsmiDelete.Click += new EventHandler(tsdelete_Click); UI.Input.BZ_Input.tsmiSX.Click += new EventHandler(tssx_Click); UI.Input.BZ_Input.tsmiQXSX.Click += new EventHandler(tsqxsx_Click); UI.Input.BZ_Input.tsmiCKDZAJ.Click += new EventHandler(tsckdzaj_Click); UI.Input.BZ_Input.tsmiSCDZAJ.Click += new EventHandler(tsbtnscdzaj_Click); UI.Input.BZ_Input.tsmiCopy.Click += new EventHandler(tsmiCopy_Click); UI.Input.BZ_Input.tsmiCut.Click += new EventHandler(tsmiCut_Click); UI.Input.BZ_Input.tsmiPaste.Click += new EventHandler(tsmiPaste_Click); UI.Input.BZ_Input.tsmiDATZ.Click += new EventHandler(tsbtnDATZ_Click); UI.Input.BZ_Input.tsmiDHTZ.Click += new EventHandler(tsbtnDHTZ_Click); UI.Input.BZ_Input.tsmiFind.Click += new EventHandler(tsm查找_Click); pnlNav.SizeChanged += new EventHandler(pnlNav_SizeChanged); winFind.OnFindClick += new EventHandler <FindRecordWindowEventArgs>(this.winFind_OnFindClick); #endregion #region 界面设置 //判断是否有原件管理的权限 bool permission = PermissionInfo.checkPermission(BZ_Input.TopClassID, PermissionType.原件管理); if (permission) { UI.Input.BZ_Input.tsbtnCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiCKDZAJ.Enabled = true; UI.Input.BZ_Input.tsbtnSCDZAJ.Enabled = true; UI.Input.BZ_Input.tsmiSCDZAJ.Enabled = true; } UI.Input.BZ_Input.tsbtnDATZ.Enabled = true; UI.Input.BZ_Input.tsbtnDHTZ.Enabled = true; UI.Input.BZ_Input.tsmiDATZ.Enabled = true; UI.Input.BZ_Input.tsmiDHTZ.Enabled = true; UI.Input.BZ_Input.tsbtnSX.Enabled = true; UI.Input.BZ_Input.tsbtnQXSX.Enabled = true; UI.Input.BZ_Input.tsmiSX.Enabled = true; UI.Input.BZ_Input.tsmiQXSX.Enabled = true; UI.Input.BZ_Input.tsbtnChange.Enabled = false; UI.Input.BZ_Input.tsbtnCK.Enabled = false; UI.Input.BZ_Input.tsbtnList2.Checked = true; UI.Input.BZ_Input.tsbtnCard2.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Checked = true; UI.Input.BZ_Input.tsmiCard.Checked = false; UI.Input.BZ_Input.tsmiShowSingle.Enabled = false; UI.Input.BZ_Input.tsmiCard.Enabled = false; #endregion InitToolbarButtons();//初始化照片工具栏 this.photoViewer1.SizeChanged += new EventHandler(photoViewer1_SizeChanged); }
/// <summary> /// 加载节点并显示数据 /// (根据节点深度判断加载哪部分节点) /// </summary> /// <param name="xNode"></param> public void Init(TreeNode xNode, SplitContainer sc, out string flag, ref Form tmpForm, int deptID) { flag = ""; int Level = xNode.Level; Control c = sc.Panel2; sc.Panel2.Controls.Clear(); switch (Level) { case 0: flag = "案卷目录信息"; //装载目录节点 int ClassID = int.Parse(xNode.Tag.ToString()); content.getNodesData(xNode); c.Visible = false; LoadContentForm(ClassID, xNode, sc, deptID); c.Visible = true; break; case 1: flag = xNode.Text + " 目录下的案卷级数据"; //装载案卷节点 int ContentID = int.Parse(xNode.Tag.ToString()); file.getFileNodeData(xNode); c.Visible = false; LoadFileForm(ContentID, xNode, sc, deptID); c.Visible = true; break; case 2: flag = xNode.Parent.Text + " - " + xNode.Text + " 案卷下的文件级数据"; ////加载用户控件显示文件列表 int FileID = int.Parse(xNode.Tag.ToString()); //验证是否有原件管理的权限:1.通过案卷目录验证 2.通过一级类目验证 if (PublicClass.CheckContentPermission && !PublicClass.CheckSystemManager) { ContentID = int.Parse(xNode.Parent.Tag.ToString()); if (PermissionInfo_Content.checkPermission(ContentID, PermissionType_Content.原件管理)) { doc.getDocNodeData(xNode); } } else { if (PermissionInfo.checkPermission( Archives.UI.Input.BZ_Input.TopClassID, PermissionType.原件管理)) { doc.getDocNodeData(xNode); } } c.Visible = false; LoadDocForm(FileID, xNode, sc, deptID); c.Visible = true; break; case 3: flag = xNode.Parent.Parent.Text + " - " + xNode.Parent.Text + " - " + xNode.Text + " 文件下的原件"; ////加载用户控件显示文件列表 int DocID = int.Parse(xNode.Tag.ToString()); c.Visible = false; LoadFjForm(DocID, xNode, sc, deptID); c.Visible = true; break; default: break; } }
/// <summary> /// 加载节点并显示数据 /// (根据节点深度判断加载哪部分节点) /// </summary> /// <param name="xNode"></param> public void Init(TreeNode yNode, SplitContainer sc, out string flag, ref Form tmpForm, int DeptID) { flag = ""; int Level = yNode.Level; Control c = sc.Panel2; switch (Level) { case 0: flag = "归档文件"; //装载保管期限节点 int TopClassID = int.Parse(yNode.Tag.ToString()); limit.LoadLimitNodes(yNode, TopClassID); c.Visible = false; LoadLimitForm(TopClassID, sc, yNode, ref tmpForm, DeptID); c.Visible = true; break; case 1: flag = yNode.Text + "档案"; //装载年度节点 TopClassID = int.Parse(yNode.Parent.Tag.ToString()); string Limit = yNode.Text; year.LoadYearNodes(yNode, TopClassID, Limit); c.Visible = false; LoadYearForm(TopClassID, sc, yNode, ref tmpForm); c.Visible = true; break; case 2: flag = yNode.Parent.Text + " - " + yNode.Text + "年度的档案"; //加载用户控件显示文件列表 TopClassID = int.Parse(yNode.Parent.Parent.Tag.ToString()); Limit = yNode.Parent.Text; string Year = yNode.Text; classes.LoadClassNodes(yNode, TopClassID, Limit, Year); c.Visible = false; LoadClassForm(TopClassID, sc, yNode, ref tmpForm, DeptID); c.Visible = true; break; case 3: flag = yNode.Parent.Parent.Text + " - " + yNode.Parent.Text + " - " + yNode.Text + " 类目下的文件级数据"; //加载用户控件显示文件列表 int FileID = int.Parse(yNode.Tag.ToString()); //验证是否有原件管理的权限:1.通过案卷目录验证 2.通过一级类目验证 if (PublicClass.CheckContentPermission && !PublicClass.CheckSystemManager) { int ClassID = int.Parse(yNode.Tag.ToString()); if (PermissionInfo_Content.checkPermission_GD(ClassID, PermissionType_Content.原件管理)) { doc.getDocNodeData(yNode); } } else { if (PermissionInfo.checkPermission( Archives.UI.Input.GD_Input.TopClassID, PermissionType.原件管理)) { doc.getDocNodeData(yNode); } } c.Visible = false; LoadDocForm(FileID, sc, yNode, ref tmpForm, DeptID); c.Visible = true; break; case 4: flag = yNode.Parent.Parent.Parent.Text + " - " + yNode.Parent.Parent.Text + " - " + yNode.Parent.Text + " - " + yNode.Text + " 文件下的原件级数据"; //加载用户控件显示文件列表 int DocID = int.Parse(yNode.Tag.ToString()); c.Visible = false; LoadYjForm(DocID, sc, yNode, ref tmpForm, DeptID); c.Visible = true; break; default: break; } }