lterationController.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using PMS.EntityModels.LterationModel;
  2. using PMS.Interface;
  3. using PMS.Interface.LterationManager;
  4. using PMS.WebUI.Controllers;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Web;
  9. using System.Web.Mvc;
  10. namespace PMS.WebUI.Controllers
  11. {
  12. public class lterationController : BaseController
  13. {
  14. ILterationManager lteration = InterfaceFactory.CreateBusinessInstance<ILterationManager>();
  15. public ActionResult Index()
  16. {
  17. return View();
  18. }
  19. public ActionResult GetList(string cp,int zt,string key,int page, int rows)
  20. {
  21. return Content(lteration.GetList(cp,zt,key, page,rows),"application/json");
  22. }
  23. public ActionResult GetDataById(string id)
  24. {
  25. return Content(lteration.GetDataById(id), "application/json");
  26. }
  27. /// <summary>
  28. /// 编辑窗口
  29. /// </summary>
  30. public ActionResult EditWindow(string ID, int Type)
  31. {
  32. ViewBag.type = Type;
  33. ViewBag.id = ID;
  34. return View();
  35. }
  36. /// <summary>
  37. /// 保存人员信息
  38. /// </summary>
  39. public int Save(LterationModel model, int type)
  40. {
  41. return lteration.Save(model,type);
  42. }
  43. /// <summary>
  44. /// 单个删除
  45. /// </summary>
  46. /// <param name="id"></param>
  47. /// <returns></returns>
  48. public int Delete(string id)
  49. {
  50. int r = lteration.Delete(id);
  51. return r;
  52. }
  53. }
  54. }