private void bindInfo() { SearchSuccessStories spt = new SearchSuccessStories(); spt.IsEnglish = 1; using (BLLSuccessStories bll = new BLLSuccessStories()) { List <SuccessStories> lists = bll.GetList(spt); if (lists != null) { int x = 0; for (int i = 0; i < (lists.Count) / 2; i++) { // prlsdaafgad.InnerHtml += "<span class=\"workItem\">"; // if (lists[x] != null) // { // prlsdaafgad.InnerHtml += "<a href=\"caseDetail.aspx?id=" + lists[x].ID + "\" ><img src=\"" + lists[x].SSPic + "\" alt=\"\" />" + "</a>"; // } // x++; // if (lists[x] != null) // { // prlsdaafgad.InnerHtml += "<a href=\"caseDetail.aspx?id=" + lists[x].ID + "\" ><img src=\"" + lists[x].SSPic + "\" alt=\"\" />" + "</a>"; // } // x++; // prlsdaafgad.InnerHtml += "</span>"; } } else { //prlsdaafgad.InnerHtml += "暂无数据"; } } }
public static string OperateRecords(string ids, int op) { string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); using (BLLSuccessStoriesType bll = new BLLSuccessStoriesType()) { foreach (string id in array) { switch (op) { case 7: using (BLLSuccessStories blls1 = new BLLSuccessStories()) { SearchSuccessStories con3 = new SearchSuccessStories(); con3.SSType = Convert.ToInt32(id); if (blls1.GetList(con3).Count > 0) { return("此成功案例类型下有相应的信息,不能删除!"); } } bll.Delete(id); break; } } if (bll.IsFail) { return(ExceptionManager.GetErrorMsg(bll.DevNetException)); } } return(string.Empty); }