Example #1
0
        /// <summary>
        /// 角色管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mmRoleManage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //write menu item click log
            MenuClickLog(e);
            if (IsExistWindow("FrmRole"))
            {
                return;
            }
            FrmRole frm = new FrmRole();

            frm.MdiParent = this;
            BindClickEventToAllBuutonControl(frm);
            SetStyleController(frm, styleController);
            frm.Show();
        }
Example #2
0
        private void btnRoleNew_Click(object sender, EventArgs e)
        {
            if (_formRole == null)
            {
                //'Take Instance Of Role Manager For Use in formUserRol
                var sharpRoleManager = ObjectFactory.WinForm.WinFormAppObjectFactory.Container.GetInstance <IApplicationRoleManager>();

                _formRole = new FrmRole(sharpRoleManager)
                {
                    MdiParent = this, StartPosition = FormStartPosition.CenterScreen
                };
                _formRole.FormClosed += delegate
                {
                    _formRole = null;
                };
                _formRole.Show();
            }
            else
            {
                _formRole.Activate();
            }
        }