Ejemplo n.º 1
0
        protected override void ReverseImplement()
        {
            if (this.Id == Guid.Empty)
            {
                return;
            }
            var cmd = new DeleteUser(this.Id);

            cmd.Execute();
        }
Ejemplo n.º 2
0
        protected override void RaiseImplement()
        {
            var user = UserCommon.FindById(this.Id, QueryLevel.None);

            if (user.IsEmpty())
            {
                return;
            }

            //记录数据,留待恢复使用
            this.Name         = user.Name;
            this.MobileNumber = user.MobileNumber;
            this.AccountName  = user.Account.Name;
            this.Password     = user.Account.Password;
            this.RoleIds      = user.Account.Roles.Select((t) => t.Id).ToArray();
            this.Sex          = user.Sex;


            var cmd = new DeleteUser(this.Id);

            cmd.Execute();
        }