Beispiel #1
0
 public ActionResult CreateCompleted(CommandStatusEnum createStatus)
 {
     if (createStatus == CommandStatusEnum.Success)
         return RedirectToAction("CreateRecord", "Record");
     else
         return View("Create"); // TODO:: Print error with red symbols in the page!!!
 }
Beispiel #2
0
        public async Task <IActionResult> PutCommandByStatus([FromRoute] int id, [FromRoute] CommandStatusEnum status)
        {
            var command = await _dbContext.Command.FindAsync(id);

            if (command == null)
            {
                return(NotFound());
            }

            command.Status = status;
            var response = await _dbContext.SaveChangesAsync(HttpContext.RequestAborted);

            return(Ok(response));
        }
Beispiel #3
0
 private void CreateCommandCallback(IAsyncResult asyncResult)
 {
     var result = asyncResult.AsyncState as CompletionResult;
     var controller = result.State as AuthorController;
     AuthorAdditionSuccess = (CommandStatusEnum)result.ErrorCode;
 }
Beispiel #4
0
 public CommandResult(CommandStatusEnum status)
 {
     _status = status;
 }