public ActionResult Create(Position position) { string strResult = string.Empty; bool bResult = PositionService.Add(position); string msg = bResult ? "新增成功" : "新增失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet); }
// // GET: /Position/Details/5 public ActionResult Details(int page, int rows, FormCollection collection) { Position position = new Position(); position.PositionName = collection["PositionName"] ?? ""; position.PositionType = collection["PositionType"] ?? ""; position.SRMName = collection["SRMName"] ?? ""; position.State = collection["State"] ?? ""; var positionDetail = PositionService.GetDetails(page, rows, position); return Json(positionDetail, "text", JsonRequestBehavior.AllowGet); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string positionName = Request.QueryString["positionName"]; string PositionType = Request.QueryString["PositionType"]; string SRMName = Request.QueryString["SRMName"]; string State = Request.QueryString["State"]; Position position = new Position(); position.PositionName = positionName; position.PositionType = PositionType; position.SRMName = SRMName; position.State = State; ExportParam ep = new ExportParam(); ep.DT1 = PositionService.GetPosition(page, rows, position); ep.HeadTitle1 = "位置信息"; return PrintService.Print(ep); }
public ActionResult Edit(Position position) { string strResult = string.Empty; bool bResult = PositionService.Save(position); string msg = bResult ? "修改成功" : "修改失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }