123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.CommonLogic.PaymentManage;
- using EMIS.ViewModel.PaymentManage;
- using EMIS.ViewModel;
- using EMIS.Web.Controls;
- using Bowin.Web.Controls.Mvc;
- namespace EMIS.Web.Controllers.PaymentManage
- {
- [Authorization]
- public class LevelStandardController : Controller
- {
- public ILevelStandardServices LevelStandardServices { get; set; }
- public ActionResult List()
- {
- return View();
- }
- public ActionResult Edit(Guid? LevelStandardID)
- {
- LevelStandardView levelStandardView = new LevelStandardView();
- if (LevelStandardID.HasValue)
- {
- levelStandardView = LevelStandardServices.GetLevelStandardView(LevelStandardID);
- }
- return View(levelStandardView);
- }
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var employmentTypeID = pararms.getExtraInt("ddlEmploymentType") == DropdownList.PLEASE_SELECT ? null : pararms.getExtraInt("ddlEmploymentType");
- var teacherTypeID = pararms.getExtraInt("ddlTeacherType") == DropdownList.PLEASE_SELECT ? null : pararms.getExtraInt("ddlTeacherType");
- var paymentLevel = pararms.getExtraInt("ddlPaymentLevel") == DropdownList.PLEASE_SELECT ? null : pararms.getExtraInt("ddlPaymentLevel");
- if (configuretView.Attribute == Bowin.Web.Controls.Mvc.DropdownList.SELECT_ALL.ToString()) configuretView.Attribute = "";
- return base.Json(LevelStandardServices.GetLevelStandardViewList(configuretView, employmentTypeID, teacherTypeID, paymentLevel, (int)pararms.page, (int)pararms.rows));
- }
- [HttpPost]
- public ActionResult Edit(LevelStandardView levelStandardView)
- {
- try
- {
- LevelStandardServices.Save(levelStandardView);
- return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败:" + ex.Message });
- }
- }
- [HttpPost]
- public ActionResult Delete(string levelStandardIDs)
- {
- try
- {
- List<Guid?> list = levelStandardIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- LevelStandardServices.Delete(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "删除成功" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage { IsSuccess = false, Message = "删除失败:" + ex.Message });
- }
- }
- }
- }
|