public ActionResult Edit(int?id, int?logId) { PageTemplateManageModel model = null; if (id.HasValue) { model = _pageTemplateService.GetTemplateManageModel(id.Value); } else if (logId.HasValue) { model = _pageTemplateService.GetTemplateManageModelByLogId(logId.Value); } if (model == null) { SetErrorMessage(T("PageTemplate_Message_ObjectNotFound")); return(RedirectToAction("Index")); } return(View(model)); }