void initSuogateTypeInnerHTML() { string str = ""; string strlist = ""; XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType(); DataTable dt = it.GetDataTable(" where IT_ParentID=0", ""); DataTable dt1 = it.GetDataTable(" where 1=1 ", ""); for (int i = 0; i < dt.Rows.Count; i++) { str += "<li class=\""; strlist += " <a href=\"#\" title=\"点击选择此项\" onclick=\"selectsuogateypeinfo(" + dt.Rows[i]["IT_ID"].ToString() + ",'" + dt.Rows[i]["IT_Name"].ToString() + "');\">" + dt.Rows[i]["IT_Name"].ToString() + "</a>"; dt1.DefaultView.RowFilter = "IT_ParentID=" + dt.Rows[i]["IT_ID"].ToString(); DataView dv1 = dt1.DefaultView; if (dv1.Count > 0) str += "shrink\" ><a href=\"#\" onclick=\"selectsuogateype(" + dt.Rows[i]["IT_ID"].ToString() + ",this);\">" + dt.Rows[i]["IT_Name"].ToString() + "</a></li>"; else str += "sublast\" >" + dt.Rows[i]["IT_Name"].ToString() + "</li>"; } str = str.Insert(0, strlist + "$"); System.Web.HttpContext.Current.Response.Write(str); }
void CreateSuogateTypeInnerHTML(long IT_ID) { try { string str = ""; string strlist = ""; XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType(); if (IT_ID == 0) { str += "请选择招商代理类别"; strlist += "<li onclick=\"selectsuogateype(0,this);\">请选择招商代理类别</li>"; } else { DataTable dtx = it.GetDataTable(" where IT_ID=" + IT_ID.ToString(), ""); str += dtx.Rows[0]["IT_Name"].ToString(); strlist += "<a href=\"#\" onclick=\"selectsuogateype(" + dtx.Rows[0]["IT_ID"].ToString() + ",this);\">" + dtx.Rows[0]["IT_Name"].ToString() + "</a>"; } str += "$"; DataTable dt = it.GetDataTable(" where IT_ParentID="+IT_ID, ""); DataTable dt1 = it.GetDataTable(" where 1=1 ", ""); if (dt.Rows.Count > 0) { strlist += " <ul class=\"subset\">"; for (int i = 0; i < dt.Rows.Count; i++) { str += " <a href=\"#\" title=\"点击选择此项\" onclick=\"selectsuogateypeinfo(" + dt.Rows[i]["IT_ID"].ToString() + ",'" + dt.Rows[i]["IT_Name"].ToString() + "');\">" + dt.Rows[i]["IT_Name"].ToString() + "</a>"; strlist += "<li class=\""; dt1.DefaultView.RowFilter = "IT_ParentID=" + dt.Rows[i]["IT_ID"].ToString(); DataView dv1 = dt1.DefaultView; if (dv1.Count > 0) strlist += "shrink\" ><a href=\"#\" onclick=\"selectsuogateype(" + dt.Rows[i]["IT_ID"].ToString() + ",this);\">" + dt.Rows[i]["IT_Name"].ToString() + "</a></li>"; else strlist += "sublast\" >" + dt.Rows[i]["IT_Name"].ToString() + "</li>"; } strlist += "</ul>"; } else { str += " "; } str += "$"; str += strlist; System.Web.HttpContext.Current.Response.Write(str); } catch (Exception ex) { XYECOM.Core .ErrMessage.WriteErrFile(ex); } }