public ActionResult Create(Size size) { string strResult = string.Empty; bool bResult = SizeService.Add(size); string msg = bResult ? "新增成功" : "新增失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet); }
// // GET: /Size/Details/ public ActionResult Details(int page, int rows, FormCollection collection) { Size size = new Size(); size.SizeName = collection["SizeName"] ?? ""; string SizeNo = collection["SizeNo"] ?? ""; if (SizeNo != "" && SizeNo != null) { size.SizeNo = Convert.ToInt32(SizeNo); } var sizeDetail = SizeService.GetDetails(page, rows, size); return Json(sizeDetail, "text", JsonRequestBehavior.AllowGet); }
// /Size/CreateExcelToClient/ public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; int SizeID = Convert.ToInt32(Request.QueryString["ID"]); string SizeName = Request.QueryString["SizeName"]; Size size = new Size(); size.ID = SizeID; size.SizeName = SizeName; ExportParam ep = new ExportParam(); ep.DT1 = SizeService.GetSize(page, rows, size); ep.HeadTitle1 = "件烟尺寸信息"; return PrintService.Print(ep); }
// // POST: /Size/Edit/5 public ActionResult Edit(Size size) { string strResult = string.Empty; bool bResult = SizeService.Save(size); string msg = bResult ? "修改成功" : "修改失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }