private void AddUser(string name)
        {
            MySimpleUser user = ObjectSpace.FindObject <MySimpleUser>(new BinaryOperator("UserName", name));

            if (user == null)
            {
                user          = ObjectSpace.CreateObject <MySimpleUser>();
                user.UserName = name;
                user.SetPassword("");
                user.Save();
            }
        }
        private void AddObjectToUserBOs(bool commitChanges)
        {
            MySimpleUser currentUser   = ObjectSpace.GetObjectByKey <MySimpleUser>(SecuritySystem.CurrentUserId);
            BaseClass    currentObject = (BaseClass)View.CurrentObject;

            if (currentObject.Users.IndexOf(currentUser) == -1)
            {
                currentObject.Users.Add(currentUser);
                if (commitChanges)
                {
                    ObjectSpace.CommitChanges();
                }
            }
        }