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