1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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;
- namespace EMIS.Web.Controllers.PaymentManage
- {
- [Authorization]
- public class StaffStandardController : Controller
- {
- public IStaffStandardServices StaffStandardServices { get; set; }
- public ActionResult List()
- {
- return View();
- }
- public ActionResult Edit(Guid? StaffStandardID)
- {
- StaffStandardView staffStandardView = new StaffStandardView();
- if (StaffStandardID.HasValue)
- {
- staffStandardView = StaffStandardServices.GetStaffStandardView(StaffStandardID);
- }
- return View(staffStandardView);
- }
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var collegeID = pararms.getExtraGuid("cgbCollege");
- var departmentID = pararms.getExtraGuid("cgbDepartment");
- var userID = pararms.getExtraGuid("cgbUser");
- if (configuretView.Attribute == Bowin.Web.Controls.Mvc.DropdownList.SELECT_ALL.ToString()) configuretView.Attribute = "";
- return base.Json(StaffStandardServices.GetStaffStandardViewList(configuretView, collegeID, departmentID, userID, (int)pararms.page, (int)pararms.rows));
- }
- [HttpPost]
- public ActionResult Edit(StaffStandardView staffStandardView)
- {
- try
- {
- StaffStandardServices.Save(staffStandardView);
- return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败:" + ex.Message });
- }
- }
- [HttpPost]
- public ActionResult Delete(string staffStandardIDs)
- {
- try
- {
- List<Guid?> list = staffStandardIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- StaffStandardServices.Delete(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "删除成功" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage { IsSuccess = false, Message = "删除失败:" + ex.Message });
- }
- }
- }
- }
|