/// <summary> /// 订单详细,根据orderId /// </summary> /// <param name="orderId">订单ID</param> /// <returns></returns> public ActionResult OrderDetail(string orderId) { OrderDetailModels orderDetailModels = new OrderDetailModels(); Orders order = ordersService.GetModel(orderId); //如果没有该订单,则定向到订单查询表 if (order == null) { return(RedirectToAction("OrderSearch", "OrderManager")); } orderDetailModels.Order = order; orderDetailModels.Department = departmentService.GetModel(orderDetailModels.Order.DID); orderDetailModels.Enterprise = enterpriseService.GetModel(orderDetailModels.Department.EID); orderDetailModels.OrderDetailList = orderDetailService.GetList(orderId); if (orderDetailModels.Order == null || orderDetailModels.Department == null || orderDetailModels.Enterprise == null || orderDetailModels.OrderDetailList == null) { //出错了重定向,待写 return(RedirectToAction("OrderSearch", "OrderManager")); } return(View(orderDetailModels)); }
public ActionResult GetEnterprise(int eid) { return(Json(es.GetModel(eid), JsonRequestBehavior.AllowGet)); }