public ActionResult ProductList() { int NodeID = DataConverter.CLng(Request.QueryString["NodeID"]); int Recycler = DataConverter.CLng(Request.QueryString["Recycler"]); PageSetting setting = proBll.U_SPage(CPage, PSize, mu.UserID, NodeID, Recycler); if (Request.IsAjaxRequest()) { return(PartialView("ProductList_List", setting)); } DataTable nodeDT = nodeBll.SelByPid(0, true); nodeDT = nodeDT.DefaultView.ToTable(); C_TreeView treeMod = new C_TreeView() { NodeID = "NodeID", NodeName = "NodeName", NodePid = "ParentID", DataSource = nodeDT, liAllTlp = "<a href='MyContent'>全部内容</a>", LiContentTlp = "<a href='MyContent?NodeID=@NodeID'>@NodeName</a>", SelectedNode = NodeID.ToString() }; ViewBag.treeMod = treeMod; string AddContentlink = ""; if (NodeID > 0) { M_Node nodeMod = nodeBll.GetNodeXML(NodeID); string[] ModelID = nodeMod.ContentModel.Split(','); for (int i = 0; i < ModelID.Length; i++) { AddContentlink = AddContentlink + "<input name=\"btn" + i.ToString() + "\" class=\"btn btn-primary\" type=\"button\" value=\"添加" + modBll.GetModelById(DataConverter.CLng(ModelID[i])).ItemName + "\" onclick=\"javascript:window.location.href='AddProduct?ModelID=" + ModelID[i] + "&NodeID=" + this.NodeID + "';\" /> "; if (modBll.GetModelById(DataConverter.CLng(ModelID[i])).Islotsize) { AddContentlink = AddContentlink + "<input name=\"btn" + i.ToString() + "\" class=\"btn btn-primary\" type=\"button\" value=\"批量添加" + modBll.GetModelById(DataConverter.CLng(ModelID[i])).ItemName + "\" onclick=\"javascript:window.location.href='Release?ModelID=" + ModelID[i] + "&NodeID=" + this.NodeID + "';\" /> "; } } } ViewBag.addlink = AddContentlink; ViewBag.Recycler = Recycler; return(View(setting)); }