Exemplo n.º 1
0
        private void Right()
        {
            try
            {
                VsmdgroupProg vp = new VsmdgroupProg();
                try
                {
                    vp = MIS.GetProgRight("0cf61d9f-a4f4-464a-af23-574a90d2fbba", "", MIS.UserNumber);
                }
                catch { }
                if (vp.upd == "0")
                {
                    barEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.ins == "0")
                {
                    barAdd.Visibility  = DevExpress.XtraBars.BarItemVisibility.Never;
                    barAdd1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.del == "0")
                {
                    barDel.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.prn == "0")
                {
                    barPrint.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
            }
            catch { }
        }
Exemplo n.º 2
0
        private void InitData()
        {
            string          s    = "  IsGuiDang!='是' order by SortID";
            IList <Project> list = SysService.GetList <Project>("SelectProjectByWhere", s);

            for (int i = 0; i < list.Count; i++)
            {
                VsmdgroupProg smdgroup = new VsmdgroupProg();
                //授权管理模块的ID为b9b2acb7-e093-4721-a92f-749c731b016e
                smdgroup = MIS.GetProgRight("b9b2acb7-e093-4721-a92f-749c731b016e", list[i].UID);
                if (Convert.ToInt32(smdgroup.run) == 0 && list[i].ProjectManager != "")
                {
                    list.Remove(list[i]);
                    i--;
                }
            }
            dt = Itop.Common.DataConverter.ToDataTable((IList)list, typeof(Project));
            this.treeList1.DataSource = dt;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 设置权限方法
 /// </summary>
 /// <param name="progid"></param>
 /// <param name="projectuid"></param>
 public void  SetRightByProgid(string progid, string projectuid)
 {
     smdgroup = MIS.GetProgRight(progid, projectuid);
 }
Exemplo n.º 4
0
        private void InitForm()
        {
            //Itop.Common.ImeController.SetIme(this);
            //txEdit1.editok_state(false);

            if (!isSelect)
            {
                if (!EditRight)
                {
                    barSelect.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    //txEdit1.btn_editok_visible = DevExpress.XtraBars.BarItemVisibility.Never;
                    barEdititem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    this.ctrlRtfAttachFiles1.GridControl.EmbeddedNavigator.Buttons.CustomButtons[2].Visible = false;
                    this.ctrlRtfAttachFiles1.修改ToolStripMenuItem.Visible = false;
                }

                if (!AddRight)
                {
                    barAdditem.Visibility  = DevExpress.XtraBars.BarItemVisibility.Never;
                    barAdd1item.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    this.ctrlRtfAttachFiles1.GridControl.EmbeddedNavigator.Buttons.CustomButtons[0].Visible = false;
                    this.ctrlRtfAttachFiles1.添加ToolStripMenuItem.Visible = false;
                }

                if (!DeleteRight)
                {
                    barDelitem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    this.ctrlRtfAttachFiles1.GridControl.EmbeddedNavigator.Buttons.CustomButtons[1].Visible = false;
                    this.ctrlRtfAttachFiles1.除ToolStripMenuItem.Visible = false;
                }

                if (!PrintRight)
                {
                    barPrint.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    this.ctrlRtfAttachFiles1.打印ToolStripMenuItem.Visible = false;
                    this.ctrlRtfAttachFiles1.GridControl.EmbeddedNavigator.Buttons.CustomButtons[3].Visible = false;
                }

                // barSelect.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;


                //if (!(AddRight || EditRight))
                //    dsoFramerWordControl2.IsReadOnly = true;
            }

            else
            {
                VsmdgroupProg vp = new VsmdgroupProg();
                try
                {
                    vp = MIS.GetProgRight("a5ac2d77-e60e-4253-ae10-4a17abf5a89b", "", MIS.UserNumber);
                }
                catch { }
                if (vp.upd == "0")
                {
                    barEdititem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    //txEdit1.btn_editok_visible = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.ins == "0")
                {
                    barAdd1item.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    barAdditem.Visibility  = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.del == "0")
                {
                    barDelitem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                if (vp.prn == "0")
                {
                    barPrint.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
            }
        }