private void createselectlabelTypeHTML(string LT_IDs) { string str = ""; XYECOM.Business.LabelType lt = new XYECOM.Business.LabelType(); DataTable dt = lt.GetDataTable(" where LT_ID in (" + LT_IDs + ")"); for (int i = 0; i < dt.Rows.Count; i++) { str += "<a href=\"#\" onclick=\"canceltype(" + dt.Rows[i]["LT_ID"].ToString() + ");\" class=\"result\">" + dt.Rows[i]["LT_Name"].ToString() + "</a>"; } Response.Write(str); }
void createlabletypehtmll() { try { string str = ""; string strlist = ""; XYECOM.Model.LabelTypeInfo el = new XYECOM.Model.LabelTypeInfo(); XYECOM.Business.LabelType lt = new XYECOM.Business.LabelType(); DataTable dt = lt.GetDataTable("where LT_ParentID=0"); DataTable dt1 = lt.GetDataTable(" where 1=1 "); for (int i = 0; i < dt.Rows.Count; i++) { str += " <a href=\"#\" title=\"点击选择此项\" onclick=\"selecttypeinfo(" + dt.Rows[i]["LT_ID"].ToString() + ",'" + dt.Rows[i]["LT_Name"].ToString() + "');\">" + dt.Rows[i]["LT_Name"].ToString() + "</a>"; strlist += "<li class=\""; dt1.DefaultView.RowFilter = "LT_ParentID=" + dt.Rows[i]["LT_ID"].ToString(); DataView dv1 = dt1.DefaultView; if (dv1.Count > 0) strlist += "shrink\" ><a href=\"#\" onclick=\"selecttypelist(" + dt.Rows[i]["LT_ID"].ToString() + ",this);\">" + dt.Rows[i]["LT_Name"].ToString() + "</a></li>"; else strlist += "sublast\" >" + dt.Rows[i]["LT_Name"].ToString() + "</li>"; } str += "$" + strlist; Response.Write(str); } catch (Exception ex) { Response.Write(ex.Message.Replace("\n", "")); } }