Beispiel #1
0
        public UCSelectPrinPLM(SelectPrinWay way)
            : this()
        {
            this.way = way;
            switch (way)
            {
            case SelectPrinWay.SelectUser:
                this.ucUser = new UCUsers();
                this.ucUser.showSysAdmin = this.showSysAdmin;
                this.popupContainer.Controls.Add(this.ucUser);
                base.Properties.PopupControl.Size = new Size(this.ucUser.Width, this.ucUser.Height);
                this.ucUser.Dock          = DockStyle.Fill;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucUser.PrinSelected += this.handler;
                return;

            case SelectPrinWay.SelectOrg:
                this.ucOrg = new UCOrgs();
                this.popupContainer.Controls.Add(this.ucOrg);
                base.Properties.PopupControl.Size = new Size(this.ucOrg.Width, this.ucOrg.Height);
                this.ucOrg.Dock = DockStyle.Fill;
                this.ucOrg.LoadOrgs();
                this.handler             = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucOrg.PrinSelected += this.handler;
                return;

            case SelectPrinWay.SelectRole:
                this.ucRole = new UCRoles();
                this.ucRole.LoadRoles();
                this.ucRole.RoleRefresh(null, null);
                this.popupContainer.Controls.Add(this.ucRole);
                base.Properties.PopupControl.Size = new Size(this.ucRole.Width, this.ucRole.Height);
                this.ucRole.Dock          = DockStyle.Fill;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                return;

            case SelectPrinWay.SelectPrjUser:
                this.ucRole = new UCRoles();
                this.popupContainer.Controls.Add(this.ucRole);
                base.Properties.PopupControl.Size = new Size(this.ucRole.Width, this.ucRole.Height);
                this.ucRole.Dock          = DockStyle.Fill;
                this.QueryPopUp          += new CancelEventHandler(this.UCSelectPrin_QueryPopUp);
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;

            case SelectPrinWay.SelectPrjOrg:
                this.ucRole = new UCRoles();
                this.popupContainer.Controls.Add(this.ucRole);
                base.Properties.PopupControl.Size = new Size(this.ucRole.Width, this.ucRole.Height);
                this.ucRole.Dock          = DockStyle.Fill;
                this.QueryPopUp          += new CancelEventHandler(this.UCSelectPrin_QueryPopUp);
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;
            }
        }
Beispiel #2
0
        public UCSelectPrin(SelectPrinWay way) : this()
        {
            this.way = way;
            switch (way)
            {
            case SelectPrinWay.SelectUser:
            {
                this.ucUser = new UCUsers();
                this.ucUser.showSysAdmin = this.showSysAdmin;
                DropDownEditorButton button = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button.Control            = this.ucUser;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucUser.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectOrg:
            {
                this.ucOrg = new UCOrgs();
                DropDownEditorButton button2 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button2.Control = this.ucOrg;
                this.ucOrg.LoadOrgs();
                this.handler             = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucOrg.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectRole:
            {
                this.ucRole = new UCRoles();
                this.ucRole.LoadRoles();
                this.ucRole.RoleRefresh(null, null);
                DropDownEditorButton button3 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button3.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectPrjUser:
            {
                this.ucRole = new UCRoles();
                DropDownEditorButton button5 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ResCombo_BeforeDropDown);
                button5.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;
            }

            case SelectPrinWay.SelectPrjOrg:
            {
                this.ucRole = new UCRoles();
                DropDownEditorButton button4 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ResCombo_BeforeDropDown);
                button4.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;
            }
            }
        }