/// <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.GetListByUserID(this.GetLoginInfo()); 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; } }