using NFine.Application.ProductManage; using NFine.Code; using NFine.Domain.Entity.ProductManage; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; namespace NFine.Web.Areas.ProductManage.Controllers { public class RapaPortController : ControllerBase { private DiscountRateApp discountrateApp = new DiscountRateApp(); [HttpGet] [HandlerAjaxOnly] public ActionResult GetGridJson(Pagination pagination, string queryJson) { var data = new { rows = discountrateApp.GetList2(pagination, queryJson), total = pagination.total, page = pagination.page, records = pagination.records }; return Content(data.ToJson()); } [HttpGet] [HandlerAjaxOnly] public ActionResult GetFormJson(string keyValue) { var data = discountrateApp.GetForm(keyValue); return Content(data.ToJson()); } [HttpPost] [HandlerAjaxOnly] [ValidateAntiForgeryToken] public ActionResult SubmitForm(ICSDiscountRateEntity discountrateEntity, string keyValue) { discountrateApp.SubmitForm(discountrateEntity, keyValue); return Success("Successful operation."); } [HttpPost] [HandlerAjaxOnly] [HandlerAuthorize] [ValidateAntiForgeryToken] public ActionResult DeleteForm(string keyValue) { discountrateApp.DeleteForm(keyValue); return Success("Delete success."); } public ActionResult Forms() { return View(); } } }