public ActionResult Config(BackgroundTaskManageModel model, SubmitType submit) { if (ModelState.IsValid) { var response = _backgroundTaskService.SaveBackgroundTask(model); SetResponseMessage(response); if (response.Success) { switch (submit) { case SubmitType.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Config", new { id = model.Id })); } } } return(View(model)); }