public void MyBind() { DataTable dt = contentBll.Search(ImgName_T.Text); Content_RPT.DataSource = dt; Content_RPT.DataBind(); ContentCount_Hid.Value = dt.Rows.Count.ToString(); if (!string.IsNullOrEmpty(GID.Replace(",", "")))//已关联的内容 { string ids = StrHelper.PureIDSForDB(GID); DataTable tempdt = contentBll.Search("", ids); foreach (DataRow dr in tempdt.Rows) { ids_hid.Value += "," + dr["GeneralID"] + ","; } GID = ""; } }
private void MyBind() { M_UserInfo mu = buser.GetLogin(); M_Design_SiteInfo sfMod = sfBll.SelReturnModel(SiteID); Domain = B_IDC_DomainList.GetMyDomain(sfMod.DomainID); sfBll.CheckAuthEx(sfMod, mu); string nids = ""; if (NodeID > 0) { nids = NodeID.ToString(); M_Node nod = bNode.SelReturnModel(NodeID); string ModeIDList = nod.ContentModel; string[] ModelID = ModeIDList.Split(','); string AddContentlink = ""; for (int i = 0; i < ModelID.Length; i++) { M_ModelInfo infoMod = bmode.SelReturnModel(DataConverter.CLng(ModelID[i])); if (infoMod == null) { continue; } if (infoMod.ModelType != 5) { AddContentlink += "<a href='AddContent.aspx?SiteID=" + SiteID + "&NodeID=" + NodeID + "&ModelID=" + infoMod.ModelID + "' class='btn btn-info' style='margin-right:5px;'><i class='fa fa-plus'></i> 添加" + infoMod.ItemName + "</a>"; } } AddContent_L.Text = AddContentlink; } else { nids = sfNodeBll.SelToIDS(SiteID); } //int type = DataConverter.CLng(DropDownList1.SelectedValue); if (Status.Equals("-2")) { Rel_Btn.Visible = true; } //回收站 EGV.DataSource = bll.Search(TxtSearchTitle.Text, "", nids, Status); EGV.DataBind(); }