public string GetPathById(ProblemResourceKindEntity en) { ProblemResourceKindDal dal = new ProblemResourceKindDal(); DataTable dt = dal.GetPathById(en); string title = null; if (dt != null) { DataTable dt2 = dal.GetAll(); string path = dt.Rows[0]["Path"].ToString(); string[] a = path.Split(new char[] { '/' }); for (int i = 1; i < a.Length; i++) { for (int j = 0; j < dt2.Rows.Count; j++) { if (dt2.Rows[j]["PRKID"].ToString() == a[i]) { title = string.Concat(new string[] { title, "【<a href='YAS_ProblemResourceKindContent.aspx?prkid=", a[i], "'> ", dt2.Rows[j]["Name"].ToString(), "</a>】>>> " }); } } } title = title.Substring(0, title.Length - 5) + "</a>】"; } else { title = " "; } return(title); }
public DataTable GetAll() { ProblemResourceKindDal dal = new ProblemResourceKindDal(); return(dal.GetAll()); }