public ActionResult Edit(AlarmInfo alarmInfoCode) { string strResult = string.Empty; bool bResult = AlarmInfoService.Save(alarmInfoCode,out strResult); string msg = bResult ? "修改成功" : "修改失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }
public ActionResult Create(AlarmInfo alarmInfo) { string strResult = string.Empty; bool bResult = AlarmInfoService.Add(alarmInfo, out strResult); string msg = bResult ? "新增成功" : "新增失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }
public ActionResult Details(int page, int rows, FormCollection collection) { AlarmInfo alarmInfo = new AlarmInfo(); alarmInfo.AlarmCode = collection["AlarmCode"] ?? ""; alarmInfo.Description = collection["Description"] ?? ""; var srmDetail = AlarmInfoService.GetDetails(page, rows, alarmInfo); return Json(srmDetail, "text", JsonRequestBehavior.AllowGet); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string AlarmCode = Request.QueryString["alarmCode"]; string Description = Request.QueryString["description"]; AlarmInfo alarmInfo=new AlarmInfo (); alarmInfo.AlarmCode = AlarmCode; alarmInfo.Description = Description; ExportParam ep = new ExportParam(); ep.DT1 = AlarmInfoService.GetAlarmInfo(page, rows, alarmInfo); ep.HeadTitle1 = "报警信息"; return PrintService.Print(ep); }