public ActionResult Create(Path path) { string strResult = string.Empty; bool bResult = PathService.Add(path); string msg = bResult ? "新增成功" : "新增失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }
// // GET: /Path/Details/5 public ActionResult Details(int page, int rows, FormCollection collection) { Path path = new Path(); path.PathName = collection["PathName"] ?? ""; path.State = collection["State"] ?? ""; string OriginRegionID = collection["OriginRegionID"] ?? ""; string TargetRegionID = collection["TargetRegionID"] ?? ""; if (OriginRegionID != "" && OriginRegionID != null) { path.OriginRegionID = Convert.ToInt32(OriginRegionID); } if (TargetRegionID!=""&&TargetRegionID!=null) { path.TargetRegionID = Convert.ToInt32(TargetRegionID); } var pathDetail = PathService.GetDetails(page, rows, path); return Json(pathDetail, "text", JsonRequestBehavior.AllowGet); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string PathName = Request.QueryString["PathName"]; int OriginRegionID = Convert.ToInt32( Request.QueryString["OriginRegionID"]); int TargetRegionID = Convert.ToInt32(Request.QueryString["TargetRegionID"]); string State = Request.QueryString["State"]; Path path = new Path(); path.PathName = PathName; path.OriginRegionID = OriginRegionID; path.TargetRegionID = TargetRegionID; path.State = State; ExportParam ep = new ExportParam(); ep.DT1 = PathService.GetPath(page, rows, path); ep.HeadTitle1 = "路径信息"; return PrintService.Print(ep); }
public ActionResult Edit(Path path) { string strResult = string.Empty; bool bResult = PathService.Save(path,out strResult); string msg = bResult ? "修改成功" : "修改失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }