public ActionResult AreaDetail(int Id) { updateLayoutState(); log = LogFactory.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.FullName + ":" + MethodBase.GetCurrentMethod().Name); var layout = bllLayout.GetModel(Id); if (layout.LayoutTypeID != null) { var bllLayoutType = new MesWeb.BLL.T_LayoutType(); var layoutType = bllLayoutType.GetModel((int)layout.LayoutTypeID); if (layoutType.TableName == AreaIdentity.WorkArea) { return(RedirectToAction("ProcedureLayout", new { Id = Id })); } else if (layoutType.TableName == AreaIdentity.StoreArea) { return(RedirectToAction("StoreLayout", new { Id = Id })); } else if (layoutType.TableName == AreaIdentity.ExtraSensor) { return(RedirectToAction("ExtraSensorLayout", new { Id = Id })); } } log.Error("未指定该标记的类别"); return(RedirectToAction(ErrorManager.SystemError, ErrorManager.ErrorController, new { errorMessage = "系统错误" })); }
public ActionResult AreaDetailAdmin(int Id) { log = LogFactory.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.FullName + ":" + MethodBase.GetCurrentMethod().Name); var layout = bllLayout.GetModel(Id); if (layout.LayoutTypeID != null) { var bllLayoutType = new MesWeb.BLL.T_LayoutType(); var layoutType = bllLayoutType.GetModel((int)layout.LayoutTypeID); if (layoutType.TableName == AreaIdentity.WorkArea) { return(RedirectToAction("ProcedureLayoutAdmin", new { Id = Id })); } else if (layoutType.TableName == AreaIdentity.StoreArea) { return(RedirectToAction("StoreLayoutAdmin", new { Id = Id })); } } log.Error("未指定该标记的类别"); return(View()); }