using Estsh.Web.Service; using Estsh.Web.Util; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Estsh.Core.Web.Controllers { public class CartonDetailQueryController : Controller { CartonDetailQueryService service = new CartonDetailQueryService(); // // GET: /Menu/ public ActionResult Index() { return View(); } /// /// 加载功能树 /// /// public ActionResult getMenuTree() { string path = Request.ApplicationPath; if (path.EndsWith("/")) { path = path.Substring(0, path.Length - 1); } List treeNodes = new List(); treeNodes = service.getMenuList("isIndex = '是'", " RUID ASC ", path); Hashtable result = new Hashtable(); result.Add("treeNodes", treeNodes); String json = Estsh.Web.Util.JSON.Encode(result); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetVendor() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetVendor(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetPart() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetPart(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetModelType() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetModelType(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetStatus() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetStatus(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetEnabled() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetEnabled(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } public ActionResult GetLocate() { Hashtable result = new Hashtable(); ArrayList menuList = this.service.GetLocate(); result.Add("list", menuList); return Json(result, JsonRequestBehavior.AllowGet); } /// /// 获取分页数据 /// /// /// public ActionResult getDPSListByPage(String cartonNO, String picknoTxt, String buy_no, String partNo_search, String locate_name, String option3, String cmbVendor, String cmbCartonStatus, String cmbEnabled, String date, String txtEndPrintTime, String updateDate, Pager pager, String direction, String sort) { //Hashtable result = new Hashtable(); //ArrayList menuList = this.service.getDPSListByPage(10,1,"",""); //result.Add("list", menuList); //Response.Write("1111111"); //return Json(result, JsonRequestBehavior.AllowGet); string wheres = ""; //if (!string.IsNullOrEmpty(wareHouse_id)) //{ // wheres = InitWhereStr(wareHouse_id); //} Hashtable result = new Hashtable(); result.Add("pager.pageNo", pager.pageNo); ArrayList menuList = this.service.getDPSListByPage(cartonNO, picknoTxt, buy_no, partNo_search, locate_name, option3, cmbVendor, cmbCartonStatus, cmbEnabled, date, txtEndPrintTime, updateDate, pager, direction, sort); result.Add("rows", menuList); int total = this.service.getMenuCount(cartonNO, picknoTxt, buy_no, partNo_search, locate_name, option3, cmbVendor, cmbCartonStatus, cmbEnabled, date, txtEndPrintTime, updateDate, pager, direction, sort); result.Add("pager.totalRows", total); result.Add("sort", sort); result.Add("direction", direction); return Json(result); } ///// ///// 获取数据总行数 ///// ///// ///// //public int GetTotal(string strWhere) //{ // Hashtable result = new Hashtable(); // ArrayList menuList = this.service.getCountWhere(); // result.Add("list", menuList); // return Json(result, JsonRequestBehavior.AllowGet); //} //public ActionResult GetServer() //{ // Hashtable result = new Hashtable(); // ArrayList menuList = this.service.GetServer(); // result.Add("list", menuList); // return Json(result, JsonRequestBehavior.AllowGet); //} } }