1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- 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 PaymentStandardController : Controller
- {
- public IPaymentStandardServices PaymentStandardServices { get; set; }
- public ActionResult List()
- {
- return View();
- }
- public ActionResult Edit(Guid? PaymentStandardID)
- {
- PaymentStandardView paymentStandardView = new PaymentStandardView();
- if (PaymentStandardID.HasValue)
- {
- paymentStandardView = PaymentStandardServices.GetPaymentStandardView(PaymentStandardID);
- }
- return View(paymentStandardView);
- }
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- if (configuretView.Attribute == Bowin.Web.Controls.Mvc.DropdownList.SELECT_ALL.ToString()) configuretView.Attribute = "";
- return base.Json(PaymentStandardServices.GetPaymentStandardViewList(configuretView, (int)pararms.page, (int)pararms.rows));
- }
- [HttpPost]
- public ActionResult Edit(PaymentStandardView paymentStandardView)
- {
- try
- {
- PaymentStandardServices.Save(paymentStandardView);
- return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败:" + ex.Message });
- }
- }
- [HttpPost]
- public ActionResult Delete(string paymentStandardIDs)
- {
- try
- {
- List<Guid?> list = paymentStandardIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- PaymentStandardServices.Delete(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "删除成功" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage { IsSuccess = false, Message = "删除失败:" + ex.Message });
- }
- }
- }
- }
|