示例#1
0
        void DoCreateUser()
        {
            FrmUserEdit frmUserEdit = new FrmUserEdit();

            frmUserEdit.DataSourceChanged += OnCreateUser;
            frmUserEdit.ShowDialog();
        }
示例#2
0
        void ShowEditForm()
        {
            UserEntity user = SelectedUserRow;

            if (user == null)
            {
                MsgBox.Warn("请选中要修改的用户行。");
                return;
            }

            if (user.UserCode == "000999")
            {
                if (GlobeSettings.LoginedUser.UserCode != "000999")
                {
                    MsgBox.Warn("普通用户没有修改管理员的权限。");
                    return;
                }
            }

            FrmUserEdit frmUserEdit = new FrmUserEdit(user);

            frmUserEdit.DataSourceChanged += OnUserChanged;
            frmUserEdit.ShowDialog();
        }