NBChangeMeterManageController.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using LeaRun.Util;
  2. using LeaRun.Util.WebControl;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. using LeaRun.Application.Busines.NBManage;
  9. using LeaRun.Application.Entity.NBManage;
  10. namespace LeaRun.Application.Web.Areas.NBManage.Controllers
  11. {
  12. public class NBChangeMeterManageController : MvcControllerBase
  13. {
  14. NBChangeMeterBLL changeMeterBll = new NBChangeMeterBLL();
  15. /// <summary>
  16. /// 换表操作
  17. /// </summary>
  18. /// <returns></returns>
  19. public ActionResult Index()
  20. {
  21. return View();
  22. }
  23. #region 获取数据
  24. [HttpGet]
  25. public ActionResult GetRecordJson(string commandId, Pagination pagination, string queryType, string queryValue, string userNo, string imei)
  26. {
  27. string resultJson = changeMeterBll.GetRecordJson(commandId,pagination, queryType,queryValue,userNo,imei);
  28. return Content(resultJson);
  29. }
  30. #endregion
  31. public ActionResult Form()
  32. {
  33. return View();
  34. }
  35. public ActionResult SaveForm(string keyValue, string jsonData)
  36. {
  37. ChangeMeterRecordEntity entity = jsonData.ToObject<ChangeMeterRecordEntity>();
  38. if (changeMeterBll.ChangeMeter(keyValue, entity))
  39. {
  40. return Success("换表成功");
  41. }
  42. return Error("换表失败");
  43. }
  44. }
  45. }