Exemplo n.º 1
0
 public ActionResult DelRole()
 {
     if (Profile != null)
     {
         var            rid     = RequestInt64("ID");
         DelRoleCommand command = new DelRoleCommand(rid ?? -1, 1);
         CommandBus.Instance.Send(command);
         return(new ActionResult(command.Result.Status, null, null, command.Result.Msg));
     }
     return(new ActionResult(false, null, null, "无权操作,你的IP我们已经记录!"));
 }
Exemplo n.º 2
0
        public void Execute(DelRoleCommand command)
        {
            var rlt = _roleRepository.Remove(command.Id);

            if (rlt.success)
            {
                command.Result.Status = true;
                return;
            }

            command.Result.Status = false;
            command.Result.Msg    = rlt.msg;
        }