/// <summary> /// 管理返回表格Json /// </summary> /// <returns></returns> public ActionResult GridListJson(string companyId) { var listData = _warehouseBLL.GetList(companyId); var jsonData = new { rows = listData }; return(Content(jsonData.ToJson())); }
/// <summary> /// 获取仓库树数据源 /// </summary> /// <returns></returns> public string GetWHList() { List <TreeNodeResult> list = new List <TreeNodeResult>(); WarehouseBLL bll = null; List <Warehouse> array = null; try { bll = BLLFactory.CreateBLL <WarehouseBLL>(); array = bll.GetList(); TreeNodeResult rootNode = new TreeNodeResult(); rootNode.Tid = ""; rootNode.Ttext = "仓库"; foreach (Warehouse info in array) { TreeNodeResult node = new TreeNodeResult(); node.Tid = info.ID; node.Ttext = info.Code + "|" + info.Description; rootNode.AddchildNode(node); } list.Add(rootNode); return(TreeNodeResult.GetResultJosnS(list.ToArray())); } catch (Exception ex) { throw ex; } }
private void BindData() { WarehouseBLL bll = null; DataPage dp = new DataPage(); Warehouse condition = new Warehouse(); try { bll = BLLFactory.CreateBLL <WarehouseBLL>(); condition.Code = this.Code.Text.Trim(); condition.Description = this.Description.Text.Trim(); PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.GetList(condition, dp); List <Warehouse> list = dp.Result as List <Warehouse>; this.GvList.DataSource = list; this.GvList.DataBind(); for (int i = 0; i < this.GvList.Rows.Count; i++) { string click = string.Format("return edit('{0}');", this.GvList.DataKeys[i]["ID"].ToString()); (this.GvList.Rows[i].Cells[4].Controls[0] as WebControl).Attributes.Add("onclick", click); } PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
public ActionResult Edit(string id) { Spl_WarehouseAllocationModel entity = m_BLL.GetById(id); ViewBag.FromWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name", entity.FromWarehouseId); ViewBag.ToWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name", entity.ToWarehouseId); return(View(entity)); }
public ActionResult Edit(string id) { Spl_WarehouseWarrantModel entity = m_BLL.GetById(id); ViewBag.Warehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name", entity.WarehouseId); ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "入库"), "Id", "Name", entity.InOutCategoryId); return(View(entity)); }
public JsonResult GetListParent(GridPager pager, string queryStr) { List <Spl_WarehouseModel> list = WarehouseBLL.GetList(ref pager, queryStr, GetUserId()); GridRows <Spl_WarehouseModel> grs = new GridRows <Spl_WarehouseModel>(); grs.rows = list; grs.total = pager.totalRows; return(Json(grs)); }
private void BindWHList() { WarehouseBLL bll = null; List <Warehouse> array = null; bll = BLLFactory.CreateBLL <WarehouseBLL>(); array = bll.GetList(); this.Warehouse.DataSource = array; this.Warehouse.DataBind(); }
public JsonResult GetComboxDataByWarehouse() { List <Spl_WarehouseModel> list = WarehouseBLL.GetList(ref setNoPagerAscById, ""); var json = (from r in list select new Spl_ProductCategoryModel() { Id = r.Id, Name = r.Name }).ToArray(); return(Json(json)); }
public ActionResult Create() { ViewBag.FromWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name"); ViewBag.ToWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name"); AccountModel accountModel = GetAccount(); Spl_WarehouseAllocationModel model = new Spl_WarehouseAllocationModel() { Id = "DBD" + DateTime.Now.ToString("yyyyMMddHHmmssff"), // Handler = accountModel.Id, Handler = accountModel.TrueName, HandlerName = accountModel.TrueName, }; return(View(model)); }
public ActionResult Create() { ViewBag.Warehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name"); ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "入库"), "Id", "Name"); AccountModel accountModel = GetAccount(); Spl_WarehouseWarrantModel model = new Spl_WarehouseWarrantModel() { Id = "RKD" + DateTime.Now.ToString("yyyyMMddHHmmssff"), Handler = accountModel.TrueName, HandlerName = accountModel.TrueName, }; ViewBag.Checker = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()).GroupBy(p => new { p.Id, p.ContactPerson }).Select(g => new { Id = g.Key.Id, ContactPerson = g.Key.ContactPerson }), "Id", "ContactPerson"); return(View(model)); }
public ActionResult Create() { ViewBag.Warehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name"); ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "出库"), "Id", "Name"); AccountModel accountModel = GetAccount(); Spl_WarehouseWarrantOUTModel model = new Spl_WarehouseWarrantOUTModel() { Id = "CKD" + DateTime.Now.ToString("yyyyMMddHHmmssff"), // Handler = accountModel.Id, Handler = accountModel.TrueName, HandlerName = accountModel.TrueName, }; ViewBag.Checker = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "ContactPerson").Distinct(); return(View(model)); }
/// <summary> /// 设置数据 /// </summary> /// <param name="name"></param> private void setList(string name) { this.dgv_Data.DataSource = bll.GetList(name); getName(); }
public async Task <ActionResult> GetListJson(WarehouseListParam param) { TData <List <WarehouseEntity> > obj = await warehouseBLL.GetList(param); return(Json(obj)); }