using LeaRun.Application.Busines.WarehouseManage; using LeaRun.Util; using LeaRun.Util.WebControl; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LeaRun.Application.Web.Areas.WarehouseManage.Controllers { public class WarehouseController : MvcControllerBase { // // GET: /WarehouseManage/Warehouse/ private WMWarehousBLL bll = new WMWarehousBLL(); #region 视图 public ActionResult Index() { return View(); } public ActionResult Form() { return View(); } #endregion #region 数据 public ActionResult GetListJson(Pagination pagination) { var data = bll.getWarehouseList(pagination); var watch = CommonHelper.TimerStart(); var JsonData = new { rows = JsonConvert.DeserializeObject(data), total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } public ActionResult SaveFrom(String Code, String WarehouseName) { bll.SaveFrom(Code, WarehouseName); return Success("操作成功。"); } #endregion } }