ChargeControlController.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using EMIS.Web.Controls;
  7. using EMIS.ViewModel;
  8. using EMIS.ViewModel.ChargeManage.ArrearsSituation;
  9. using EMIS.CommonLogic.ChargeManage.ArrearsSituation;
  10. namespace EMIS.Web.Controllers.ChargeManage.ArrearsSituation
  11. {
  12. [Authorization]
  13. public class ChargeControlController : Controller
  14. {
  15. public IChargeControlServices ChargeControlServices { get; set; }
  16. /// <summary>
  17. /// 费用控制页面
  18. /// </summary>
  19. /// <returns></returns>
  20. public ActionResult List()
  21. {
  22. var chargeControlView = new ChargeControlView();
  23. chargeControlView = ChargeControlServices.GetChargeControlView();
  24. return View(chargeControlView);
  25. }
  26. /// <summary>
  27. /// 费用控制保存
  28. /// </summary>
  29. /// <param name="chargeControlView"></param>
  30. /// <returns></returns>
  31. [HttpPost]
  32. public ActionResult List(ChargeControlView chargeControlView)
  33. {
  34. try
  35. {
  36. ChargeControlServices.ChargeControlSave(chargeControlView);
  37. return Json(new ReturnMessage
  38. {
  39. IsSuccess = true,
  40. Message = "保存成功。"
  41. });
  42. }
  43. catch (Exception ex)
  44. {
  45. return Json(new ReturnMessage
  46. {
  47. IsSuccess = false,
  48. Message = "保存失败,原因:" + ex.Message
  49. });
  50. }
  51. }
  52. }
  53. }